|
![](/i/fill.gif) |
Orchid XP v8 wrote:
> As I understand it, M$ Access is just a graphical frontend for the M$
> Jet engine, which actually comes with Windows itself. Does that mean I
> can configure an ODBC connection to an Access database, even though I
> don't have access?
>
> More generally, does anybody here know how to work ODBC?
>
There are a bunch of options to open a .mdb without MS Access.
MS Access just gives you a pretty front end - it can be useful in
creating a new database and tables, but isn't required. In fact, I have
not used MS Access in several years, tho just about all of our data is
in .mdb files.
I personally stay from ODBC because it requires a setup on each computer.
I usually access the file directly through code.
small example in .NET - forgive the line wraps
******************************
Private Function GetSCIDandUTMTable(ByVal databasePath As String) As
System.Data.DataTable
Dim myDatabaseConnection As System.Data.OleDb.OleDbConnection
myDatabaseConnection = New
System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;Data
Source= " & databasePath)
myDatabaseConnection.Open()
Dim queryString As String
queryString = "select"
queryString &= " SCID"
queryString &= ",WorldX"
queryString &= ",WorldY"
queryString &= " from"
queryString &= " myInfoStore"
Dim myDataAdapter As System.Data.OleDb.OleDbDataAdapter = Nothing
Dim myDataSet As New System.Data.DataSet
Dim myDataView As System.Data.DataView
Dim myDataTable As System.Data.DataTable
myDataAdapter = New System.Data.OleDb.OleDbDataAdapter(queryString,
myDatabaseConnection)
myDataAdapter.Fill(myDataSet, "MyData")
myDatabaseConnection.Close()
myDataView = New System.Data.DataView(myDataSet.Tables("MyData"))
myDataTable = myDataView.Table
Return myDataTable
End Function
************************************************
In my case we don't keep one large dataset, we have a separate .mdb for
each job that we work on - so literally hundreds of .mdb files.
Our tools are designed to allow the sure to easily select the .mdb file
they are working with.
Tom
Post a reply to this message
|
![](/i/fill.gif) |