problem vbscript in combination with asp

Hi,

Can anyone tell me why this results in an error. When the button is presses I want to update a recordset with ASP and SQL

Please help me
Greetingz



MsgBox "Message Updated!"
UpdateSqlString = "UPDATE Berichten SET Auteur=" & Auteur & " Onderwerp=" & Onderwerp &_
" Berichtje=" & Berichtje & "Website=" & Website & "SchoolId= " & SchoolId &_
" AanmaakDatum=" & AanmaakDatum & "ExpiratieDatum=" & ExpiratieDatum &_
" WHERE product_id=" & pid
SET RS=Con.Execute UpdateSqlString



Comments

  • : Hi,
    :
    : Can anyone tell me why this results in an error. When the button is presses I want to update a recordset with ASP and SQL
    :
    : Please help me
    : Greetingz
    :
    :
    :
    : MsgBox "Message Updated!"
    : UpdateSqlString = "UPDATE Berichten SET Auteur=" & Auteur & " Onderwerp=" & Onderwerp &_
    : " Berichtje=" & Berichtje & "Website=" & Website & "SchoolId= " & SchoolId &_
    : " AanmaakDatum=" & AanmaakDatum & "ExpiratieDatum=" & ExpiratieDatum &_
    : " WHERE product_id=" & pid
    : SET RS=Con.Execute UpdateSqlString
    :
    :

    hi

    there is an error in your SQL statment

    there must be , between the updated fields

    see this
    UpdateSqlString = "UPDATE Berichten SET " & _
    "Auteur='" & Auteur & "'" & _
    " , Onderwerp='" & Onderwerp & "'" & _
    " , Berichtje='" & Berichtje & "'" & _
    " , Website='" & Website & "'" & _
    " , SchoolId='" & SchoolId & "'" &_
    " , AanmaakDatum='" & AanmaakDatum & "'" & _
    " , ExpiratieDatum=" & ExpiratieDatum &_
    " WHERE product_id=" & pid


    try this

    if you donot get it

    try first displaying the statment see if its syntax is correct then try to execute it


Sign In or Register to comment.

Howdy, Stranger!

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

Categories

In this Discussion