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 

URGENT : Can't access to numerial fields with the adoquery c

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
tuxim
Guest





PostPosted: Sun May 30, 2004 9:54 am    Post subject: URGENT : Can't access to numerial fields with the adoquery c Reply with quote



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