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
PankaJ D
NA
154
0
DataAdapter Code
Mar 10 2010 2:09 AM
I need to insert data using dataAdapter. I have using following code. Isthis code iscorrect or nt??
<<<<<<<<<<<<<<<<<<
private void btnSave_Click(object sender, EventArgs e)
{
SqlConnection cn;
string cnstring = "server=(local)\\SQLEXPRESS;Database=Test;Integrated Security=True";
cn = new SqlConnection(cnstring);
string sql;
sql = "insert into Insert1 values('" + txtname.Text + "'," + txtrno.Text + ",'" + txtadd.Text + "','" + cmdgender + "')";
cn.Open();
SqlDataAdapter da = new SqlDataAdapter(sql, cn);
cn.Close();
}
>>>>>>>>>>>>>>>>
Reply
Answers (
2
)
how can i get the text in the file upload control
Menu removed if used as context menu