Click here to Skip to main content
15,920,708 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionNewbie Question Regarding Internet Communication Pin
BubbaMN4-Jan-10 17:26
BubbaMN4-Jan-10 17:26 
AnswerRe: Newbie Question Regarding Internet Communication Pin
Abhinav S4-Jan-10 18:58
Abhinav S4-Jan-10 18:58 
Questionhow to use wintrust.dll Pin
Anubhava Dimri4-Jan-10 0:14
Anubhava Dimri4-Jan-10 0:14 
AnswerRe: how to use wintrust.dll Pin
Dave Kreskowiak4-Jan-10 8:53
mveDave Kreskowiak4-Jan-10 8:53 
QuestionHw to give folder permission using vb6.0 ? Pin
JC.KaNNaN3-Jan-10 23:22
JC.KaNNaN3-Jan-10 23:22 
AnswerRe: Hw to give folder permission using vb6.0 ? Pin
Eddy Vluggen4-Jan-10 1:20
professionalEddy Vluggen4-Jan-10 1:20 
QuestionText 2 Speach Pin
JR2123-Jan-10 21:48
JR2123-Jan-10 21:48 
AnswerRe: Text 2 Speach Pin
DaveAuld3-Jan-10 23:26
professionalDaveAuld3-Jan-10 23:26 
GeneralRe: Text 2 Speach Pin
JR2124-Jan-10 23:22
JR2124-Jan-10 23:22 
QuestionScanner Interface Pin
WinCrs3-Jan-10 18:42
WinCrs3-Jan-10 18:42 
AnswerRe: Scanner Interface Pin
DaveAuld3-Jan-10 19:41
professionalDaveAuld3-Jan-10 19:41 
AnswerRe: Scanner Interface Pin
tosch3-Jan-10 23:27
tosch3-Jan-10 23:27 
QuestionHow do i open an excel file in a Richtextbox in vb.net 2008? Pin
r_mohd2-Jan-10 15:36
r_mohd2-Jan-10 15:36 
AnswerRe: How do i open an excel file in a Richtextbox in vb.net 2008? Pin
Naji El Kotob2-Jan-10 17:28
Naji El Kotob2-Jan-10 17:28 
AnswerRe: How do i open an excel file in a Richtextbox in vb.net 2008? Pin
Rod Kemp2-Jan-10 17:35
Rod Kemp2-Jan-10 17:35 
QuestionHow to read/extract data from a web page? Pin
jadothebest2-Jan-10 15:06
jadothebest2-Jan-10 15:06 
AnswerRe: How to read/extract data from a web page? Pin
nlarson112-Jan-10 16:43
nlarson112-Jan-10 16:43 
GeneralMessage Removed Pin
3-Jan-10 9:39
jadothebest3-Jan-10 9:39 
GeneralRe: How to read/extract data from a web page? Pin
Dave Kreskowiak3-Jan-10 15:12
mveDave Kreskowiak3-Jan-10 15:12 
GeneralMessage Removed Pin
3-Jan-10 15:17
jadothebest3-Jan-10 15:17 
GeneralRe: How to read/extract data from a web page? Pin
Dave Kreskowiak3-Jan-10 17:34
mveDave Kreskowiak3-Jan-10 17:34 
GeneralRe: How to read/extract data from a web page? Pin
jadothebest5-Jan-10 15:51
jadothebest5-Jan-10 15:51 
GeneralRe: How to read/extract data from a web page? Pin
Dave Kreskowiak5-Jan-10 17:24
mveDave Kreskowiak5-Jan-10 17:24 
QuestionImport XML into access db Pin
tessers2-Jan-10 1:52
tessers2-Jan-10 1:52 
Hi all,

I use the following code to import a XML file into an Access database:

Dim ds As New DataSet
Dim streamRead As New System.IO.FileStream(strFileName, System.IO.FileMode.Open)
ds.ReadXml(streamRead)
streamRead.Close()
If ds.Tables.Count > 0 Then
strConnection = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & dbname
objConnection = New OleDbConnection(strConnection)
objConnection.Open()
objAdapter = New OleDbDataAdapter()
objAdapter.ContinueUpdateOnError = True
Dim cb As New OleDbCommandBuilder(objAdapter)
For intI = 0 To ds.Tables.Count - 1
If ds.Tables(intI).Rows.Count > 0 Then
cb.RefreshSchema()
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

The import works fine, but when a next XML file is imported with less records, the database don't get updated and the 'old' records remain in the database. Simply delete the 'old' records is fine by me.

Can somebody point me to the right direction.

With kind regards,
Jurgen
AnswerRe: Import XML into access db Pin
Ebube4-Jan-10 0:28
Ebube4-Jan-10 0:28 

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.