M
Mike
Calling OleDbConnection.GetOleDbSchemaTable on a SQL Database that has
a period in it's name fails: How to duplicate, create a database
called "test 7.7" and try this code.
try
{
OleDbConnection cn = new OleDbConnection("Provider=SQLOLEDB.1;
Persist Security Info=False; User ID=sa;
Data Source=localhost");
cn.Open();
object[] filter = new Object[] {"test 7.7", null, null, "TABLE"};
DataTable metaData = cn.GetOleDbSchemaTable(
OleDbSchemaGuid.Tables, filter);
cn.Close();
}
catch(Exception ex)
{
int i = 9; // set break point here
}
This yields the error:
{"Unspecified error\r\nCould not find server 'test 7' in sysservers.
Execute sp_addlinkedserver to add the server to sysservers." }
System.Exception
a period in it's name fails: How to duplicate, create a database
called "test 7.7" and try this code.
try
{
OleDbConnection cn = new OleDbConnection("Provider=SQLOLEDB.1;
Persist Security Info=False; User ID=sa;
Data Source=localhost");
cn.Open();
object[] filter = new Object[] {"test 7.7", null, null, "TABLE"};
DataTable metaData = cn.GetOleDbSchemaTable(
OleDbSchemaGuid.Tables, filter);
cn.Close();
}
catch(Exception ex)
{
int i = 9; // set break point here
}
This yields the error:
{"Unspecified error\r\nCould not find server 'test 7' in sysservers.
Execute sp_addlinkedserver to add the server to sysservers." }
System.Exception