TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Bondari Developers
NA
10
9.7k
Select () certain Row from Table in Database to XML file
Feb 4 2016 3:23 AM
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());
}
Reply
Answers (
4
)
Logout
why we use abstract class