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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL DELETE statement problem

Status
Not open for further replies.

VRIT

IS-IT--Management
Sep 2, 2002
60
0
0
GB
Dear all,

I am having a problem with a DELETE statement:

The Table is called EngineerName
The Column\Field I want to delete from is called Engineer Name

The statement which has a problem is:

ED = "DELETE EngineerName WHERE [Engineer Name] = '" & LstEngineers.Text & "'"

I think the error is with the [Engineer Name] but I dont know how to correc it.

Many thanks in advance

VRIT
 
Not sure about SQL but maybe this

ED = "DELETE FROM EngineerName WHERE [Engineer Name] = '" & LstEngineers.Text & "'"
 
Thats for that but it still does not work. I am sure it is to do with the field Engineer Name. It is the only one I have trouble with and its the only one which has a double name(ie Engineer Name) all the others are single names (i.e Location).

Any further ideas welcome.

Thanks

VRIT
 
what does the SQL statment look like after the LstEngineers.Text value has been resolved? (Break on it in debug after the SQL and type ? ED)
 
Gentlemen,

Thanks for your help. I recreated the Engineer table and instead of having 'Engineer Name' as a field I used 'Engineer_Name', that seemed to solve it, so it was something to do with the way [Engineer Name] was entered into the statement.

Thanks anyway.

VRIT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top