View Single Post
  #7 (permalink)  
Old March 23rd, 2006, 01:13 PM
Jeff Mason Jeff Mason is offline
Friend of Wrox
 
Join Date: Jun 2003
Location: Hudson, MA, USA.
Posts: 839
Thanks: 0
Thanked 1 Time in 1 Post
Default

This statement:

    Dim strSelect As String = "DELETE teachers where TID ='"& str &"' "

seems a bit suspicious. There looks like there is a trailing space (which shouldn't hurt) or worse, some nonprintable character.

How about:

    Dim strSelect As String = "DELETE teachers where TID ='" & str & "'"

The resultant

    DELETE teachers where TID = '1'

is correct syntax, so if this fails something else is going on.

As an aside, the FROM keyword in a DELETE statement is optional.


Jeff Mason
Custom Apps, Inc.
www.custom-apps.com
Reply With Quote