Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004
    Posts
    2

    Post Unanswered: Error:[Sybase][ODBC Driver]Invalid parameter type

    Hi,
    I am using VB6 ADO 2.7 and Sybase ASA 8.0.2
    I am getting this error on second iteration of the following 'For loop':

    Dim cmd As New ADODB.Command
    cmd.ActiveConnection = Payrollcon
    cmd.CommandType = adCmdStoredProc
    cmd.CommandText = "spUpdBBDetails"

    For i = 0 To SSDBGrid.Rows - 1

    cmd.Parameters.Append cmd.CreateParameter("RetValue", adInteger, adParamReturnValue)
    cmd.Parameters.Append cmd.CreateParameter("BCd", adChar, adParamInput, 5, Trim(Me.SSDBGrid.Columns("BCode").Value))
    cmd.Parameters.Append cmd.CreateParameter("BrnCd", adChar, adParamInput, 5, Trim(Me.SSDBGrid.Columns("BnCode").Value))
    cmd.Parameters.Append cmd.CreateParameter("Add1", adChar, adParamInput, 50, Trim(.Columns("Address 1").Value))
    ................
    cmd.Execute

    Next

    and Stored Proc Code is:

    CREATE PROCEDURE DBA."spUpdBBDetails"
    (IN BCd char(5), IN BrnCd char(5), IN Add1 char(50),
    IN Add2 char(50), IN Add3 char(50), IN PostCd char(8),
    IN Cty char(30), IN Ste char(30))
    ON EXCEPTION RESUME
    BEGIN
    DECLARE res CHAR(5);
    UPDATE BBrnDetails SET [Address 1]=Add1,
    [Address 2]=Add2, [Address 3]=Add3, [Post Code]=PostCd,
    [City]=Cty, [State]=Ste
    WHERE [BCode]=BCd AND [BrnCode]=BrnCd;
    SELECT @res=SQLCODE;
    if @res = 0 then
    return(0);
    else
    return(99);
    end if
    END

    Thanks...
    Please help me how to solve this error...
    Last edited by murali15; 06-18-04 at 08:27.

  2. #2
    Join Date
    Mar 2004
    Location
    www.scirocco.ca
    Posts
    346
    What is the error message you are getting?
    http://www.scirocco.ca/images/banner...occobanner.gif

    Download for FREE the ADO/DAO Data Controls that makes life EASIER developing database applications in: VB, FoxPro, Access, VC++, .NET etc... Navigate, Add New, Delete, Update, Search, Undo and Save your changes. Supports Disconnected Recordsets and Transactions!

    Or try our Ask An Expert service to answer any of your questions!

  3. #3
    Join Date
    Jun 2004
    Posts
    2

    Error:[Sybase][ODBC Driver]Invalid parameter type

    HI,

    I am getting error like this:

    Error:[Sybase][ODBC Driver]Invalid parameter type


    Thanks..

Posting Permissions

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