我有關於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;
聲明的錯誤是'方法'打開'沒有超載有一個參數。這裏的任何善良的靈魂都可以幫助我?由於