Results 1 to 2 of 2

Thread: STORED PROCEDURES IN ADO

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 1999
    Posts
    3

    Post

    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?

  2. #2
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105

    Post

    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")"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width