Click to See Complete Forum and Search --> : Basic question


yan
05-22-2003, 11:37 PM
Hi all,
I need to call a store procedure in SQL 2000 server using DSN. Does any one has a sample code to show me how to do that? Thanks.

yan
05-25-2003, 10:45 PM
I try to learn how to use the command object. I got this error:
Error Type:
ADODB.Command (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

Here is my code. What is wrong?

dim cn
dim rs
set cn = server.createobject("adodb.connection")
cn.open "DSN=pubs;uid=sa"

set cmd = server.createobject("adodb.command")
cmd.ActiveConnection = cn
cmd.CommandType = text
set rs = cmd.execute(myproc)

yan
05-26-2003, 01:32 AM
The last line is the problem when it try to execute. Thanks

yan
05-26-2003, 11:29 AM
myproc is just a store procedure with select statement to return a recordset. It requires no parameter and works in qerry analyzer. Thanks