|
صفحة: 343
{ protected void Page–Load ( object sender , EventArgs e ) public DataSet ds = new DataSet (); יצירת קשר למסד הנתונים SqlConnection conn = new SqlConnection ( connStr ); ated Security = True ; User Instance = True" ; Source =. \ SQLEXPRESS ; AttachDbFilename = D : \ asp \ WebSite 4 \ App–Data \ DataBases \ ExampleDB . mdf ; Integr string connStr = @ "Data // אחזור נתונים ממסד הנתונים // adapter . Fill ( ds , "tblExample" ); SqlDataAdapter adapter = new SqlDataAdapter ( cmd ); conn . Open (); cmd . Connection = conn ; cmd . CommandText = "Select * from tblExample" ; SqlCommand cmd = new SqlCommand (); יצירת קובץ XML המכיל סכמה ds . WriteXml ( "d : \\ asp \\ tblExample . xml" , XmlWriteMode . WriteSchema ); // סגירת הקשר למסד הנתונים conn . Close (); // { script > body > form > < form id = "form 1 " runat = "server" > < body > head > < title > Example title > < head id = "Head 1 " runat = "server" > < html xmlns = "http : // www . w 3 . org / 1999 / xhtml" >
|

|