Hi all,
I have an application that needs to import XML files into Database.
This XML file was generated by this:
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
Dim cmdXML As OleDb.OleDbComm and
Dim DScmdXML As OleDb.OleDbData Adapter
Dim DSXML As New DataSet()
Dim sqlXML As String = "SELECT * FROM List_Piante"
cmdXML = New OleDb.OleDbComm and(sqlXML, conn)
DScmdXML = New OleDb.OleDbData Adapter(cmdXML)
DScmdXML.Fill(D SXML, "List_Piant e")
DSXML.WriteXml( "Piante.xml ", XmlWriteMode.Wr iteSchema)
Dim xmlSW2 As System.IO.Strea mWriter = New
System.IO.Strea mWriter("c:\Pia nte.xml")
DSXML.WriteXml( xmlSW2, XmlWriteMode.Wr iteSchema)
xmlSW2.Flush()
xmlSW2.Close()
End Sub
I need to import this XML file into a NEW created ms-access table, but
i don't know how, and i cannot find any helpful suggestion on google.
Many Thanks 2 1877
Well i guess you can do 2 things
1 . really create a database from scratch , you can do this with ADOX (
Com interop in .Net ) as there is no managed libraray availlable wich can do
this
OR
2. Create a empty database , with empty tables in a Access database ( repair
and compress it after doing so in Access ) and now add this as a resource
in your executable so instead of creating a new database , your app simply
copies a empty database from it`s resource and fills this with the data
contained in the XML files ( no need for COM interop , much faster )
I have done option 2 numerous times and can show you an example if you want
Michel
"Marcolino" <ma************ @gmail.comschre ef in bericht
news:41******** *************** ***********@d45 g2000hsc.google groups.com...
Hi all,
I have an application that needs to import XML files into Database.
This XML file was generated by this:
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
Dim cmdXML As OleDb.OleDbComm and
Dim DScmdXML As OleDb.OleDbData Adapter
Dim DSXML As New DataSet()
Dim sqlXML As String = "SELECT * FROM List_Piante"
cmdXML = New OleDb.OleDbComm and(sqlXML, conn)
DScmdXML = New OleDb.OleDbData Adapter(cmdXML)
DScmdXML.Fill(D SXML, "List_Piant e")
DSXML.WriteXml( "Piante.xml ", XmlWriteMode.Wr iteSchema)
Dim xmlSW2 As System.IO.Strea mWriter = New
System.IO.Strea mWriter("c:\Pia nte.xml")
DSXML.WriteXml( xmlSW2, XmlWriteMode.Wr iteSchema)
xmlSW2.Flush()
xmlSW2.Close()
End Sub
I need to import this XML file into a NEW created ms-access table, but
i don't know how, and i cannot find any helpful suggestion on google.
Many Thanks
On 23 Mar, 09:36, "Michel Posseth [MCP]" <M...@posseth.c omwrote:
Well i guess you can do 2 things
1 . really create a database from scratch , you can do this with ADOX * (
Com interop in .Net ) as there is no managed libraray availlable wich can do
this
OR
2. Create a empty database , with empty tables in a Access database ( repair
and compress it after doing so in Access ) *and now add this as a resource
in your executable * so instead of creating a new database , your app simply
copies a empty database from it`s resource and fills this with the data
contained in the XML files ( no need for COM interop , much faster )
I have done option 2 numerous times and can show you an example if you want
Michel
"Marcolino" <marco.pozzu... @gmail.comschre ef in berichtnews:41* *************** *************** ***@d45g2000hsc .googlegroups.c om...
Hi all,
I have an application that needs to import XML files into Database.
This XML file was generated by this:
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
* * * *Dim cmdXML As OleDb.OleDbComm and
* * * *Dim DScmdXML As OleDb.OleDbData Adapter
* * * *Dim DSXML As New DataSet()
* * * *Dim sqlXML As String = "SELECT * FROM List_Piante"
* * * *cmdXML = New OleDb.OleDbComm and(sqlXML, conn)
* * * *DScmdXML = New OleDb.OleDbData Adapter(cmdXML)
* * * *DScmdXML.Fill( DSXML, "List_Piant e")
* * * *DSXML.WriteXml ("Piante.xml ", XmlWriteMode.Wr iteSchema)
* * * *Dim xmlSW2 As System.IO.Strea mWriter = New
System.IO.Strea mWriter("c:\Pia nte.xml")
* * * *DSXML.WriteXml (xmlSW2, XmlWriteMode.Wr iteSchema)
* * * *xmlSW2.Flush()
* * * *xmlSW2.Close()
End Sub
I need to import this XML file into a NEW created ms-access table, but
i don't know how, and i cannot find any helpful suggestion on google.
Many Thanks- Nascondi testo tra virgolette -
- Mostra testo tra virgolette -
MIchel,
very thanks for your help.
can you provide me the example for option 2?
Thanks This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Neo |
last post by:
I was wondering what is the "right" way to deal with datasets is.
Particularly sharing DataSets between forms. Here is my situation.
I have a simple Customer Database, that holds some information about
Customers including thier address. Lets call this Table "Customers".
The Customers Table references another Table for Address information,
for instance I have a table of "Zipcodes",
Now I want an app with two forms, one form to browse my...
|
by: JIM.H. |
last post by:
Hello,
Here is part of my code to retrieve some data from FoxPro and populate
DataGrid. It works fine. What is the best and easiest way to import data from
Dataset to a table in SQL Server.
' populate dataAdapter and dataset
cmdSelect = Conn.CreateCommand
cmdSelect.CommandText = sqlStr
Da.SelectCommand = cmdSelect
|
by: M. David Johnson |
last post by:
I cannot get my OleDbDataAdapter to update my database
table from my local dataset table. The Knowledge Base
doesn't seem to help - see item 10 below.
I have a Microsoft Access 2000 database which indexes
computer magazine articles for personal reference.
I am developing a Visual Basic.NET program whose sole
purpose is to enter new records into the database. No
updates to existing entries, no deletions, and no display
|
by: Soeren Gerlach |
last post by:
Hi,
some weeks ago I started to develop an application using Postgresql the
first time. I'm running 7.4.3 on a Linux box with a plain 2.6.7 kernel, the
storage is handled by 5 SATA disks, managed by a 3ware controller and using
a xfs filesystem. The DB server is a 3 Ghz P4 with 4 Gig of Ram, so the
machine is quite fast for most purposes I need it; the DB server is a pure
DB server, theres no application running on it.
I dump and...
|
by: Auddog |
last post by:
Hello all,
I'm fairly new to access database(s), but I work a lot with mysql. I was
wondering if there is a script file out there that I can get a hold of that
will create a dump file. I need to be able to backup this data nightly and
would like it if the script file could name the file with that days date (so
each dump file would be unique). I thank you for any help that you might be
able to provide.
A
| |
by: JIM.H. |
last post by:
Hello,
I am quite new in asp.net, here is the code I retrieve data from a web service
SVP.ThisWebService.loadMethod lm = new SVP.ThisWebService.loadMethod();
System.IO.StringReader sr = new System.IO.StringReader(lm.loadXlm());
DataSet ds = new DataSet();
ds.ReadXlm(new System.Xlm.XlmTextReader(sr)) ;
Now, I have data in ds, what is the easiest way to dump this dataset into a
table?
|
by: Shivam |
last post by:
Hi All,
I have a mysql dump file... something like.
__________________________________________________
CREATE TABLE nation (
ip int(11) unsigned NOT NULL default '0',
country char(2) NOT NULL default '',
KEY ip (ip)
);
|
by: Jenden0 |
last post by:
Ok, I'm trying to dump an SQL Server 2005 database to XML via C#, and
I'm having some troubles. I'm relatively new to the whole .net thing,
so there may be some stupid/basic questions/assumptions involved.
The first way I thought about doing it was dumping the entire dataset
to XML. However, as far as I can tell there's no way to populate the
entire dataset at once (I'm using an auto-generated dataset from Visual
Studio 2005). I think...
|
by: TYR |
last post by:
I have a large dump file that originated in a MySQL db; I need to get
it into an SQLite file.
Various options are suggested around the web; none of them seem to
work (most failing to import the thing in the first place). So I
removed the assorted taggery from each end, leaving just a big text
file taking the following format:
('value', 'value', 'value, 'value'),
('value','value','value','value')...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |