delete

i need the format for the following SQL statements in VB6
"delete * from MyTable"   --- MyTable is a variable string
"delete * from MyTable where OneField = 1"  ---- OneField Is a variable vbLong

thanks
sml41Asked:
Who is Participating?
 
mark2150Commented:
Thank you!

Are you aware you can "Grade Comment as Answer" now? Is new feature here at E-E.

M
0
 
mark2150Commented:
SQL = "DELETE * FROM " & MyTable
SQL = "DELETE * FROM " & MyTable & " WHERE " & OneField & "=1"

M

0
 
Éric MoreauSenior .Net ConsultantCommented:
IF your database engine is not Access, you must not put the star (*) in your query:

SQL = "DELETE FROM " & MyTable
SQL = "DELETE FROM " & MyTable & " WHERE " & OneField & "=1"


0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
mark2150Commented:
Oops! You're certainly right. I was copying the example given. Me Bad!

M
0
 
sml41Author Commented:
thanks : mark2150
lock the Q to give u thr points.
0
 
sml41Author Commented:
no i don't so how does that work?
0
 
mark2150Commented:
On the grade page you should see an option to grade comment as answer. Select that and you can award points without having to go thru the "post for points" fiddle faddle! just trying to make life simpler here at E-E.

There is even some discussion about doing away with the Comment/Answer checks entirely. They may even be able to get automatic point splitting to work where you'ld select *several* commentors to receive the points. Only time will tell.

M
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.