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

Delete records using SQL

Status
Not open for further replies.

eyal

Programmer
May 15, 2000
38
IL
Hi,<br>On my .asp page I'm trying to delete a record from my DB using sql, the SQL goe like this:<br>c.execute &quot;delete * from tblmessage where id='&quot; & request.querystring(&quot;message_id&quot;) & &quot;'&quot;<br><br>the &quot;id&quot; field is defined as Autonumber and when I run this sql sentem=nce I get the error: &quot;Data type mismatch in criteria expression&quot;.<br>If the &quot;id&quot; is not defined as Autonumber it all works fine, <br>Any ideas?<br><br>Thanks<br>Eyal<br>
 
first of all an Autonumber is not a string, its a number<br>so remove the single quotes from around it.<br>id='&quot; & request.querystring(&quot;message_id&quot;) & &quot;'&quot;<br>like so<br>id=&quot; & request.querystring(&quot;message_id&quot;)<br> <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top