all groups > dotnet compact framework > october 2005 >
You're in the

dotnet compact framework

group:

Recordset, XML, and Datagrid


Recordset, XML, and Datagrid Worrow
10/21/2005 9:37:03 PM
dotnet compact framework:
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.

Re: Recordset, XML, and Datagrid Peter Foot [MVP]
10/23/2005 12:00:00 AM
On .NETCF you can't bind the DataGrid to a DataSet but must specify an
individual table, try:-
DataGrid1.DataSource = ds.Tables(0)

Peter

--
Peter Foot
Windows Embedded MVP
http://www.inthehand.com | http://www.peterfoot.net

[quoted text, click to view]

Re: Recordset, XML, and Datagrid Sampathd
10/24/2005 7:23:11 PM
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.

[quoted text, click to view]

AddThis Social Bookmark Button