Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Syntax error in SQL statement

3 views
Skip to first unread message

Gabor Borbely

unread,
Sep 28, 2000, 3:00:00 AM9/28/00
to
Hi,

I get this SQL error statement:

INSERT INTO Members (FamilyName, GivenName, City, Street, ZIP, Country,
Email, Password, QuestionForget, AnswerForget, BirthDate, DayPhone,
CellPhone, EveningPhone, Favorite, Interest, BrowserType,
RemoteComputerName, UserName, TimeStamp) VALUES (''Borbély'', ''Gábor'',
''Las Vegas'', ''8220 Ocean Gate Way'', ''89128'', ''HUN'',
''bor...@yahoo.com'', ''0902'', ''Mothers name'', ''kolya'',
''1962.Január.1'', ''7022403082'', ''EMPTY'', ''EMPTY'', ''000000000000'',
''11000000'', ''EMPTY'', ''EMPTY'', ''EMPTY'', ''9/28/00 3:43:36 PM'')
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO
statement.

/_scripts/application.asp, line 98

Funny thing is, if i ran this with ''Mothers name?'' instead of ''Mothers
name'' I have got a totally different error message in the same line:

COUNT field invalid

Any ideas?

Chad Myers

unread,
Sep 28, 2000, 3:00:00 AM9/28/00
to
Don't use ''blah'' use 'blah'. Try that, see if it
works.

-Chad

"Gabor Borbely" <bor...@yahoo.com> wrote in message
news:e4d8$KZKAHA.256@cppssbbsa04...

Gabor Borbely

unread,
Sep 28, 2000, 3:00:00 AM9/28/00
to

Tx, Chad. I have tried that, I have got a third wierd message. I will
reproduce it soon and post it here. Maybe you have some other ideas?
Tx
"Chad Myers" <cmy...@NOSPAM.austin.rr.com> wrote in message
news:#8y12MZ...@cppssbbsa02.microsoft.com...

Gabor Borbely

unread,
Sep 28, 2000, 3:00:00 AM9/28/00
to

Here we go with the try:

INSERT INTO Members (FamilyName, GivenName, City, Street, ZIP, Country,
Email, Password, QuestionForget, AnswerForget, BirthDate, DayPhone,
CellPhone, EveningPhone, Favorite, Interest, BrowserType,
RemoteComputerName, UserName, TimeStamp) VALUES ('Borbély', 'Gábor', 'Las
Vegas', '8220 Ocean Gate Way', '89128', 'HUN', 'bor...@yahoo.com', '0902',

'Mothers name', 'kolya', '1968.Január.1', '7022403082', 'EMPTY', 'EMPTY',
'000000000000', '11000000', 'EMPTY', 'EMPTY', 'EMPTY', '9/28/00 6:04:06 PM')


Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO
statement.

/_scripts/application.asp, line 98

NOW, it gave the same error with a single ' like in the other case with a
double '' (this is the same character twice, as you sure recognized).
Please, help. Any idea?

Jimbo

unread,
Sep 28, 2000, 3:00:00 AM9/28/00
to
your text variables should be ' " & textvariable & " ' your numeric
should be " & numericvariable & "
and your date as # datestuff #.........hope this helps

"Gabor Borbely" <bor...@yahoo.com> wrote in message

news:umpSRDa...@cppssbbsa02.microsoft.com...

Chad Myers

unread,
Sep 28, 2000, 3:00:00 AM9/28/00
to
It sounds like you're not putting the correct types into the
fields.

Are all those fields of type char (or varchar, etc) and/or
datetime?

The only other thing I can think of is that the extended characters
like 'é' might be causing problem.

Gabor Borbely

unread,
Sep 28, 2000, 3:00:00 AM9/28/00
to

Tx Jimbo, Tx Chad.

Everything is a textbox input converted with Cstr() to be string. There are
no other types that I (intentionaly) use here...
I am also suspicious about international characters, but since this has to
run in Central European characterset, I wonder, what the heck can I set,
other than the default language of the HTML, the form is on.
Any further ideas?

Tx, guys.

S. Hoogstad

unread,
Sep 29, 2000, 3:00:00 AM9/29/00
to
Try adding a " before and after all your values like this: .... VALUES
(""Borbély",........"9/28/00 3:43:36 PM"")

Hope this helps

Bye the way: you says that a " is twice a '.
Maybe for you it, but for your computer it isn't.

Suzanne Hoogstad

Gabor Borbely

unread,
Sep 29, 2000, 3:00:00 AM9/29/00
to
Tx Suzanne the input. I don't clearly see what we are gonna accomplish with
adding a " sign before and after the already quoted field values. The thing
is, that Microsoft suggested to use a single apostrof (') for the Values
list inside the brackets. Then in another article they claimed, that it is
better to double quote values, than can have @, / and other special
characters. That is exactly what I did. I single quoted them when composing
the string and then let this go through a function that doubles every single
'.
Now, having said this, you probably don't think, that I don't know the
difference between Chr(39) and Chr(34), do you?

Any other ideas?

Tx Gabor
"S. Hoogstad" <shoo...@ntnt.nl> wrote in message
news:uXRlzKg...@cppssbbsa02.microsoft.com...

S. Hoogstad

unread,
Oct 2, 2000, 3:00:00 AM10/2/00
to

For one, i'm just trying to help you. If " is the same as 2x ' they
wouldn't be an extra button on your keyboard for it, you would just type
twice a ' and you would have the same.

Second: 2x Chr(39) is not the same as a Chr(34). In your statement you must
type a " (chr 34) and not '' (2x chr 39). For your eye is almost the same,
but you computer tinks otherwise. You can at least try.


"Gabor Borbely" <bor...@yahoo.com> wrote in message

news:#TPWZHlKAHA.278@cppssbbsa05...

Luigi Bennardi

unread,
Oct 4, 2000, 3:00:00 AM10/4/00
to

Hi,

Your answer is here : Q190742

Luigi

Gabor Borbely

unread,
Oct 5, 2000, 3:00:00 AM10/5/00
to

Tx, I have solved this, but I will check your info out anyway. Tx again
Luigi
"Luigi Bennardi" <luigi.b...@discreet.com> wrote in message
news:eIeBTog...@cppssbbsa02.microsoft.com...
0 new messages