shraddha_brains
asked on
Reading Excel data conditionally using ADO
I m tring to read data from an excel sheet conditionally. for eg i want to read all fields from the excel sheet where the date is '4/4/2004' or may be greater than or lesser than that date . I am unable to do so.
I m using ADO.
the query i m using is "select * from [ESTROCIT$] where oc_no=38 and oc_dt = '4/12/2004'"
but the error i get is "Microsoft JET Database Engine (0x80040E07)
Data type mismatch in criteria expression."
could ne one give me ne pointers?
I m using ADO.
the query i m using is "select * from [ESTROCIT$] where oc_no=38 and oc_dt = '4/12/2004'"
but the error i get is "Microsoft JET Database Engine (0x80040E07)
Data type mismatch in criteria expression."
could ne one give me ne pointers?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks zastil. the answer seems so easy. :-) my code now works fine
HI slim shaneey, thanks for ur thoughful answer. i did check accordingly and things were all right. ne ways the code worked fine with zastil's suggestion.
thanks all.
HI slim shaneey, thanks for ur thoughful answer. i did check accordingly and things were all right. ne ways the code worked fine with zastil's suggestion.
thanks all.
Try this first to see if you get the error:
"select * from [ESTROCIT$] where oc_no=38"
then
"select * from [ESTROCIT$] where oc_no='38'"
etc, extend it up then to see if it is the date...