Re: Getting SQL Server error



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@xxxxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxx> wrote in message
news:45420a22@xxxxxxxxxxxxxxxxxxxxxxxxx
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
















.



Relevant Pages

  • Multiple Catches in Try/Catch
    ... I want to execute a SQL command and if it times out I want ... Catch ex as Exception ... Exit Function ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Why isnt ADOExpress throwing an exception on error?
    ... What i don't understand is why the same errorlevel causes an exception to ... the Errors collection so all errors are surfaced. ... Brian Bushay (TeamB) ...
    (borland.public.delphi.database.ado)
  • Re: Closing recordset generates exception
    ... This routine should ... Just during test/development phase I ran ... into this exception and couldn't explain this 'Close exeption' ... Have you examined the errors collection off your Conn object? ...
    (microsoft.public.data.ado)
  • Re: Error Question
    ... i dont know how to check the type of exception in my ... messageformat() Method ... Errors Collection in SqlException ...
    (microsoft.public.dotnet.languages.csharp)
  • Error Question
    ... i dont know how to check the type of exception in my ... messageformat() Method ... Errors Collection in SqlException ...
    (microsoft.public.dotnet.languages.csharp)