Click here to Skip to main content
15,897,187 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,

Here i want to know how to get Schema Information from dataset,Actually i have written a code like this.

C#
for (int i = 0; i < ds.Tables.Count; i++)
               {
                   ds.Tables[i].WriteXml(filepath + "/" + "tblTeachers" + ".xml");
                   xmlDoc = new XmlDocument();
                   xmlDoc.PreserveWhitespace = true;
                   xmlDoc.Load(filepath + "/" + "tblTeachers" + ".xml");
                   //Encrypt(xmlDoc, " ", rsaKey, "rsaKey");
                   xmlDoc.Save(filepath + "/" + "tblTeachers" + ".xml");

               }


From this iam importing dataset information to Xml its working fine.But i want the Datatypes of perticular table means

SQL
Coloumn Names       DataType  AllowNulls

intTeacherID        int       No



i want the datatype information throgh xmal schema


Regards,

Anilkumar.D
Posted
Updated 11-Mar-12 23:40pm
v2
Comments
souidi abderrahman 12-Mar-12 5:51am    
hi,

your xml file must have an xsd schema!!
look at this link http://msdn.microsoft.com/en-us/library/atchhx4f.aspx

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900