Jim,
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.
Any ideas?
Thanks.
"Jim Hughes" wrote:
There are several ways it could be done, this is one.
EXEC sp_tables @table_name='Customers'
"Alex K." <Al***@discussions.microsoft.com> wrote in message
news:C0**********************************@microsof t.com... What is the easiest / fastest way to check if a table <tablename> exists
in
the database?
Thank you