Syntax Error in INSERT INTO statement

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shamalxp
    New Member
    • Feb 2009
    • 3

    #16
    Hi Plater,
    I'm happy about the quick response. I changed the item(1) into item("username" ) and item(2) into item("password" ). which are exactly correct as the database.
    still no chance.

    Comment

    • Plater
      Recognized Expert Expert
      • Apr 2007
      • 7872

      #17
      Well like the previous person before you, I don't see where you assign the Update and Insert commands to your DataAdapter.

      Comment

      • Jetean
        New Member
        • Feb 2008
        • 33

        #18
        Originally posted by Plater
        Well like the previous person before you, I don't see where you assign the Update and Insert commands to your DataAdapter.
        Actually You don't need to assign the update or insert commnad. I read it some where in MSDN. I can't recall where.

        My code work (C#), my problem occured with the connection string and the actual database (debug or release).

        Try this: Create your DataAdapter and Command Builder earlier in your code before you fill the Dataset. Go and Check where is the Database located. You might look at the wrong database (depending on the connection string ).

        Comment

        • shamalxp
          New Member
          • Feb 2009
          • 3

          #19
          Guys, I found a solution at last. Thanks for all the replies. and specially Plater.

          Amazingly, the fault in my program was to include a column name 'password'. When I changed it to 'pass' the whole program is working. I think the 'password' clashes with another attribute in the INSERT INTO command.

          thanks to crow_w in http://www.daniweb.com/forums/thread173074.html

          Comment

          • kudomt
            New Member
            • Apr 2013
            • 1

            #20
            Hi guys !

            Like shamlxp said, I had a same problem before, then I google, I found (but I forgot where is it) that they said may be datatype is not compatible.
            In my issue any other (except field password) values were OK, just field password was not OK. then I tried to another name, and ... surprised, it was work good !

            That's my experienced I want to share with you guys !
            Thanks for reading !

            Update : this is link I found : http://stackoverflow.com/questions/1...o-an-access-db (you can check Answered mark post)
            Last edited by kudomt; Apr 30 '13, 11:34 PM. Reason: add link

            Comment

            Working...