I am trying to follow your advice. It works fine in VB6, because ADO 2.6
Connection's Execute method (cn.Execute "exec sp_tables '...'") returns -1
if table exists and 0 if it doesn't.
But in ADO.NET, SqlCommand 's ExecuteNonQuery always returns -1 for any
command except UPDATE, INSERT or DELETE. In my case, it always returns -1.
I have posted a sample below of both proposed queries for you to use.
Please keep in mind that this is a sample only and you should implement
exception handling in the code if you decide to use it.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.