Still need help with a Delete Statement

Results 1 to 3 of 3

Thread: Still need help with a Delete Statement

  1. #1
    Join Date
    Dec 1969

    Default Still need help with a Delete Statement

    Thank you for whoever it was that aided me yesterday.<BR><BR>My problem has moved on since then as the ID is now being pulled over but I have an error still with my delete statement.<BR><BR>The code looks like this now:<BR>&#060;%@LANGUAGE="VBSCRIPT"%&#062;<BR><BR> &#060;%Set Conn=Server.CreateObject("ADODB.Connection")<BR>Co nn.Open "DSN=telephone"<BR><BR><BR>SQL="delete from directory" <BR>sql = sql & "where id = " & request("id")<BR>response.write(SQL)<BR>Conn.Execu te (SQL)<BR>%&#062;<BR><BR>and the error it returns is this:<BR>delete from directorywhere id = 3 <BR>Microsoft OLE DB Provider for ODBC Drivers error &#039;80040e14&#039; <BR><BR>[Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM clause. <BR><BR>/delete2.asp, line 10 <BR><BR>I am racking my brains but no luck so far. Any further help would be greatly appreciated.<BR>Thank you.<BR>

  2. #2
    Join Date
    Dec 1969

    Default Lack of space

    between tabname and where<BR><BR>SQL="delete from directory " <BR>sql = sql & "where id = " & request("id")<BR>

  3. #3
    Join Date
    Dec 1969

    Default A space is needed.

    SQL="delete from directory" <BR>sql = sql & " where id = " & request("id")<BR><BR>otherwise your query will look like this:<BR>"delete from directorywhere id=whatever"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts