不能打开数据库 ''。应用程序可能无法识别该数据库,或文件可能损坏。

************** 异常文本 **************System.Data.OleDb.OleDbException: 不能打开数据库 ''。应用程序可能无法识别该数据库,或文件可能损坏。 在 System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) 在 System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) 在 System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) 在 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) 在 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) 在 System.Data.OleDb.OleDbConnection.Open() 在 APQSDS.modInitialize.TestDic() 在 APQSDS.frmLogin.OK_Click(Object sender, EventArgs e) 在 System.Windows.Forms.Control.OnClick(EventArgs e) 在 System.Windows.Forms.Button.OnClick(EventArgs e) 在 System.Windows.Forms.Button.PerformClick() 在 System.Windows.Forms.Form.ProcessDialogKey(Keys keyData) 在 System.Windows.Forms.Control.ProcessDialogKey(Keys keyData) 在 System.Windows.Forms.TextBoxBase.ProcessDialogKey(Keys keyData) 在 System.Windows.Forms.Control.PreProcessMessage(Message& msg) 在 System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg) 在 System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)

第1个回答  推荐于2017-12-15
你的数据库连接字符串,有没有指定目录名?即具体的数据库实例本回答被提问者和网友采纳
相似回答