473,396 Members | 1,893 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

XML into SQL 2005 Express using VB 2005

Hi
I am newbie when it comes to this so please be gentle. What I want to
do is read in data from XML files (1 contains on 1 record per file the
other can contain upward of 500 records) and then write the data out to
SQL 2005 Express. The xml file names will be variable but always read
from the same location then moved once processed. Any pointers on howto
do this or links to articles that describe how to do this type of thing
in VB 2005.

Thanks

D49

Jul 25 '06 #1
2 1109
D49,

The most easiest way to read XML files in Net is as they are readable as
DataSets.

I am not known with Epress, but you can try that by opening your XML file in
Solution Explorer from Express and than to drag it on your workplace.

If that goes and you see a table, than you can read it with
dim ds as dataset
ds.readxml("thepath").

If that is impossible than is the next step the XMLNodeReader.

If that does not go the common Document Load is usable, but that is the
hardest one to use.

I hope this helps sofar,

Cor

<df*******@gmail.comschreef in bericht
news:11*********************@i3g2000cwc.googlegrou ps.com...
Hi
I am newbie when it comes to this so please be gentle. What I want to
do is read in data from XML files (1 contains on 1 record per file the
other can contain upward of 500 records) and then write the data out to
SQL 2005 Express. The xml file names will be variable but always read
from the same location then moved once processed. Any pointers on howto
do this or links to articles that describe how to do this type of thing
in VB 2005.

Thanks

D49

Jul 25 '06 #2
What Cor posted is correct but just to clairify....

Since the file names vary you can get it like this:

Private Sub LoadFiles()

Dim DsData As New DataSet
Dim Files() As String
Dim File As String
Dim dtTable As DataTable
Dim drRow As DataRow

Files = IO.Directory.GetFiles("C:\DirectoryPath")

For Each File In Files
dsData.ReadXml(File)
Next

For Each dtTable In dsData.Tables
For Each drRow In dtTable.Rows
'This is where you'll update your database with row
data.
Next
Next
End Sub

Hope this helps.
df*******@gmail.com wrote:
Hi
I am newbie when it comes to this so please be gentle. What I want to
do is read in data from XML files (1 contains on 1 record per file the
other can contain upward of 500 records) and then write the data out to
SQL 2005 Express. The xml file names will be variable but always read
from the same location then moved once processed. Any pointers on howto
do this or links to articles that describe how to do this type of thing
in VB 2005.

Thanks

D49
Jul 25 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Bonj | last post by:
Hi I installed .NET 2005 express edition, and am about to unnistall it again because it can't seem to be able to even insert a resource file into a project. Can anyone tell me is this right?...
2
by: Val3 | last post by:
Hi all. I need to build dll(s) and windows services using VB .NET 2005 Express. When I make File/New project the windows contain only Windows application, Windows control library, Console...
8
by: Peter Oliphant | last post by:
I have been using VS C++.NET 2005 Express as our company waits for the MSDN full version to arrive. It is a pretty amazing free tool! My question is I'd like to also do some VS C#.NET stuff too....
1
by: QLD_AU | last post by:
Has anyone see the following error ? VS 2005 Installs ok, however the SQL Mobile Edition (part of a full install) fails with the following error ? With Thanks Jason
1
by: Peter | last post by:
I've purchased VS.NET 2005 Standard and have tried to install SQL Server 2005 Express, but get the following error in the error log. Please could someone help me.... Microsoft SQL Server 2005...
3
by: barry | last post by:
I had Visual Web Developer Express 2005 and Visual Studio 2005 installed on my computer. Realizing that I did not need Visual Web Developer Express 2005 since I had VS 2005 I removed it. My...
2
by: kress1963nov22 | last post by:
I recently purchased a good MS book ("Build a Web Site Now") by Jim Buyens. It has the Express Edition of MS-Visual Web Developer 2005 on CD and also MS SQL Server 2005 Express Edition on the CD. A...
1
by: Marvinq | last post by:
I'm a newbie to asp.net, but I have been a programmer for years. I have a question that I'm hoping someone can give me a good answer for, I have been trying to set up a site remotely and I've...
9
by: HC | last post by:
Hello, all, I started out thinking my problems were elsewhere but as I have worked through this I have isolated my problem, currently, as a difference between MSDE and SQL Express 2005 (I'll just...
1
by: Dr T | last post by:
Hi! I downloaded MS Visual Web Developer 2005 Express Edition, MS .NET Framework SDK v2.0, and MS SQL Server 2005. Subsequently, I bought MS Visual Studio 2005 Professional Edition. 1) Are...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.