![]() |
|
|
+ Search |
![]()
|
Jul 23rd, 2000 05:39
unknown unknown, Ian Bretteville-Jensen
This code isn't perfect, but will give you an idea!
Set Conn = Server.CreateObject("ADODB.Connection")
strConn = "DSN=name;UID=username;PWD=password"
Conn.Open strConn
Set objCmd = Server.CreateObject("ADODB.Command")
objCmd.CommandText = "nameofproceduregoeshere"
objCmd.CommandType = adCmdStoredProc
Set objCmd.ActiveConnection = Conn
Set objParam = objCmd.CreateParameter("@ParamerName", _
parametertype, direction, size, value(or passed value)
objCmd.Parameters.Append objParam
Set rst = objCmd.Execute()
The returned recordset is now stored in rst.
You can store as many parameters as you stored proc needs by continuing
to set new parametrs and appending them to the to objParam.
© 1999-2004 Synop Pty Ltd