Hi,
I have VB.net 2003 standard and have no DB hookup like in vb.nt professional I believe. I want to connect to a database.
is it still possible to connect to a mysql DB or old access DB with code in the standard version of VB?
Printable View
Hi,
I have VB.net 2003 standard and have no DB hookup like in vb.nt professional I believe. I want to connect to a database.
is it still possible to connect to a mysql DB or old access DB with code in the standard version of VB?
Yes it is possible. Just use the System.Data namespace.
Hi,
Could I have an example of what you code to connect to a access database with using vb.net 2003 standard (no DB controls)?
Take a look at thisQuote:
Originally Posted by jagguy
http://visualbasic.about.com/od/lear.../aa050303a.htm
Connectin to Access Database and fetching data to dataGridView.LinkCode:Dim conn As OleDb.OleDbConnection
Dim adapter As OleDb.OleDbDataAdapter
Dim dt As DataTable
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
conn = New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\attendence.mdb;Persist Security Info=False")
adapter = New OleDb.OleDbDataAdapter("SELECT rno,name FROM student", conn)
dt = New DataTable("Student")
adapter.Fill(dt)
DataGridView1.DataSource = dt
End Sub