linking database Microsoft Access with VB.NET

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Oct 2006
Posts: 1
Reputation: lionheart84 is an unknown quantity at this point 
Solved Threads: 0
lionheart84 lionheart84 is offline Offline
Newbie Poster

linking database Microsoft Access with VB.NET

 
0
  #1
Oct 30th, 2006
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.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 8
Reputation: MaxDev is an unknown quantity at this point 
Solved Threads: 0
MaxDev MaxDev is offline Offline
Newbie Poster

Re: linking database Microsoft Access with VB.NET

 
0
  #2
Mar 9th, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 2
Reputation: fews4f is an unknown quantity at this point 
Solved Threads: 0
fews4f fews4f is offline Offline
Newbie Poster

Re: linking database Microsoft Access with VB.NET

 
0
  #3
Mar 10th, 2008
Thanks, I will the code later.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 2
Reputation: fews4f is an unknown quantity at this point 
Solved Threads: 0
fews4f fews4f is offline Offline
Newbie Poster

Re: linking database Microsoft Access with VB.NET

 
0
  #4
Mar 10th, 2008
Thanks, I will try the code later.
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 117
Reputation: kavithabhaskar is an unknown quantity at this point 
Solved Threads: 0
kavithabhaskar kavithabhaskar is offline Offline
Junior Poster

Re: linking database Microsoft Access with VB.NET

 
0
  #5
Jun 17th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 9
Reputation: richboy is an unknown quantity at this point 
Solved Threads: 0
richboy richboy is offline Offline
Newbie Poster

Re: linking database Microsoft Access with VB.NET

 
0
  #6
Mar 19th, 2009
.
Last edited by richboy; Mar 19th, 2009 at 2:05 pm.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC