| | |
linking database Microsoft Access with VB.NET
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Mar 2008
Posts: 8
Reputation:
Solved Threads: 0
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
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
•
•
Join Date: Jun 2008
Posts: 117
Reputation:
Solved Threads: 0
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.
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.
![]() |
Similar Threads
- Microsoft Access Field Format ??? (Windows Software)
- Writing to an Access Database (Visual Basic 4 / 5 / 6)
- Is it possible to display report in Visual Basic which is created in Microsoft Access (Visual Basic 4 / 5 / 6)
- how to retrieve the Microsoft Access DAtabase from the INternet using web services (VB.NET)
- How To Connect VB6.0 (Access Database) Using ODBC (Visual Basic 4 / 5 / 6)
- I hava trouble with Microsoft Access database, Pls help me. (Java)
Other Threads in the VB.NET Forum
- Previous Thread: How to find Max????
- Next Thread: encrpything and decrpything an xml file
| Thread Tools | Search this Thread |
.net .net2008 30minutes 2005 2008 access account arithmetic array basic binary bing button buttons center check code combobox component connectionstring crystalreport data database databasesearch datagrid datagridview date design dissertation dissertations dropdownlist excel fade file-dialog filter folder ftp generatetags google hardcopy images input insert intel internet mobile monitor ms net networking objects output panel passingparameters peertopeervideostreaming picturebox picturebox1 port position print printing problem problemwithinstallation project save searchbox searchvb.net select serial shutdown soap survey table tcp temperature text textbox timer timespan toolbox trim update updown user vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web winforms wpf year





