writexml returning nothing

Posts   
 
    
Anthony
User
Posts: 155
Joined: 04-Oct-2006
# Posted on: 10-May-2008 08:59:23   

using llblgen 2.5 dotnet2

        adapter.FetchEntityCollection(otblCustomers, bucket, prefetchPath)

'otblCustomers has many records

        otblCustomers.WriteXml(stblCustomersXML) 

'stblCustomersXML = nothing

any reason why itsreturns nothing when it was working previsouly

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 17-May-2008 23:00:50   

Hi Anthony,

This is an example copied from manual:

//[C#]
StreamWriter writer = new StreamWriter("customer.XML");
string customerXml = String.Empty;
customer.WriteXml(out customerXml);
writer.Write(customerXml);
writer.Close();

// now read it back
StreamReader reader = new StreamReader("customer.XML");
string xmlFromFile = reader.ReadToEnd();
reader.Close();
CustomerEntity customerFromXml = new CustomerEntity();
customerFromXml.ReadXml(xmlFromFile);
' [VB.NET]
Dim writer As New StreamWriter("customer.XML")
Dim customerXml As String = String.Empty
customer.WriteXml(ByRef customerXml)
writer.Write(customerXml)
writer.Close()

' now read it back
Dim reader As New StreamReader("customer.XML")
Dim xmlFromFile As String = reader.ReadToEnd()
reader.Close()
Dim customerFromXml As New CustomerEntity()
customerFromXml.ReadXml(xmlFromFile)

If the problem persists please post your real code snippet and some useful information (http://llblgen.com/TinyForum/Messages.aspx?ThreadID=7725). And next time please post issues at "Generated code" or "Bug and issues" forums so we can answer you in 12 hours (no days simple_smile ). "General chat" forum is intended for offtopic talk.

Cheers.

David Elizondo | LLBLGen Support Team