BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Strange Semi-Colon in SQL

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Multi-Tier)
View previous topic :: View next topic  
Author Message
Curt
Guest





PostPosted: Tue Mar 02, 2004 7:18 am    Post subject: Strange Semi-Colon in SQL Reply with quote



I am trying to set up a very simple test application to fetch data from a
MySQL database and edit the fetched records in a TDBGrid. I get the message
'You have an error in your SQL syntax.'

I've attached a TSQLMonitor to the connection and it tells me that the
automatically generated SQL is :

update servers; set
port_num = '110'
where
serverNum = '1' and
hostname = 'hostname' and
port_num = '120' and
account_name = 'name' and
account_password = 'pass' and
active = '1'

There is a semi-colon after the 'update servers' clause. I know this is not
valid SQL and is probably causing the problem ? If so, how can I get rid of
it considering that the SQL statement is automatically generated by the
DataSetProvider ?



Back to top
Curt
Guest





PostPosted: Tue Mar 02, 2004 8:10 am    Post subject: Re: Strange Semi-Colon in SQL Reply with quote



Wow! just found out that I had been terminating the SQL command text with a
semi-colon.

"Curt" <a (AT) aol (DOT) com> wrote

Quote:
I am trying to set up a very simple test application to fetch data from a
MySQL database and edit the fetched records in a TDBGrid. I get the
message
'You have an error in your SQL syntax.'

I've attached a TSQLMonitor to the connection and it tells me that the
automatically generated SQL is :

update servers; set
port_num = '110'
where
serverNum = '1' and
hostname = 'hostname' and
port_num = '120' and
account_name = 'name' and
account_password = 'pass' and
active = '1'

There is a semi-colon after the 'update servers' clause. I know this is
not
valid SQL and is probably causing the problem ? If so, how can I get rid
of
it considering that the SQL statement is automatically generated by the
DataSetProvider ?






Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Multi-Tier) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.