Stored Procedures in ASR Remoting
DIGG IT!
0
Comments
Published
Friday, October 24, 2003
at
12:26 PM
.
It seems that you can seamlessly integrate stored procedure calls with ActionScript Remoting. At first I was a bit skeptical that this would work, but some engineer at MM knew what they were doing. Here is a simple ASR remoting function using a stored procedure:
function getsystem(o){
// create a stored procedure call as a string
var sql = 'sp_GetVersionInfo @id=' + o.get('id')
//execute the data via CF.query()
var ret = CF.query("data001",sql)
//return the sql result set to remoting
return ret
}
We are using SQL Server 2000 and ColdFusion MX. The database 'data001' is defined in the CF admin. Passing variables by name is a snap. Simply use the @{name} and use single quotes with stings (same as sql) and your all set. This makes using stored procedures easy.
Special thanks to Dave Gallerizzo at Figleaf for working through fine details to get this working.
Cheers,
ted ;)

0 Responses to “ Stored Procedures in ASR Remoting ”
Post a Comment