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

SQL in a Dynamic Web Page

Status
Not open for further replies.

majohnson

Technical User
Jun 28, 2000
6
US
I am building a web page using Access, VBScript, and SQL.&nbsp;&nbsp;I want to be able to DELETE a link which includes an UserID. Everytime i try to delete it i get this error.&nbsp;&nbsp;Can someone please help me?<br><br>DELETE FROM EPIC_LINK WHERE LNK_NM = <A HREF=" TARGET="_new"> <br><br>Microsoft OLE DB Provider for ODBC Drivers error '80040e14' <br><br>[Microsoft][ODBC Microsoft Access Driver] Syntax error<br><br>&nbsp;(missing operator) in query expression 'LNK_NM =<br>&nbsp;<br><A HREF=" TARGET="_new"> <br><br>/epic/epic_admin/delete_link2.asp, line 28 <br><br>THIS IS THE CODE I HAVE BEEN USING TO MAKE IT WORK:<br>UserID = &quot;'&quot; & UserID & &quot;'&quot;<br>link = &quot;'&quot; & link & &quot;'&quot;<br>link = Request.QueryString(&quot;link&quot;)<br>SQL=&quot;DELETE FROM EPIC_LINK WHERE LNK_NM = &quot; & link&nbsp;&nbsp;&nbsp;<br>Response.Write (SQL)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>oConn.Execute(SQL)
 
um, you need single quotes around the URL <br><br>like <br><br>DELETE FROM EPIC_LIN WHERE LNK_NM = '<A HREF=" TARGET="_new"> <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top