Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Insert into Syntax error?

Insert into Syntax error?

Scheduled Pinned Locked Moved Database
helpdatabasetutorialquestionannouncement
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mikhaelb
    wrote on last edited by
    #1

    I have an application the adds records to an MS Access database. When the DataAdaptor.update command is issued I get a Syntax error in insert into statement. I am using command builder and only get the error on one table. That table has two fields which are the problem. They are called "Password" and "Usergroup." If I rename the fields it works without any problem. So why not just rename them? Simple right. No, the database is used by another application and chances of getting it changed is slim at best. Any ideas as to how to work around this? Any help would be greatly appreciated. Mike :((

    C 1 Reply Last reply
    0
    • M mikhaelb

      I have an application the adds records to an MS Access database. When the DataAdaptor.update command is issued I get a Syntax error in insert into statement. I am using command builder and only get the error on one table. That table has two fields which are the problem. They are called "Password" and "Usergroup." If I rename the fields it works without any problem. So why not just rename them? Simple right. No, the database is used by another application and chances of getting it changed is slim at best. Any ideas as to how to work around this? Any help would be greatly appreciated. Mike :((

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      mikhaelb wrote: I am using command builder :eek: X| See MSDN: Weaning Developers from the CommandBuilder[^]


      Do you want to know more?


      Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.

      J 1 Reply Last reply
      0
      • C Colin Angus Mackay

        mikhaelb wrote: I am using command builder :eek: X| See MSDN: Weaning Developers from the CommandBuilder[^]


        Do you want to know more?


        Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.

        J Offline
        J Offline
        jlawren7
        wrote on last edited by
        #3

        Password is a reserved word Can't use it

        C 1 Reply Last reply
        0
        • J jlawren7

          Password is a reserved word Can't use it

          C Offline
          C Offline
          Colin Angus Mackay
          wrote on last edited by
          #4

          Then how is it used by the other application? I don't use Access but, maybe it permits escaping of column names with square brackets. e.g. [Password]


          Do you want to know more?


          Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups