Click here to Skip to main content
15,908,013 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: which is faster? Pin
Luc Pattyn25-Jul-09 22:34
sitebuilderLuc Pattyn25-Jul-09 22:34 
GeneralRe: which is faster? Pin
TheMrProgrammer26-Jul-09 5:08
TheMrProgrammer26-Jul-09 5:08 
GeneralRe: which is faster? Pin
Luc Pattyn26-Jul-09 8:41
sitebuilderLuc Pattyn26-Jul-09 8:41 
GeneralRe: which is faster? Pin
TheMrProgrammer27-Jul-09 4:13
TheMrProgrammer27-Jul-09 4:13 
GeneralRe: which is faster? Pin
Luc Pattyn27-Jul-09 11:03
sitebuilderLuc Pattyn27-Jul-09 11:03 
QuestionDatagridview checkbox column Pin
sreerajknair25-Jul-09 18:37
sreerajknair25-Jul-09 18:37 
AnswerRe: Datagridview checkbox column Pin
Paramu197325-Jul-09 22:32
Paramu197325-Jul-09 22:32 
QuestionImport xml into ms access database Pin
tessers25-Jul-09 13:03
tessers25-Jul-09 13:03 
I use a webservice to import the xml into a ms access database, and interop code is not working.
This is my code so far, but it is not working properly.

im strConnection As String
Dim objDataSet As New DataSet()
Dim objConnection As OleDbConnection
Dim objAdapter As OleDbDataAdapter
Dim intI As Integer

Dim ds As New DataSet
Dim streamRead As New System.IO.FileStream("C:\NTB100514_07_22_2009_225551.xml", System.IO.FileMode.Open)
ds.ReadXml(streamRead)

streamRead.Close()

If ds.Tables.Count > 0 Then
strConnection = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & "c:\PC Auditer.accdb"
objConnection = New OleDbConnection(strConnection)
objConnection.Open()
objAdapter = New OleDbDataAdapter()
Dim cb As New OleDbCommandBuilder(objAdapter)
For intI = 0 To ds.Tables.Count - 1
If ds.Tables(intI).Rows.Count > 0 Then
DataGridView1.DataSource = ds.Tables(intI)
objAdapter.SelectCommand = New OleDbCommand("SELECT * FROM [" + ds.Tables(intI).TableName + "] ", objConnection)
objAdapter.Fill(ds, ds.Tables(intI).TableName.ToString)
objAdapter.UpdateCommand = cb.GetUpdateCommand()
objAdapter.Update(ds, ds.Tables(intI).TableName.ToString)
End If
Next
objConnection.Close()
End If

In my access database all the primairy keys and relationships are defined. The first time (intI=0) the update command works well, but the second time (intI=1) iI get an error.

Kind regards,
Jurgen

ps: I am a beginner, so excuse me if my code is lokking so nice.
AnswerRe: Import xml into ms access database Pin
Christian Graus25-Jul-09 13:46
protectorChristian Graus25-Jul-09 13:46 
GeneralRe: Import xml into ms access database Pin
tessers25-Jul-09 22:32
tessers25-Jul-09 22:32 
GeneralRe: Import xml into ms access database Pin
elizas8-Feb-10 19:24
elizas8-Feb-10 19:24 
QuestionHow to Re-Update the SqlDataAdapter() Pin
Paramu197325-Jul-09 1:36
Paramu197325-Jul-09 1:36 
AnswerRe: How to Re-Update the SqlDataAdapter() [modified] Pin
Andy_L_J25-Jul-09 6:37
Andy_L_J25-Jul-09 6:37 
GeneralRe: How to Re-Update the SqlDataAdapter() Pin
Paramu197325-Jul-09 22:24
Paramu197325-Jul-09 22:24 
QuestionAgain Repeat : Outlook Share Add-In setup Working On Vista but not in Window XP Pin
dcdhingra25-Jul-09 0:31
dcdhingra25-Jul-09 0:31 
AnswerRe: Again Repeat : Outlook Share Add-In setup Working On Vista but not in Window XP Pin
Andy_L_J25-Jul-09 6:49
Andy_L_J25-Jul-09 6:49 
Questionproblem in date asve Pin
faravani24-Jul-09 21:53
faravani24-Jul-09 21:53 
AnswerRe: problem in date asve Pin
Mycroft Holmes24-Jul-09 23:18
professionalMycroft Holmes24-Jul-09 23:18 
QuestionMy application shows SPY and Virus Pin
Anubhava Dimri24-Jul-09 19:36
Anubhava Dimri24-Jul-09 19:36 
AnswerRe: My application shows SPY and Virus Pin
Christian Graus25-Jul-09 12:54
protectorChristian Graus25-Jul-09 12:54 
GeneralRe: My application shows SPY and Virus Pin
Anubhava Dimri26-Jul-09 18:12
Anubhava Dimri26-Jul-09 18:12 
QuestionVB6 and XP Taskbar Pin
starchaser0924-Jul-09 8:39
starchaser0924-Jul-09 8:39 
AnswerRe: VB6 and XP Taskbar Pin
Henry Minute24-Jul-09 9:48
Henry Minute24-Jul-09 9:48 
Questionsearch a record Pin
waner michaud24-Jul-09 6:52
waner michaud24-Jul-09 6:52 
AnswerRe: search a record Pin
Ian Shlasko24-Jul-09 6:57
Ian Shlasko24-Jul-09 6:57 

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.