Database to xml
-
hi to all, I want to convert my MS Access databse/table in to an .xml file. How can I do it? help me.
Pravin
-
hi to all, I want to convert my MS Access databse/table in to an .xml file. How can I do it? help me.
Pravin
Its simple, read data in all the table and generate xml file...
M Aamir Maniar aamirOnline.com
-
Its simple, read data in all the table and generate xml file...
M Aamir Maniar aamirOnline.com
can u plz send me example for this. I am new to c#.
Pravin
-
can u plz send me example for this. I am new to c#.
Pravin
You should start with easier tasks if you're new to C#.
-
can u plz send me example for this. I am new to c#.
Pravin
I use these code to generate a xml file(i use SqlServer2005 for the DB), for example:
string MyConn = ConfigurationManager.ConnectionStrings["Connect"].ConnectionString; // Connect is my connection name in app config SqlConnection conn = new SqlConnection("MyConn"); string SqlStatement = "SELECT * FROM my_table" SqlDataAdapter adapt = new SqlDataAdapter(SqlStatement,conn); DataSet ds = new DataSet(); DataTable dt = new DataTable("my_table"); adapt.Fill(dt); ds.Tables.Add(dt); ds.WriteXml (@"..\..\myXmlFile.xml") //create a xml file name myXmlFile
After that build and execute u'r application.In windows explorer,Locate and Find u'r xml file on u'r project folder..Hope Can Help U
Best Regards, Tomi
-
I use these code to generate a xml file(i use SqlServer2005 for the DB), for example:
string MyConn = ConfigurationManager.ConnectionStrings["Connect"].ConnectionString; // Connect is my connection name in app config SqlConnection conn = new SqlConnection("MyConn"); string SqlStatement = "SELECT * FROM my_table" SqlDataAdapter adapt = new SqlDataAdapter(SqlStatement,conn); DataSet ds = new DataSet(); DataTable dt = new DataTable("my_table"); adapt.Fill(dt); ds.Tables.Add(dt); ds.WriteXml (@"..\..\myXmlFile.xml") //create a xml file name myXmlFile
After that build and execute u'r application.In windows explorer,Locate and Find u'r xml file on u'r project folder..Hope Can Help U
Best Regards, Tomi
Thanks Tomi
Pravin