ADO.NET or OLEDB

  • Thread starter Thread starter Tony
  • Start date Start date
T

Tony

I am writing a database application connecting to a MS Access DB. Should I
make the connection through ADO.NET or OLEDB? I think I would actually want
to use some sort of ODBC connection, but I can't find the appropriate
information. This database will reside on my customer's server instead of a
standalone machine. Can anyone point me to the right page or provide
information?

Thanks,
Tony
 
Tony said:
I am writing a database application connecting to a MS Access DB.
Should I make the connection through ADO.NET or OLEDB? I think I
would actually want to use some sort of ODBC connection, but I can't
find the appropriate information. This database will reside on my
customer's server instead of a standalone machine. Can anyone point
me to the right page or provide information?

Ask in the database group. This is a VB.NET language group.

microsoft.public.dotnet.framework.adonet


--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html
 
Hi Tony,

OleDB is AdoNet (it is also ADO).

My advice is to use for Access OleDB, because ODBC is not such complete as
that.

Look here for the connections string
www.connectionstrings.com

However keep in mind that Access as a serverdatabase for Windows is slow and
has a lot of disadvantages.

One of the disadvantages; you should always give the user direct access
right to that, while by instance SQL works real as a service. And therefore
you user can move your database to another location.

I hope this helps?

Cor
 
One of the disadvantages; you should always give the user direct access
right to that, while by instance SQL works real as a service. And therefore
you user can move your database to another location.

With Access of course and not with SQL server

Cor
 
Tony,

* "Tony said:
I am writing a database application connecting to a MS Access DB. Should I
make the connection through ADO.NET or OLEDB? I think I would actually want
to use some sort of ODBC connection, but I can't find the appropriate
information. This database will reside on my customer's server instead of a
standalone machine.

You will more likely get an answer here:

<URL:
Web interface:

<URL:http://msdn.microsoft.com/newsgroups/?dg=microsoft.public.dotnet.framework.adonet>
 
Tony said:
I am writing a database application connecting to a MS Access DB. Should I
make the connection through ADO.NET or OLEDB? I think I would actually want
to use some sort of ODBC connection, but I can't find the appropriate
information. This database will reside on my customer's server instead of a
standalone machine. Can anyone point me to the right page or provide
information?

Thanks,
Tony
THANK YOU TO EVERYONE!!
 
¤ I am writing a database application connecting to a MS Access DB. Should I
¤ make the connection through ADO.NET or OLEDB? I think I would actually want
¤ to use some sort of ODBC connection, but I can't find the appropriate
¤ information. This database will reside on my customer's server instead of a
¤ standalone machine. Can anyone point me to the right page or provide
¤ information?

Actually you can use both since .NET has a native generic OLEDB provider:

Dim ConnectionString As String

ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=e:\My Documents\db1.mdb"
Dim AccessConnection As New System.Data.OleDb.OleDbConnection(ConnectionString)
AccessConnection.Open()

Dim da As New System.Data.OleDb.OleDbDataAdapter("Select * from Table1", AccessConnection)

Dim ds As New DataSet

da.Fill(ds, "Table1")

DataGrid1.SetDataBinding(ds, "Table1")

Dim dt As DataTable
dt = ds.Tables("Table1")

Dim drCurrent As DataRow
For Each drCurrent In dt.Rows
Console.WriteLine("{0} {1}", _
drCurrent("Column1").ToString, _
drCurrent("Column2").ToString)
Next

AccessConnection.Close()


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Back
Top