C Christian Apr 23, 2008 #1 Hi, i include an Access Db in the solution of my project; now how can i connect to DB?
Z zacks Apr 23, 2008 #2 Hi, i include an Access Db in the solution of my project; now how can i connect to DB? Click to expand... You don't need to include the MDB in your solution to be able to access it. You need to make use of several class objects in the System.Data.ODBC namespace. ODBCConnection to connect. ODBCCommand to access data. ODBCDataReader to retrieve the data.
Hi, i include an Access Db in the solution of my project; now how can i connect to DB? Click to expand... You don't need to include the MDB in your solution to be able to access it. You need to make use of several class objects in the System.Data.ODBC namespace. ODBCConnection to connect. ODBCCommand to access data. ODBCDataReader to retrieve the data.
C Christian Apr 23, 2008 #3 You don't need to include the MDB in your solution to be able to access it. You need to make use of several class objects in the System.Data.ODBC namespace. ODBCConnection to connect. ODBCCommand to access data. ODBCDataReader to retrieve the data. Click to expand... ah ok! but what is the different between include MDB and not include(for example store it in c:\)?
You don't need to include the MDB in your solution to be able to access it. You need to make use of several class objects in the System.Data.ODBC namespace. ODBCConnection to connect. ODBCCommand to access data. ODBCDataReader to retrieve the data. Click to expand... ah ok! but what is the different between include MDB and not include(for example store it in c:\)?
Z zacks Apr 23, 2008 #4 ah ok! but what is the different between include MDB and not include(for example store it in c:\)? Click to expand... There is no real reason, as far as I am aware, to include an MDB with the VS solution, other than maybe distributing it with the app. The connection string used by the ODBCConnection object includes a full path to the MDB file, so it can essentially be anywhere you want it to be.
ah ok! but what is the different between include MDB and not include(for example store it in c:\)? Click to expand... There is no real reason, as far as I am aware, to include an MDB with the VS solution, other than maybe distributing it with the app. The connection string used by the ODBCConnection object includes a full path to the MDB file, so it can essentially be anywhere you want it to be.
I Ignacio Machin ( .NET/ C# MVP ) Apr 23, 2008 #5 Hi, i include an Access Db in the solution of my project; now how can i connect to DB? Click to expand... All you need to know is where you placed it. After that you access it the same way you do in your program.
Hi, i include an Access Db in the solution of my project; now how can i connect to DB? Click to expand... All you need to know is where you placed it. After that you access it the same way you do in your program.
I Ignacio Machin ( .NET/ C# MVP ) Apr 23, 2008 #6 You don't need to include the MDB in your solution to be able to access it. Click to expand... Yes you do, otherwise the application will not have a DB to connect to You need to make use of several class objects in the System.Data.ODBC namespace. Click to expand... Mdb is access, IIRC you can use OleDb provider with it
You don't need to include the MDB in your solution to be able to access it. Click to expand... Yes you do, otherwise the application will not have a DB to connect to You need to make use of several class objects in the System.Data.ODBC namespace. Click to expand... Mdb is access, IIRC you can use OleDb provider with it