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

<% '******************************************************** I AM TR

Status
Not open for further replies.

majohnson

Technical User
Jun 28, 2000
6
US
&lt;%<br>'********************************************************<br>I AM TRYING TO DELETE A LINK AND I KEEP GETTING AN ERROR<br>CAN ANYONE SEE A PROBLEM?<br>'********************************************************<br><br>oConn.Open<br>SQL = &quot;DELETE FROM EPIC_LINK WHERE LNK_USER=&quot;&UserID&&quot; and LNK_NM='&quot;&name&&quot;'&quot;<br>Response.Write SQL<br>oConn.Execute(SQL)<br><br>'*********************************************************<br>THIS IS MY ERROR.<br>'*********************************************************<br><br>%&gt;DELETE FROM EPIC_LINK WHERE LNK_USER= and LNK_NM='' <br>Microsoft OLE DB Provider for ODBC Drivers error '80040e14' <br><br>[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'LNK_USER= and LNK_NM='''. <br><br>/epic/MyLink_delete2.asp, line 28 <br><br><br>Thanks<br>
 
Try putting quotes around all your Fields.<br><br>Usually helps. Something to do with crappy SQL implementations by these Firms.<br><br>Only use &quot; around whole strings, and within the statement use ' to identify any fields.<br><br>Also LNK_USER=&quot;&UserID&&quot; should look like:<br>'LNK_USER=&quot; & UserID & &quot;...&quot; etc...<br><br>Those spaces are very very important as &UserID does not mean concatenate like & UserID does. <p>Ben Marshalsea<br><a href=mailto: > </a><br><a href= > </a><br>
 
Ben is right. <br>Please make sure that if field is varchar, char or date field then provide value within single quoate e.g. '....'<br><br>Anand Mishra
 
Dear Johnson<br>&nbsp;the property of sql is that any string field in the database will have in singe inverted comma's so ur sql for deleting will be <br><br><FONT FACE=monospace>SQL = &quot;DELETE * FROM EPIC_LINK WHERE LNK_USER = '&quot; & UserID & &quot;' and LNK_NM='&quot; & name & &quot;';&quot;</font><br><br>&nbsp;hope this helps <br>&nbsp;regards<br> <p>Unicorn11<br><a href=mailto:webmaster@tripmedia.com>webmaster@tripmedia.com</a><br><a href= > </a><br>Hi there it all likeminded fellows!!!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top