Recordset, XML, and Datagrid

G

Guest

Hi,

I have a VB6 program which create a recordset and save it as XML file. Then
I start a .Net framework application to read the XML file and populate a
datagrid, which works fine. However, when I do the same thing on the PPC
with .NET CF, nothing comes out from the datagrid on the PPC.

Here is the line I use in VB6 to save the recordset to a xml file.

rs.Save "abc.xml", adPersistXML

And here is the codes for the PPC to read the XML

fs = New FileStream("\My Documents\abc.xml", FileMode.Open)
xmlrd = New XmlTextReader(fs)
ds = New DataSet
ds.ReadXml(xmlrd)
DataGrid1.DataSource = ds

Any idea why? I thought it was the problem of schema field but even I
deleted it, I still got nothing.

Thanks in advance.
 
P

Peter Foot [MVP]

On .NETCF you can't bind the DataGrid to a DataSet but must specify an
individual table, try:-
DataGrid1.DataSource = ds.Tables(0)

Peter
 
S

Sampathd

Hi Peter,

I have a question. Is it recommended to use DataSets and Data Adaptors in a
..NETCF application. My app communicates with a SQL Server via a WiFi
Network. But in my design I am maitaining a dataset in the PPC. Is that
recomended in viw of performance. Is it better to have the app communicate
with the DB via WiFi Always?

TIA,

Cheers,
Sam.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top