Greetings,
I have the following problem.
I am doing the following
which worked normaly quit well. But since a fwe days I have the following problem.To add a Data Source to the VS 2005 for an Access database, you can:
a. From the Data Menu, click on Add New Data Source
b. Choose Database and press Next
c. Select New Connection
d. Under Data source, press the Change button and select Microsoft Access Database File. Press OK
e. Under Database file name, press the browse button and select your file.
f. Press the TEST CONNECTION button. The connection test should succeed. Close that dialog and press OK.
g. From the "Choose Your Data Connection" screen, press NEXT.
h. You will now be presented with a pop up asking if you want VS to copy the file to your project. If you click NO it will leave it in it's current location, and if you click YES it will copy the file to your project location.
i. Expand the Tables tree view.
j. Check your tables that you want included.
l. Click Finish
After adding the acccess db via the way above the dataconnection and the use of the DataGridView is working as long as I am in the DevelopmentEnvironment. As soon i start the application i get the following message
exception
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
and the stack trace
bei System.Data.Odbc.OdbcConnection.HandleError(OdbcHa ndle hrHandle, RetCode retcode)
bei System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcCo nnection connection, OdbcConnectionString constr, OdbcEnvironmentHandle environmentHandle)
bei System.Data.Odbc.OdbcConnectionFactory.CreateConne ction(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
bei System.Data.ProviderBase.DbConnectionFactory.Creat eNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
bei System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection owningConnection)
bei System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
bei System.Data.Odbc.OdbcConnection.Open()
bei KTR_Client.clsDB.CheckDBConnection(DBEnum enumIn) in D:\***\source\KTR Client\KTR Client\clsDB.vb:Zeile 48.
Line 48
connection.Open()
Connection String
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=I:\KTRLocal.mdb;UserId=admin;Password=
Thanks in advance
VS 2005, Access 2000




Reply With Quote