export

Topics: General Topic, NetSqlAzMan Core
Jan 3 at 9:53 PM
how do I make the export work, either for the store or an application. I have the following code:
StringBuilder sb = new StringBuilder();
        XmlWriter xWrt = XmlWriter.Create(sb);
        storeContext.myAzManStoreRef.Export(xWrt, true, true, true, null);
        azManAppContext.azManApp.Export(xWrt, true, true, true, null);
And the result set in the stringbuilder is always empty even though I have Items defined in an netsqlazman application.
Is it because I have the owner object set to null. I can't find any documentation on what it should be set to or what it means. Any help will be appreciated.
Coordinator
Jan 4 at 11:40 AM
Hi,
the last parameter of the Export method (owner object) is the object from which you are exporting ... (this is for design requirements)
See the example below:
            StringBuilder sb = new StringBuilder();
            XmlWriter xWrt = XmlWriter.Create(sb, new XmlWriterSettings() { ConformanceLevel = ConformanceLevel.Fragment });
            SqlAzManStorage storage = new SqlAzManStorage("data source=.;initial catalog=NetSqlAzManStorage;Integrated Security=True");
            NetSqlAzMan.Interfaces.IAzManStore store = storage["My Store"];
            //the Store.Export method need to pass the parent from which you are exporting. In this case the Storage
            store.Export(xWrt, true, true, true, storage);
            Console.WriteLine(sb.ToString());
I hope this could help.
Regards,
Andrea.
Jan 5 at 1:24 AM

Thanks

Jan 8 at 6:50 PM

I tried your suggestions, and I don't get anything back from export. I know I have authorizations, any thoughts? Thanks

ben

Coordinator
Jan 11 at 9:27 AM
Post here your code fragment please.
Jan 14 at 4:58 PM

StringBuilder sb = new StringBuilder();

XmlWriter xWrt = XmlWriter.Create(sb,

new XmlWriterSettings { ConformanceLevel = ConformanceLevel.Fragment });

StringBuilder sb = new StringBuilder();

XmlWriter xWrt = XmlWriter.Create(sb,
new XmlWriterSettings { ConformanceLevel = ConformanceLevel.Fragment });
// myAzManStoreRef is an reference to an Azman store using dbContext.GetStore(storeName);
// and dbcontext is an open IAzManStorage dbContext

storeContext.myAzManStoreRef.Export(xWrt,

true, true, true, dbContext);
Also, can you provided some advice about concurrancy using myAzManStoreRef.Applications[AppName]
is this object capable of handling multiple concurrent requests, either read or update, and is there a different guidance for read versus update?