Recordset, XML, and Datagrid

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
On .NETCF you can't bind the DataGrid to a DataSet but must specify an
individual table, try:-
DataGrid1.DataSource = ds.Tables(0)

Peter
 
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.
 
Back
Top