|
-
October 23rd, 2001, 04:16 PM
#1
Delete SQL statement
There occurs in delete sql.
sql statement is like following.
--------------------------------------------------
cmd.CommandText = "Delete * from sampletbl WHERE (Id='" & vId & "' AND date = '" & vDate & "' AND seq = '" & vSeq & "')"
--------------------------------------------------
vId, vDate, vSeq are variables.
I don't know what's the problem.
Could anyone who know about SQL let me know?
I'm sorry I might asked so basic question.
Programmer.
Multimedia/Image Processing/FA/CADCAM
C,V/B,V/C++
-
October 23rd, 2001, 06:09 PM
#2
Re: Delete SQL statement
Change 'Delete * from ' to 'Delete from'
Regards,
Michi
-
October 24th, 2001, 08:00 AM
#3
Re: Delete SQL statement
When you use a date field don't use it as a string if it is of type date in your database.
' AND date = '" & vDate & "' this won't work
Use # instead of '
"' AND date =#" & vDate &"#
this should work
Nicolas Bohemier
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|