ms access - Jet 4.0 connection problem with c# windows application -
I have a win. I am developing a Net application that runs continuously in the server machine.
Each Connected Database is already in use by some other application locally installed.
My application is transmitted successfully from all databases, when the client machine is constantly alive.
But if one of my customers goes down the machine (says the system or the network) and reboots, then the app can not connect to that specific database, however accessible by network.
Even I tried to restart my application program to reset the connection again.
"Disk or network error"
or
> "Unspecified error"
"Your application can not be started. The workgroup information file is unavailable or opened exclusively by another user. has gone."Anyone?
Yes
Actually, I code the code for every database associated with the application I am using a stable object with the following piece.
DbProviderFactory Factory; DBC connection connection; DbDataAdapter Data Adapter; Zero Set Connection (Connection String Settings Settings) {Factory = DBPIFirefactures Gatefactor (settings.ProviderName); If (factory! = Null) {if (connection == null) {connection = factory.CreateConnection (); DataAdapter = factory.CreateDataAdapter (); Connection.ConnectionString = settings.ConnectionString; }}} Public DataTable GetTable (String Statement) {DataTable dataTable = null; If (connection! = Null) {dataAdapter.SelectCommand = connection.CreateCommand (); DataAdapter.SelectCommand.CommandText = Statement; Datable = new datatelle (); DataAdapter.Fill (DataTable); } And throw new exceptions ("connection object faucet"); Return DataTable; }
I am setting up the connection string and provider name to app.config.
Comments
Post a Comment