473,401 Members | 2,068 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,401 software developers and data experts.

Export Access query as XML and read into dotnet DataSet??

Hi,

(I'm new to XML)

I can export data from Access as an XML file (with schema integrated in
the XML file). I can read it into a DotNet DataSet, but the schema is
not correct that is - I do not get the right columns.

Is there some kinda trick to convert the XML to a
DotNet-DataSet-readbable file??

Thanks!

M O J O
Nov 20 '05 #1
8 1288
Why don't you just query Access directly from .NET?
Why go through the step of exporting to XML, then trying to read it in?

what are you really trying to accomplish?

"M O J O" <mojo@_no_spam_delete_this_newwebsolutions.dk> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi,

(I'm new to XML)

I can export data from Access as an XML file (with schema integrated in
the XML file). I can read it into a DotNet DataSet, but the schema is
not correct that is - I do not get the right columns.

Is there some kinda trick to convert the XML to a
DotNet-DataSet-readbable file??

Thanks!

M O J O

Nov 20 '05 #2
You best best is to use ADO.NET to connect to Access rather than use its XML
file. In the future, this may be different, but the Access format is not the
same as the DataSet format of XML.

If you have to move from Access to DataSet, I would look at creating a XSLT
stylesheet and transforming to the DataSet XML using it. This is a much more
reuseable method of conversion. Not sure if anyone has already tackled this
monster, so I would do a search before writing it myself.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** ********************
Think Outside the Box!
************************************************** ********************
"M O J O" <mojo@_no_spam_delete_this_newwebsolutions.dk> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi,

(I'm new to XML)

I can export data from Access as an XML file (with schema integrated in
the XML file). I can read it into a DotNet DataSet, but the schema is
not correct that is - I do not get the right columns.

Is there some kinda trick to convert the XML to a
DotNet-DataSet-readbable file??

Thanks!

M O J O

Nov 20 '05 #3
Cor
Hi Mojo,

In addition to the other messages, when you want to use your access direct,
you can of course connect direct.

But when you want to use it as an export file I think that if you cannot
read an XML as a dataset you can always convert it using the XMLreader or
the LoadXML (the document object model).

A dataset is not that difficult to make although as it sometimes look.

Dim ds As New DataSet
Dim dt As New DataTable("Active")
dt.Columns.Add(New DataColumn("String", Type.GetType("System.String")))
dt.Columns.Add(New DataColumn("Ident", Type.GetType("System.Int32")))
Dim keys(0) As DataColumn
keys(0) = dt.Columns("Ident")
dt.PrimaryKey = keys
ds.Tables.Add(dt)

I hope this helps?

Cor
Nov 20 '05 #4
Hi Dino,

I'm creating a program that will accept data from several sources
(Access, Excel and so on).

So I want to use common interface to accept these sources.

Therefor I need to be able to easily read the XML file from access.

M O J O

Dino Chiesa [Microsoft] wrote:
Why don't you just query Access directly from .NET?
Why go through the step of exporting to XML, then trying to read it in?

what are you really trying to accomplish?

"M O J O" <mojo@_no_spam_delete_this_newwebsolutions.dk> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi,

(I'm new to XML)

I can export data from Access as an XML file (with schema integrated in
the XML file). I can read it into a DotNet DataSet, but the schema is
not correct that is - I do not get the right columns.

Is there some kinda trick to convert the XML to a
DotNet-DataSet-readbable file??

Thanks!

M O J O



Nov 20 '05 #5
Please see my answer to Dino.

XSLT? I can hardly spell it! :o)

I just wanted it to be easy.

M O J O

Cowboy (Gregory A. Beamer) wrote:
You best best is to use ADO.NET to connect to Access rather than use its XML
file. In the future, this may be different, but the Access format is not the
same as the DataSet format of XML.

If you have to move from Access to DataSet, I would look at creating a XSLT
stylesheet and transforming to the DataSet XML using it. This is a much more
reuseable method of conversion. Not sure if anyone has already tackled this
monster, so I would do a search before writing it myself.


Nov 20 '05 #6
Access and Excel can both be queried via ADO.NET - using connection strings,
if I am not mistaken. this will get you a dataset, without having to first
"export to XML".

What's the "and so on"?

ADO.NET can do CSV, SQL server, other databases... ?

"M O J O" <mojo@_no_spam_delete_this_newwebsolutions.dk> wrote in message
news:OI**************@TK2MSFTNGP11.phx.gbl...
Hi Dino,

I'm creating a program that will accept data from several sources
(Access, Excel and so on).

So I want to use common interface to accept these sources.

Therefor I need to be able to easily read the XML file from access.

M O J O

Dino Chiesa [Microsoft] wrote:
Why don't you just query Access directly from .NET?
Why go through the step of exporting to XML, then trying to read it in?

what are you really trying to accomplish?

"M O J O" <mojo@_no_spam_delete_this_newwebsolutions.dk> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi,

(I'm new to XML)

I can export data from Access as an XML file (with schema integrated in
the XML file). I can read it into a DotNet DataSet, but the schema is
not correct that is - I do not get the right columns.

Is there some kinda trick to convert the XML to a
DotNet-DataSet-readbable file??

Thanks!

M O J O


Nov 20 '05 #7
Access and Excel can both be queried via ADO.NET - using connection strings,
if I am not mistaken. this will get you a dataset, without having to first
"export to XML".

What's the "and so on"?

ADO.NET can do CSV, SQL server, other databases... ?

"M O J O" <mojo@_no_spam_delete_this_newwebsolutions.dk> wrote in message
news:OI**************@TK2MSFTNGP11.phx.gbl...
Hi Dino,

I'm creating a program that will accept data from several sources
(Access, Excel and so on).

So I want to use common interface to accept these sources.

Therefor I need to be able to easily read the XML file from access.

M O J O

Dino Chiesa [Microsoft] wrote:
Why don't you just query Access directly from .NET?
Why go through the step of exporting to XML, then trying to read it in?

what are you really trying to accomplish?

"M O J O" <mojo@_no_spam_delete_this_newwebsolutions.dk> wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi,

(I'm new to XML)

I can export data from Access as an XML file (with schema integrated in
the XML file). I can read it into a DotNet DataSet, but the schema is
not correct that is - I do not get the right columns.

Is there some kinda trick to convert the XML to a
DotNet-DataSet-readbable file??

Thanks!

M O J O


Nov 20 '05 #8
On Thu, 11 Dec 2003 20:05:06 +0100, M O J O <mojo@_no_spam_delete_this_newwebsolutions.dk> wrote:

¤ Hi Dino,
¤
¤ I'm creating a program that will accept data from several sources
¤ (Access, Excel and so on).
¤
¤ So I want to use common interface to accept these sources.
¤
¤ Therefor I need to be able to easily read the XML file from access.
¤
¤ M O J O
¤
¤ Dino Chiesa [Microsoft] wrote:
¤ > Why don't you just query Access directly from .NET?
¤ > Why go through the step of exporting to XML, then trying to read it in?
¤ >
¤ > what are you really trying to accomplish?
¤ >
¤ > "M O J O" <mojo@_no_spam_delete_this_newwebsolutions.dk> wrote in message
¤ > news:%2****************@TK2MSFTNGP10.phx.gbl...
¤ >
¤ >>Hi,
¤ >>
¤ >>(I'm new to XML)
¤ >>
¤ >>I can export data from Access as an XML file (with schema integrated in
¤ >>the XML file). I can read it into a DotNet DataSet, but the schema is
¤ >>not correct that is - I do not get the right columns.
¤ >>
¤ >>Is there some kinda trick to convert the XML to a
¤ >>DotNet-DataSet-readbable file??
¤ >>

I don't see the need for ADO here. Access, Excel, dBase, etc can all be queried directly from
ADO.NET (with the ODBC and OLEDB namespaces) using the same ODBC and OLEDB connections that are used
under ADO.
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 20 '05 #9

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

Similar topics

49
by: Relaxin | last post by:
It is just me or has MS created some of the worst ways to access and display data? You can use a DataSet, but if you want to sort or filter the data to must use a DataView which is created from...
9
by: M O J O | last post by:
Hi, (I'm new to XML) I can export data from Access as an XML file (with schema integrated in the XML file). I can read it into a DotNet DataSet, but the schema is not correct that is - I do...
1
by: Charlie | last post by:
Hello, I have data in an Access table that I would like to export to multiple HTML tables. I would like to split the data in the Access table (about 92,000 records) into multiple HTML...
4
by: Hans [DiaGraphIT] | last post by:
Hi! I want to export a dataset to an excel file. I found following code on the net... ( http://www.codeproject.com/csharp/Export.asp ) Excel.ApplicationClass excel = new ApplicationClass();...
3
by: BobAchgill | last post by:
I am trying to read in a xml file that I exported from my MSAccess table using the following lines of code but it bombs. Is this the right code? Is there a way to get a clean export from Access...
9
by: dennist685 | last post by:
I created a web project named 'Access' in C:\Inetpub\wwwroot\Access and dropped an .mdb there. I dragged a DetailView to the form, configured it to show two fields of a table, and got...
12
by: Selva Chinnasamy | last post by:
Hi I am using batch commands against Ms-Access and getting an error Message "Characters found after end of SQL statement." String Here is my sql Dim str_screens As String = "Select * from Screens...
1
by: smaczylo | last post by:
Hello, I've recently been asked to work with Microsoft Access, and while I feel quite comfortable with Excel, I'm at a complete loss with databases. If someone could help me with this issue I'm...
1
by: rhbourne | last post by:
Hello, I'm doing something wrong here, and it's driving me nuts. A very strange thing is happening with a query that populates an XML export function. 1. I have a query and its XML export...
17
by: chadh | last post by:
Hello, I'm having some troubles exporting a query to a csv file. I am able to use the doCMD.TransferText to output the query to the csv file, however, I cannot get it to use the Export...
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: 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?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.