Re: SQL Results not the same when run in delphi
- From: "Ian Groves" <ian@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 15 Nov 2006 22:48:37 -0000
Thanks all.
"Viatcheslav V. Vassiliev" <support@xxxxxxxxxxxxxxx> wrote in message
news:4552f02a@xxxxxxxxxxxxxxxxxxxxxxxxx
Jet SQL (used by ADO for Access) and Access SQL are different. Try:
SELECT * FROM Archive WHERE [Job No] LIKE '%05'
i.e. in query change * -> % and " -> '
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Ian Groves" <ian@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ ×
ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ: news:4552e6db$1@xxxxxxxxxxxxxxxxxxxxxxxxx
Why does the folowing in a TADOQuery return no results, yet when I put in
it to an Access query for the owning MDB file it returns results as
expected?
ArchiveQuery.SQL.Text := 'SELECT * FROM Archive WHERE [Job No] Like
"*05"' < Returns nothing from Delphi app, but returns results when run in
access?
ArchiveQuery.SQL.Text := 'SELECT * FROM Archive'; < Returns everything as
expected?
I have tried the Job No field as a Number field and a Text field and I
want it to show any jobs thats end in the number 05
sample data
1005
1006
1004
1105
etc
Many Thanks
Ian Groves
.
- References:
- SQL Results not the same when run in delphi
- From: Ian Groves
- Re: SQL Results not the same when run in delphi
- From: Viatcheslav V. Vassiliev
- SQL Results not the same when run in delphi
- Prev by Date: Transaction problems?
- Next by Date: Re: Connection string - trusted connection
- Previous by thread: Re: SQL Results not the same when run in delphi
- Next by thread: Returning Table names from a sql string
- Index(es):
Relevant Pages
|