|
-
VB.Net writing to MS Access
I am trying to update a database using VB.net I have been able to read the file just not update any information in it. After searching the net it seems like there are many different ways to read / write to access. I was hoping that someone knew of a way to write to access without using command builder. The command builder has been a giant hassle and I want to avoid it whenever possible.
This is the code that I am using to read information from Access:
Dim con As New OleDb.OleDbConnection
Dim ds As New DataSet
Dim da As OleDb.OleDbDataAdapter
Dim sql As String
Dim intCounter As Integer = 0
Dim con As New OleDb.OleDbConnection
Dim ds As New DataSet
Dim da As OleDb.OleDbDataAdapter
Dim sql As String
con.ConnectionString = "PROVIDER=Microsoft.jet.oledb.4.0;Data Source = F:\Visual Basic Files\Magic\CardList.mdb"
sql = "SELECT * FROM CardName"
con.Open()
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "CardName")
TextBox1.Text = ds.Tables("CardName").Rows(1).Item(1)
con.Close()
Similar Threads
-
By trains58554 in forum Database
Replies: 3
Last Post: 10-27-2007, 06:00 AM
-
By driesmahieu in forum .NET
Replies: 1
Last Post: 10-02-2006, 12:52 PM
-
By psd in forum VB Classic
Replies: 1
Last Post: 10-19-2002, 04:52 PM
-
By Frank Oquendo in forum .NET
Replies: 1
Last Post: 12-06-2001, 03:30 PM
-
Replies: 0
Last Post: 03-28-2001, 11:29 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks