Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2006

    Unanswered: Sql Insert Syntax Error

    Hi guys,

    I have encountered an error while inserting the records to MS Acess using Visual basic. I tried to insert the records to the database by executing an sql query with a where clause. This 'where' condition is needed because i need to match the corresponding records from my drop-down combo box. However, when it its executed there is a syntax error indicating missing semi-colon

    My sql query goes:
    insert into [TableName] (field1, field2, field3) values (textBox1, textBox2, textbox3) where field4 = combo1;

    Error: missing semi-colon

    Any assistance or code reference is very much appreciated
    Thanks in advance!

  2. #2
    Join Date
    Dec 2002
    Préverenges, Switzerland
    filed1, field2, field3, field4 are what datatypes in the table?

    currently using SS 2008R2

  3. #3
    Join Date
    Jul 2004

    where in an insert-statement? are you sure?

    using sql since 1990 i have never seen insert and where together. are you sure that you not want to *update* records depending on field4? Sorry for the question. Could you please post some more information, then i will do my very best to helpy you.

Posting Permissions

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