Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

call update stored procedure in vb

I have an update stored procedure to update 19 columns and when I run it in my VB program I get the run time error :
-2147217900[microsft][odbc sql server driver][sql server]Line1: incorrect syntax nera '12345'.

adoConnection.Execute "TEST_UPDATE('" & Text1.Text & "','" & Text2.Text & "','" & Text3.Text & "','" & Text4.Text & "','" & Text5.Text & "','" & Text6.Text & "')"

I tested the other stored procedure using a six column table it worked ok. Now what am I doing wrong.

Thank you.
Help urgently needed.

Comments

  • hhcamiglahhcamigla Member Posts: 31
    : I have an update stored procedure to update 19 columns and when I run it in my VB program I get the run time error :
    : -2147217900[microsft][odbc sql server driver][sql server]Line1: incorrect syntax nera '12345'.
    :
    : adoConnection.Execute "TEST_UPDATE('" & Text1.Text & "','" & Text2.Text & "','" & Text3.Text & "','" & Text4.Text & "','" & Text5.Text & "','" & Text6.Text & "')"
    :
    : I tested the other stored procedure using a six column table it worked ok. Now what am I doing wrong.
    :
    : Thank you.
    : Help urgently needed.
    :


    TRY THIS CODE

    adoConnection.Execute "EXEC TEST_UPDATE '" & Text1.Text & "','" & Text2.Text & "','" & Text3.Text & "','" & Text4.Text & "','" & Text5.Text & "','" & Text6.Text & "' "


  • PhokojoePhokojoe Member Posts: 10
    : : I have an update stored procedure to update 19 columns and when I run it in my VB program I get the run time error :
    : : -2147217900[microsft][odbc sql server driver][sql server]Line1: incorrect syntax nera '12345'.
    : :
    : : adoConnection.Execute "TEST_UPDATE('" & Text1.Text & "','" & Text2.Text & "','" & Text3.Text & "','" & Text4.Text & "','" & Text5.Text & "','" & Text6.Text & "')"
    : :
    : : I tested the other stored procedure using a six column table it worked ok. Now what am I doing wrong.
    : :
    : : Thank you.
    : : Help urgently needed.
    : :
    :
    :
    : TRY THIS CODE
    :
    : adoConnection.Execute "EXEC TEST_UPDATE '" & Text1.Text & "','" & Text2.Text & "','" & Text3.Text & "','" & Text4.Text & "','" & Text5.Text & "','" & Text6.Text & "' "
    :
    :
    : Thank you.
    It has worked even though I get something strange but I think I am working in that because, It sorts of move some fields to the wrong destination e.g. the entry in text1.text is moved to say 2nd in the table that was to be taken by text2.text.

    The other thing is, I am not sure wherether is my stored procedure or what, I get the message that a certain parameter is not supplied and it is expected, like If I have 6 columns , it will complain that @A5 is not supplied but all the parameters are supplied.

    Any idea why this is so.

    It is snowing in my country as it is winter, I better get home early since I am not driving.

    Hope to hear from you.

    Ta!

Sign In or Register to comment.