Hi Bonnie,
thanks for quick reply, im new in vb.net where do i put this code?
Public Class Form1
Inherits System.Windows.Forms.Form
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
string TestConnection = "server=(local);database=MyDataBase;uid=sa;pwd=MyPassword";
SqlDataAdapter da = new SqlDataAdapter("select * from bob", this.TestConnection);
MyDataSet ds = new MyDataSet();
da.Fill(ds, "MyTable");
ds.WriteXml("MyData.xml");
End Sub
End Class
>Ryan,
>
>Read the data into a Typed DataSet based on your .xsd. Then simply use the WriteXml() method of the DataSet.
>
>
>string TestConnection = "server=(local);database=MyDataBase;uid=sa;pwd=MyPassword";
>SqlDataAdapter da = new SqlDataAdapter("select * from bob", this.TestConnection);
>MyDataSet ds = new MyDataSet();
>da.Fill(ds, "MyTable");
>ds.WriteXml("MyData.xml");
>
>
>~~Bonnie
>
>
>
>>Hi to All,
>>
>>
>> how to export dbf file to xml data file i have a schema(xsd file) for the xml.
>>
>>TIA
>>ryan.