944,133 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 13691
  • VB.NET RSS
Oct 30th, 2006
0

linking database Microsoft Access with VB.NET

Expand Post »
How can i link database from microsoft access 2003 with VB.NET? can i use anything from eg. Form1 and display them on Form2? thx u very much.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
lionheart84 is offline Offline
1 posts
since Oct 2006
Mar 9th, 2008
0

Re: linking database Microsoft Access with VB.NET

Hi,
This code is gonna connect to the Access database and load data into datagrid:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load

Dim ConnString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Database Name.mdb"
Dim SQLString As String = "SELECT * FROM TableName"
Dim OleDBConn1 As System.Data.OleDb.OleDbConnection = New System.Data.OleDb.OleDbConnection(ConnString)
Dim DataSet1 As New DataSet()
Dim OleDbDataAdapter1 As System.Data.OleDb.OleDbDataAdapter = New System.Data.OleDb.OleDbDataAdapter(SQLString, OleDBConn1)
OleDBConn1.Open()
OleDbDataAdapter1.Fill(DataSet1, "TableName")
DataGridView1.DataSource = DataSet1.Tables("TableName")


End Sub

MaxDev
Reputation Points: 10
Solved Threads: 0
Newbie Poster
MaxDev is offline Offline
8 posts
since Mar 2008
Mar 10th, 2008
0

Re: linking database Microsoft Access with VB.NET

Thanks, I will the code later.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
fews4f is offline Offline
2 posts
since Mar 2008
Mar 10th, 2008
0

Re: linking database Microsoft Access with VB.NET

Thanks, I will try the code later.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
fews4f is offline Offline
2 posts
since Mar 2008
Jun 17th, 2008
0

Re: linking database Microsoft Access with VB.NET

Hi:

I am newbie here. I keep getting this error most of the times. If any one of have come across it, please do share with me as to how you got rid of it.

error msg is as follows:

"visual studio cannot start debugging because the debug target (c:\....\filename.exe) is missing. Please build the project and retry r set the o/p path and assembly name properties to point the correct location of the target assembly"

Most of the times this message comes up. Sometimes 2 files would exist in the same folder but one would let me debug it but the other wont.

Thanks,
Kavitha.
Reputation Points: 10
Solved Threads: 0
Junior Poster
kavithabhaskar is offline Offline
123 posts
since Jun 2008
Mar 19th, 2009
0

Re: linking database Microsoft Access with VB.NET

.
Last edited by richboy; Mar 19th, 2009 at 2:05 pm.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
richboy is offline Offline
9 posts
since Mar 2009
Jul 30th, 2010
0
Re: linking database Microsoft Access with VB.NET
I dont know how to connect the visual basic dot net 2003 to connect with microsoft ms access 2003 so can u plz send me the codings
Reputation Points: 10
Solved Threads: 0
Newbie Poster
08bit058 is offline Offline
2 posts
since Jul 2010

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: How i can change the values of a particular data at particular time?
Next Thread in VB.NET Forum Timeline: Concurrency exception





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC