J
Jiho Han
I am trying to test for the existence of a particular table in all databases
on a server.
I found some samples and looking at the SDK doc as well, I found the following
use of GetSchema method on Connection class:
SqlConnection.GetSchema(string collectionName, string[] restrictions)
So, I would do something like,
DataTable dt = connection.GetSchema("Tables", new string[] {null, null, "MyTable"});
which returns nothing.
Curiously enough, if I try the OleDbConnection instead of SqlConnection,
it returns results that I expect. I am guessing that there is a difference
in how GetSchema is implemented for SqlConnection and OleDbConnection.
Any ideas?
Thanks
Jiho
on a server.
I found some samples and looking at the SDK doc as well, I found the following
use of GetSchema method on Connection class:
SqlConnection.GetSchema(string collectionName, string[] restrictions)
So, I would do something like,
DataTable dt = connection.GetSchema("Tables", new string[] {null, null, "MyTable"});
which returns nothing.
Curiously enough, if I try the OleDbConnection instead of SqlConnection,
it returns results that I expect. I am guessing that there is a difference
in how GetSchema is implemented for SqlConnection and OleDbConnection.
Any ideas?
Thanks
Jiho