Database storedProc()
syntax: |
database.storedProc(procName) |
where: |
procName - String specifying the name of a stored procedure or SQL statements with parameters.
|
return: |
object - new Stproc object.
|
description: |
This method creates a stored procedure object (Stproc) from either the named stored procedure contained within the Database object, or from the passed-in SQL statement.
|
see: |
#link <sedbc>, Stproc object, Database procedures(), Database procedureName()
|
example: |
// this example create a new database, //and then executes // a stored procedure contained within var db = new Database; db.connect(DBEngine, DataSource, User, Password); var sp = db.storedProc("SomeProc"); sp.ItemID = 123; sp.execute();
// now, execute an SQL Stproc sp = db.storedProc("delete from Items where Weight = ?" ); sp[0] = 1000; sp.execute();
// clean up sp.close(); db.close(); |