Jump to content

Jet SQL Missing Semicolon?

- - - - -

  • Please log in to reply
3 replies to this topic

#1
reed

reed

    Newbie

  • Members
  • PipPip
  • 15 posts
Instead of inserting 170000 records into my database individually, I decided to try 100 at once. (Would it be beneficial to do even more at once? Say...1000?)

I keep getting the "Missing semicolon (;) at end of SQL statement" error when it gets to ExecuteNonQuery();, but there IS a semicolon at the end.

What's going on?

My syntax is "INSERT INTO [TABLE](field1,field2,...,fieldn) VALUES (1,2,...,n),(1,2,...,n),...,(1,2,...,n);"



Thanks in advance.

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
Jet may not support that syntax, and only allow one record to be inserted at a time.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
reed

reed

    Newbie

  • Members
  • PipPip
  • 15 posts

WingedPanther said:

Jet may not support that syntax, and only allow one record to be inserted at a time.

That's not what I wanted to hear. Before I build too much upon this Jet/Access thing I have going...Is there a more efficient/faster way of doing my database transactions?? Right now, it's coming out to about 2 1/2 minutes submitting 100,000 records and hogging 13% of my i7 processor along with 100Mb of ram...not ideal if I want to avoid locking up older (less capable) systems.

I've heard that using SQL is slow...so what's better?

#4
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
Access is generally viewed as a "toy" database by those who work with databases on a regular basis. I would suggest using something more robust, such as MySQL, Firebird, or one of the paid databases.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users