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 

Getting SQL Server error

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO)
View previous topic :: View next topic  
Author Message
Emile Petrus Abi-Abib
Guest





PostPosted: Fri Oct 27, 2006 6:31 pm    Post subject: Getting SQL Server error Reply with quote



I am using Delphi 7, ADO and SQL Server 2000. I want know a way to get
all the information about a sql execution error:



Command:

"Select

*

Fr om

Sales

"



Error message:

"Server: Msg 170, Level 15, State 1, Line 3
Line 3: Incorrect syntax near 'Fr'."



When the error occurs, Delphi generates an exception (EDatabaseError),
witch gives-me only a message "Line 3: Incorrect syntax near 'om'."



Emile Petrus
Back to top
Brian Hollister
Guest





PostPosted: Fri Oct 27, 2006 6:36 pm    Post subject: Re: Getting SQL Server error Reply with quote



The error your getting is right, you have a space in the keyword FROM.
However, if you want more you can always checks the Errors collection.

hth,

brian

--
Got a big event coming up? Let us
help coordinate your event. For more
visit www.kissemgoodbye.com
"Emile Petrus Abi-Abib" <emile (AT) think (DOT) com.br> wrote in message
news:45420a22 (AT) newsgroups (DOT) borland.com...
Quote:
I am using Delphi 7, ADO and SQL Server 2000. I want know a way to get
all the information about a sql execution error:



Command:

"Select

*

Fr om

Sales

"



Error message:

"Server: Msg 170, Level 15, State 1, Line 3
Line 3: Incorrect syntax near 'Fr'."



When the error occurs, Delphi generates an exception (EDatabaseError),
witch gives-me only a message "Line 3: Incorrect syntax near 'om'."



Emile Petrus











Back to top
Emile Petrus Abi-Abib
Guest





PostPosted: Sat Oct 28, 2006 2:10 am    Post subject: Re: Getting SQL Server error Reply with quote



Thanks for the answer.



I know that sql command has an error. This error is an example to get the
exception.

But the errors collection (ADOConnection.Erros) helps me a lot.


"Brian Hollister" <bhollisterATfuturaintlDOTcom> escreveu na mensagem
news:45420b50$1 (AT) newsgroups (DOT) borland.com...
Quote:
The error your getting is right, you have a space in the keyword FROM.
However, if you want more you can always checks the Errors collection.

hth,

brian

--
Got a big event coming up? Let us
help coordinate your event. For more
visit www.kissemgoodbye.com
"Emile Petrus Abi-Abib" <emile (AT) think (DOT) com.br> wrote in message
news:45420a22 (AT) newsgroups (DOT) borland.com...
I am using Delphi 7, ADO and SQL Server 2000. I want know a way to
get
all the information about a sql execution error:



Command:

"Select

*

Fr om

Sales

"



Error message:

"Server: Msg 170, Level 15, State 1, Line 3
Line 3: Incorrect syntax near 'Fr'."



When the error occurs, Delphi generates an exception
(EDatabaseError),
witch gives-me only a message "Line 3: Incorrect syntax near 'om'."



Emile Petrus













Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (ADO) 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.