Re: SQL Results not the same when run in delphi



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





.



Relevant Pages

  • Re: Reading the definition of a view
    ... OpenSchema with siViews, field is VIEW_DEFINITION + siProcedures, field is ... Vassiliev V. V. ... http://www.oledbdirect.com - The fastest way to access MS SQL Server, ... MS Jet and Interbase ...
    (borland.public.delphi.database.ado)
  • Re: invalid class typecast
    ... >>Vassiliev V. V. ... >>http://www.oledbdirect.com - The fastest way to access MS SQL Server, ... >>MS Jet and Interbase ...
    (borland.public.delphi.database.ado)
  • Re: Access error message. What does this mean?
    ... Viatcheslav V. Vassiliev ... The fastest way to access MS SQL Server, ... MS Jet and Interbase ...
    (borland.public.delphi.database.ado)
  • Re: adAffectCurrent not working
    ... Regards, ... Vassiliev V. V. ... http://www.oledbdirect.com - The fastest way to access MS SQL Server, ... MS Jet and Interbase ...
    (borland.public.delphi.database.ado)
  • Re: MS Access table and field properties
    ... http://www.oledbdirect.com - The fastest way to access MS SQL Server, ... MS Jet and Interbase (through OLEDB) ...
    (borland.public.delphi.database.ado)