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

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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


É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"

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

Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

sml41Author Commented:
thanks : mark2150
lock the Q to give u thr points.
Thank you!

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


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sml41Author Commented:
no i don't so how does that work?
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.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.