Click to See Complete Forum and Search --> : Basic question
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.
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)
The last line is the problem when it try to execute. Thanks
myproc is just a store procedure with select statement to return a recordset. It requires no parameter and works in qerry analyzer. Thanks