Click here to Skip to main content
15,895,815 members
Home / Discussions / Visual Basic
   

Visual Basic

 
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 
QuestionCreating Trial Version software Pin
Milind Panchal1-Jan-10 19:14
Milind Panchal1-Jan-10 19:14 
AnswerRe: Creating Trial Version software Pin
DaveAuld1-Jan-10 19:34
professionalDaveAuld1-Jan-10 19:34 
QuestionUse controls who are creating dynamically Pin
ivo751-Jan-10 8:01
ivo751-Jan-10 8:01 
AnswerRe: Use controls who are creating dynamically Pin
nlarson111-Jan-10 12:46
nlarson111-Jan-10 12:46 
GeneralRe: Use controls who are creating dynamically Pin
ivo751-Jan-10 23:21
ivo751-Jan-10 23:21 
AnswerRe: Use controls who are creating dynamically Pin
shravan raval2-Jan-10 4:20
shravan raval2-Jan-10 4:20 
Questionfont based text editor Pin
sarcino1-Jan-10 5:30
sarcino1-Jan-10 5:30 
AnswerRe: font based text editor Pin
sarcino1-Jan-10 8:01
sarcino1-Jan-10 8:01 
GeneralRe: font based text editor Pin
Smithers-Jones1-Jan-10 10:40
Smithers-Jones1-Jan-10 10:40 
GeneralRe: font based text editor Pin
sarcino1-Jan-10 11:25
sarcino1-Jan-10 11:25 
Questioni need help with image compression? Pin
sheshe881-Jan-10 5:05
sheshe881-Jan-10 5:05 
QuestionSplitting a .txt file into lots of textboxes in vb6 Pin
offroaderdan1-Jan-10 0:16
offroaderdan1-Jan-10 0:16 
AnswerRe: Splitting a .txt file into lots of textboxes in vb6 Pin
powerdown1-Jan-10 6:08
powerdown1-Jan-10 6:08 
Questionhow to solve zipe files with space ? [modified] Pin
Golden Jing31-Dec-09 22:50
Golden Jing31-Dec-09 22:50 
AnswerRe: how to solve zipe files with space ? Pin
DaveAuld1-Jan-10 4:03
professionalDaveAuld1-Jan-10 4:03 
GeneralRe: how to solve zipe files with space ? Pin
Golden Jing1-Jan-10 4:54
Golden Jing1-Jan-10 4:54 

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.