home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Join TechIMO for Free!
Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
Reply Get bargains at  »  Dealighted.com
 
Thread Tools
Currently Active Users: 3106
Discussions: 188,376, Posts: 2,243,444, Members: 232,604
Old May 21st, 2002, 11:05 PM   Digg it!   #1 (permalink)
Banned
 
qball's Avatar
 
Join Date: Oct 2001
Posts: 447
INSERT INTO syntax error in MS Access

Not a big fan of access, anyway...

Have the following table, named table1

col1 named string1 text datatype
col2 named integer1 number (long integer) datatype

Try the following SQL statement:

INSERT INTO table1 (string1, integer1) VALUES ("access sucks", 45);

Get "syntax error in INSERT INTO statement" when I attempt to run in Access (query design mode) and through java client, so I doubt the jdbcodbc driver issue.

Any ideas, or does Access just blow?

qball is offline   Reply With Quote
Old May 21st, 2002, 11:50 PM     #2 (permalink)
Senior Member
 
Join Date: Oct 2001
Location: Alberta, Canada
Posts: 563
hhmm, well, you probably tried it, but first thing to mind is to try using single quotes instead of double quotes... next I'd check to see if the string being entered isn't too long for the field in the db. ...surely you have double-checked the spelling of field names??

anyways, g'luck... I'll try to check back later and see how it goes...

^hyd^ is offline   Reply With Quote
Old May 22nd, 2002, 01:53 AM     #3 (permalink)
Senior Member
 
Join Date: Oct 2001
Location: Alberta, Canada
Posts: 563
OMG!!!

ok, re-read your post, and recreated exact same, threw your query in via sql-view in the query editor. didn't work... "syntax error in Insert..." blah blah... and it highlighted 'integer1'.

so, changed everything to 'finteger1' and no prob!! back to 'integer1', error... then tried '_integer1', worked fine again... it appears that you can't name a field 'integer1'... go figure...

anyways, g'nite...

^hyd^ is offline   Reply With Quote
Old May 22nd, 2002, 02:19 AM     #4 (permalink)
Banned
 
qball's Avatar
 
Join Date: Oct 2001
Posts: 447
omg back at you? lol

good try. and helpful,thanks but,

[bigbut]
I'm, basically an access idiot, and can get to Java error.
tired and will try "better", later
[/bigbut]

thanks. mo later...
qball is offline   Reply With Quote
Old May 22nd, 2002, 06:30 PM     #5 (permalink)
Banned
 
qball's Avatar
 
Join Date: Oct 2001
Posts: 447
^hyd^,

It was the name of the fields, that caused the problem, though the original names fit the naming conventions, from access help file:

Quote:
Can be up to 64 characters long.

Can include any combination of letters, numbers, spaces, and special characters except a period (.), an exclamation point (!), an accent grave (`), and brackets ([ ]).

Can't begin with leading spaces.

Can't include control characters (ASCII values 0 through 31).
...

When you name a field, control, or object, it's a good idea to make sure the name doesn't duplicate the name of a property or other element used by Microsoft Access; otherwise, your database can produce unexpected behavior in some circumstances.
A good example of why Access IS NOT a real DB.
qball is offline   Reply With Quote
Old May 22nd, 2002, 09:53 PM     #6 (permalink)
Ultimate Member
 
Join Date: Oct 2001
Posts: 21,017
lol qball, I agree.. I hate Access
Good call hyd, I never would of that of that
vass0922 is online now   Reply With Quote
Old May 22nd, 2002, 10:47 PM     #7 (permalink)
Senior Member
 
Rhino's Avatar
 
Join Date: Oct 2001
Posts: 552
Dude, you mean Qball actually needs help sometimes? I thought he knew it all. LOL

Anyways, I would try changing the query type in Acess to an update query if you haven't changed it. It will be on Select query by default, although you think it would be smart enough to read the SQL and change the Query.
__________________
It's like that, and it's like this....
Rhino is offline   Reply With Quote
Old May 23rd, 2002, 01:08 AM     #8 (permalink)
Banned
 
qball's Avatar
 
Join Date: Oct 2001
Posts: 447
Quote:
Dude, you mean Qball actually needs help sometimes?...
qball, needs help, all the time! (email money),lol.

btw, am I, both the subject and participle of that sentence, nevermind.

Anyway, the INSERT INTO syntax using reserved words STARTING column names in Access, is my bad, thanks already given.

What I was doing was a simple benchmark test. Something I've done before, fairly easily...

Ok, connect to DB.
Insert 100000 rows of a variety of datatypes. (hundred thou, 100k, iffin don't wanna count zero)
Report results.

Access CAN do 10000 in 38 secs, pathetic...

That's 10 thou.
qball is offline   Reply With Quote
Old May 23rd, 2002, 01:37 AM     #9 (permalink)
Senior Member
 
Rhino's Avatar
 
Join Date: Oct 2001
Posts: 552
What pc setup are you using? That could have something to do with it. I may give it a try.
Rhino is offline   Reply With Quote
Old May 23rd, 2002, 05:56 AM     #10 (permalink)
Ultimate Member
 
Join Date: Oct 2001
Posts: 21,017
Can you give us the results against maybe MySQL and SQL Server? Maybe even Oracle?

Well in Access's (coughcough bleh chokechoke) defense, its not meant to be a scalable database, just something for fairly small databases with not to many users
That also depends on what kind of indexes you have on the tables, too many and it'll slow things down
vass0922 is online now   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Most Active Discussions
Is It Just Me? (2882)
The United States Debt (20)
Looks like Burris will get his Sena.. (7)
I think I just killed my computer w.. (24)
Upgrading RAM (5)
Folderchat Weekday thread (438)
Antec 300 bulk purchase? (11)
Worth the upgrade?? (14)
Titan quest and Immortal Throne, an.. (17)
Recent Discussions
New Build ( Finally ) (0)
MSN Hotmail Down??? (7)
Folderchat Weekday thread (438)
Help with an Ati Radeon HD 4850.. (23)
Laptop waking up itself (0)
CPU wont boot (3)
Best digital camera for under 2.. (13)
Building first computer, will t.. (2)
get this error, "res://C:\.. (73)
Blackberry Storm, Gears of War .. (1)
Core 2 Quad Q9550 system (3)
COWBOOM Ripoff! Used Laptop w/$.. (4)


All times are GMT -4. The time now is 07:50 PM.
TechIMO Copyright 2008 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28