Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

sql correct sintax for delete a  record from the date

Posted on 2005-04-18
2
Medium Priority
?
143 Views
Last Modified: 2010-05-02
Hi you guys what is the correct syntax for delete a record from sql statement like this


 sqlstring = " delete from masacor where folio= " & regact & " and dia='18/04/2005'"  

the error is
Data type mismatch
thnx
Ernesto
0
Comment
Question by:Ernesto
2 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 13811544
if folio is of character type, it has to be surrounded by single quotes

sqlstring = " delete from masacor where folio= '" & regact & "' and dia='18/04/2005'"  

If your database is Access, the date needs to be surrounded with #

sqlstring = " delete from masacor where folio= " & regact & " and dia=#18/04/2005#"  
0
 

Author Comment

by:Ernesto
ID: 13811830
Thats it
tnks
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question