Can't access to numerial fields using adoquery ...

From: tuxim (no_spam_at_no_spam.org)
Date: 05/30/04


Date: Sun, 30 May 2004 12:28:54 +0200

I have posted this message before in several delphi news boards but never
got any answer (help) to resolve the problem. I can't continue my work
without resolving this problem, with is quit frustrating for me. Please,
can sombody help me ?

I'm working with Delphi 6 (SP2).

I can't access to any numerical fields in my Access 2000 database via ADO.

The following query (text value) works fine :

ADOQuery1.Sql.Add('select * from DOSSIER');
ADOQuery1.Sql.Add('where DOS_EMPR_PRENOM = "' +'Maria' +'"');
try
  ADOQuery1.Open;

but the next query (numerical value) generates an error message during the
excecution:

ADOQuery1.Sql.Add('select * from DOSSIER');
ADOQuery1.Sql.Add('where DOS_ID = "' +'10' +'"');
try
  ADOQuery1.Open; //Generates error message

ERROR MESSAGE:
Project Datamanager.exe raised exception class EOleException with message
'Incompatible data type in the criteria expression'. Process stopped. Use
Step or Run to continue.

Whats wrong in the second query?

Complementary informations :
DOS_EMPR_PRENOM is Text type (visual Basic .mdb file)
DOS_ID is long integer type (visual Basic .mdb file)

Thanks for helping.



Relevant Pages

  • sql ADOQuery problem with access 2000 database .mdb
    ... I have posted this message before on other delphi news boards but never got ... The following query works fine: ... ADOQuery1.Open; //Generates error message ... DOS_EMPR_PRENOM is Text type (visual Basic .mdb file) ...
    (borland.public.delphi.database.ado)
  • Re: Cant access to numerial fields using adoquery ...
    ... > I have posted this message before in several delphi news boards but never ... > got any answer to resolve the problem. ... > ERROR MESSAGE: ...
    (comp.lang.pascal.delphi.misc)
  • Generic host process for win32 services error message
    ... on for the first time I receive the "Generic host process for win32 services ... error message. ... tried everything I can think of to resolve this problem with no luck. ... Mike Miller ...
    (microsoft.public.windowsxp.help_and_support)
  • Disk is full-too many files open” error message
    ... I?m trying to resolve an issue where the student encounters the ?Disk ... error message when attempting to ... Clearing clipboard did not resolve issue. ...
    (microsoft.public.word.pagelayout)
  • Generic host process for win32 services error message
    ... has a HP Laserjet 4100 printer and seiko lable printer series 100 connected ... on for the first time I receive the "Generic host process for win32 services ... error message. ... tried everything I can think of to resolve this problem with no luck. ...
    (microsoft.public.windowsxp.general)