Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple SQL Delete

Status
Not open for further replies.

Greysloth

Programmer
Joined
Feb 17, 2005
Messages
3
Location
CA
I'm really new to MS ACCESS.

I'm trying to build an SQL query string to run from Delphi and am having problems making it run.

This is the string I build

'Delete from JOB where (("JOB_ID"='+string(tsJob.Cell[6,x])+'))';

which ends up looking like this

Delete from JOB where (("JOB_ID"=12))

now JOB_ID is an AUTONUMBER in JOB

I keep getting "Data type mismatch in criteria expression" when I run the query.

Any help is appreciated.
 
The string should be:
Delete from JOB where JOB_ID=12


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
That did it, thank you.

I got the version I had from trying to build it in MS Access and looking at their SQL version.
 
That did it, thank you.

I got my version from trying to build it in MS Access and looking at their SQL version.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top