Click here to Skip to main content
15,926,857 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: regarding insertion of records Pin
Colin Angus Mackay10-Sep-07 11:18
Colin Angus Mackay10-Sep-07 11:18 
QuestionDistorted text? Pin
jensenx10-Sep-07 9:19
jensenx10-Sep-07 9:19 
AnswerRe: Distorted text? Pin
Luc Pattyn10-Sep-07 10:05
sitebuilderLuc Pattyn10-Sep-07 10:05 
GeneralRe: Distorted text? Pin
jensenx10-Sep-07 19:09
jensenx10-Sep-07 19:09 
GeneralRe: Distorted text? Pin
Luc Pattyn11-Sep-07 0:11
sitebuilderLuc Pattyn11-Sep-07 0:11 
GeneralRe: Distorted text? Pin
jensenx11-Sep-07 8:41
jensenx11-Sep-07 8:41 
GeneralRe: Distorted text? Pin
jensenx11-Sep-07 20:46
jensenx11-Sep-07 20:46 
QuestionADO.NET and VB.NET Access Database Pin
crazyjackdavis10-Sep-07 8:32
crazyjackdavis10-Sep-07 8:32 
I'm having problems w/the following code. It doesn't seem to update my Access database. Thanks in advance for your help.

---

Option Explicit On

Imports System.Data
Imports System.Data.Oledb

Public Class frmAddCompany

Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
Me.Close()
End Sub

Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
Dim strProvider As String = _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Environment.CurrentDirectory & "\testDb.mdb"
Dim strSQL As String = _
"select * from company"

Dim myDbConn As OleDbConnection
Dim myDataAdapter As OleDbDataAdapter
Dim myDataSet As DataSet = New DataSet
Dim myDataTable As DataTable = New DataTable

myDbConn = New OleDbConnection(strProvider)
myDataAdapter = New OleDbDataAdapter(strSQL, myDbConn)
myDataAdapter.Fill(myDataSet, "Company")
myDataAdapter.Fill(myDataTable)

Dim myDataRow As DataRow = myDataTable.NewRow()
myDataRow("CompanyName") = "test123"
myDataTable.Rows.Add(myDataRow)
myDataSet.Tables("Company").AcceptChanges()

myDataAdapter.Update(myDataSet, "Company")

myDbConn.Close()
End Sub

End Class
AnswerRe: ADO.NET and VB.NET Access Database Pin
Kschuler10-Sep-07 8:51
Kschuler10-Sep-07 8:51 
QuestionBrowsing a DataTable Pin
dptalt10-Sep-07 5:33
dptalt10-Sep-07 5:33 
AnswerRe: Browsing a DataTable Pin
Kschuler10-Sep-07 7:49
Kschuler10-Sep-07 7:49 
QuestionProblems with Dataset configuration wizard Pin
2wit2woo10-Sep-07 3:04
2wit2woo10-Sep-07 3:04 
Questionreplace selected item of list box Pin
Rupesh Kumar Swami10-Sep-07 2:53
Rupesh Kumar Swami10-Sep-07 2:53 
AnswerRe: replace selected item of list box Pin
Luc Pattyn10-Sep-07 3:14
sitebuilderLuc Pattyn10-Sep-07 3:14 
GeneralRe: replace selected item of list box Pin
Rupesh Kumar Swami10-Sep-07 3:28
Rupesh Kumar Swami10-Sep-07 3:28 
QuestionSetting parent of word application Pin
Salman Sheikh10-Sep-07 2:12
Salman Sheikh10-Sep-07 2:12 
AnswerRe: Setting parent of word application Pin
Paul Conrad16-Sep-07 8:34
professionalPaul Conrad16-Sep-07 8:34 
QuestionHow to Show Text in Label Pin
somsakchoto10-Sep-07 2:09
somsakchoto10-Sep-07 2:09 
AnswerRe: How to Show Text in Label Pin
Salman Sheikh10-Sep-07 2:13
Salman Sheikh10-Sep-07 2:13 
GeneralRe: How to Show Text in Label Pin
somsakchoto10-Sep-07 2:25
somsakchoto10-Sep-07 2:25 
AnswerRe: How to Show Text in Label Pin
Mbire10-Sep-07 2:23
Mbire10-Sep-07 2:23 
AnswerRe: How to Show Text in Label Pin
Christian Graus10-Sep-07 4:00
protectorChristian Graus10-Sep-07 4:00 
Questionvb.net 2005 Connecting to MySQL 5 [modified] Pin
Mbire10-Sep-07 2:07
Mbire10-Sep-07 2:07 
AnswerRe: vb.net 2005 Connecting to MySQL 5 Pin
Paul Conrad16-Sep-07 8:33
professionalPaul Conrad16-Sep-07 8:33 
GeneralRe: Combobox problem Pin
Dave Kreskowiak10-Sep-07 1:25
mveDave Kreskowiak10-Sep-07 1:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.