Re: ASP Problem

by "Doug Dossett" <hwg(at)igotnothin.com>

 Date:  Fri, 11 May 2001 07:03:02 -0700
 To:  "Jason Berhalter" <berh1571(at)fredonia.edu>,
<hwg-languages(at)hwg.org>
 In-Reply-To:  fredonia
  todo: View Thread, Original
Hello,

You've got a space in IP Address=. It would need to be either 
IPAddress or [IP Address]. 

HTH,

Doug Dossett
MiscSites.com

On 10 May 2001, at 22:16, Jason Berhalter wrote:

> Hello. I am writing a front end for a database and I am trying to set
> up a page that deletes records, here is my code:
> 
> <%
> dim objConn, objRec, strLook, sqlLook
> 
> set objConn = server.CreateObject("ADODB.Connection")
> 
> ' DSNless connection to Access Database
>   dim strConnect
> 
> strConnect="DRIVER={Microsoft Access Driver (*.mdb)}; "
> strConnect=strConnect & "DBQ=" &
> server.mappath("/database/problems.mdb")
> 
> 'objConn.Mode = adModeReadWrite '3
> objConn.Open strConnect
> 
> 'Check to delete
> 
> if request("IP_Address") <> "" and request("Host_Name") <> "" and
> request("Host_Name") <> "" then
> 
>  dim strDelete
> 
>  strDelete = "DELETE FROM tblGetProbInfo WHERE IP Address='" &
> request("IP_Address") & "' AND Host Name='" & request("Host_Name") &
> "' AND BrowserOS='" & request("Browser_Info") & "' AND DateTime='" &
> request("Date_Time") & "' AND Email='" & request("email_address") & "'
> AND URL='" & request("URL") & "' AND ProbDescription='" &
> request("comments") & "'"
> 
>  objConn.Execute strDelete
> 
>  response.write "<BR> The Entry Has Been Removed <BR>"
> 
> end if
> %>
> --------------------------------------
> I recieve the following error when I try to delete a record:
> 
> Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
> 
> [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing
> operator) in query expression 'IP Address='.....
> 
> /test.asp, line 28
> -------------------------------------------
> 
> Also, line 28 in my code is this: objConn.Execute strDelete
> 
> Any ideas what could be wrong?
> 
> -Jason Berhalter
> 
> 
> 
> 

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.