我有关于ADOX的错误,我不知道如何解决。方法'打开'没有超载需要1个或多个参数
enter code here public static string[] GetTableExcel(string strFileName)
{
string[] strTables = new string[100];
Catalog sCatalog = new Catalog();
ADOX.Table sTable = new ADOX.Table();
MySql.Data.MySqlClient.MySqlConnection sConn = new MySql.Data.MySqlClient.MySqlConnection();
sConn.Open("server=localhost; Data Source = " + strFileName + ";user id=root;Password=1;database=test;persist security info=False");
sCatalog.ActiveConnection = sConn;
if (sCatalog.Tables.Count > 0)
{
int item = 0;
foreach (ADOX.Table tab in sCatalog.Tables)
{
if (tab.Type == "TABLE")
{
strTables[item] = tab.Name;
item++;
}
}
}
return strTables;
声明的错误是'方法'打开'没有超载有一个参数。这里的任何善良的灵魂都可以帮助我?由于