|
-
Aug 11th, 2000, 09:58 AM
#1
Thread Starter
Fanatic Member
I am trying to invoke a stored proc with parameters
.. Here is the stored proc
-----------
CREATE PROCEDURE AppreciateYourHelp (@ok integer,
@help varchar(255), @please smallint) WITH RECOMPILE AS
BEGIN
INSERT INTO mytbl(ok,help,finedate,please,mystat)
VALUES (@ok,@help,getdate(),@please,0)
SELECT @@IDENTITY
END
-------
I am hoping to get the @@IDENTITY value returned to me
Here is the VB CODE...
/* Note the following is a function to which I am passing
/* the stored proc concatenated with its arguments in a
/* string variale similar to this:
Argument = "AppreciateYourHelp (" & _
intval & "," & _
"name" & ",0)"
Dim rs As New ADODB.Recordset
Dim ArgConn as new ADODB.Connection
With rs
.CursorLocation = adUseClient 'Need 2 return recordset
.Open Argument, ArgConn,
adOpenStatic , adLockReadOnly, adCmdStoredProc
End With
What's wrong with this?
I should be able to say at this point
x = rs(0)
to get my identity value
but I am getting an error:
but my connection keeps failing on the .open
Can't we pass a stored proc together with its arguments
to a .open????
Help is appreciated
Thanks in advance
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|