PDA

Click to See Complete Forum and Search --> : STORED PROCEDURES IN ADO


mena
Sep 24th, 1999, 12:33 AM
Hi Everyone,

I am trying to execute a stored procedure on sql server, here is my stored procedure and my code:

PROCEDURE PROC1 AS lmsg1 VARCHAR2(80);
BEGIN
lmsg1:='TEST1';
INSERT INTO TABLE1 VALUES ('DONE.', l_err_msg, 'PROC1', SYSDATE);
COMMIT;
END;

Here is my code:
Dim cm As New ADODB.Command
Dim rs As New ADODB.Recordset

cm.ActiveConnection = db
cm.CommandType = adCmdStoredProc
cm.CommandText = "PROC1"
cm.CommandTimeout = 15

rs.CursorType = adOpenStatic
Set rs = cm.Execute()
end sub

I am getting an error "Type mismatch" can someone help me or give a hint?

JHausmann
Sep 24th, 1999, 02:42 AM
Not too sure but don't you need to have the value being passed in the command line or in an array ?


If so, shouldn't

'cm.CommandText = "PROC1"'

be

'cm.CommandText = "PROC1("parameter data")"