Sumeet Jain
New member
Hi Guys,
I am new in VB.net & need your experience & help.
I am using Following Codes to connect my project to Access Database:-
I want to use Database which is located on My Solution Explorer So My Question is that how can i connect Database which is located on the solution explorer
instead of using Data Source = C:\Users\Sumeet Jain\Documents\Visual Studio 2008\Projects\Recharge_Management-1.0\Recharge_Management-1.0\Database1.mdb"
Please help me i am in deep trouble ..
I am new in VB.net & need your experience & help.
I am using Following Codes to connect my project to Access Database:-
VB.NET:
Public Class Login
Dim con As New OleDb.OleDbConnection
Dim ds As New DataSet
Dim da As OleDb.OleDbDataAdapter
Dim sql As String
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
con.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = C:\Users\Sumeet Jain\Documents\Visual Studio 2008\Projects\Recharge_Management-1.0\Recharge_Management-1.0\Database1.mdb"
con.Open()
sql = "SELECT * FROM tblContacts"
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "AddressBook")
con.Close()
I want to use Database which is located on My Solution Explorer So My Question is that how can i connect Database which is located on the solution explorer
instead of using Data Source = C:\Users\Sumeet Jain\Documents\Visual Studio 2008\Projects\Recharge_Management-1.0\Recharge_Management-1.0\Database1.mdb"
Please help me i am in deep trouble ..