Hello C# Corner ,
I want to select only one row from table and save that data of the only selsected row in xml file,
That row i want its information will be (TextBox.Text). Any information will be in the textbox it will save data to xml file.
this is my Code:
ConnectionString = @"Data Source=LocalDB\SQLEXPRESS;Initial Catalog=TestDB;Integrated Security=True";
connection = new SqlConnection(ConnectionString);
sql = "Select * from Table_Sub where ActivationCode = "" "; // Please can someone help me here.
try
{
connection.Open();
adapter = new SqlDataAdapter(sql, connection);
adapter.Fill(ds);
connection.Close();
ds.WriteXml("Subscription.xml");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
Abdu RafeeqPosted Feb 7, 2016, 3:08 AM
Bondari DevelopersPosted Feb 4, 2016, 3:55 AM
Bondari DevelopersPosted Feb 4, 2016, 3:55 AM
Abdu RafeeqPosted Feb 4, 2016, 3:37 AM