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
Kamala Veni
NA
65
21.5k
C#,how to get the seven day data to save in table?
Feb 26 2016 7:15 AM
Hi
I am Having 7 Days form with Particular field including date,day,time.
am getting the data to store in sql table,database through the form.
While am Selecting 7 days using calendar to entry the record in the form ,
its saving only the 7Th day record,1-6 day records not store in database table?
HOW TO CLEAR THE ERROR ?
Ex:
SqlConnection cnn = new SqlConnection();
cnn.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["cp"].ConnectionString; cnn.Open();
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "select * from tbl_sch111";
cmd.Connection = cnn;
SqlDataAdapter da = new SqlDataAdapter();
da.SelectCommand = cmd;
DataSet ds = new DataSet();
da.Fill(ds, "tbl_sch111");
SqlCommandBuilder cb = new SqlCommandBuilder(da);
DataRow drow = ds.Tables["tbl_sch111"].NewRow();
drow["Date"] = lb.Text=l.Text;
drow["Time"] = lbb.Text= l2.Text;
drow["Day"] = lbd.Text= l3.Text;
drow["blk_1"] = txtbl1.Text= TextBox1.Text;
drow["blk_2"] = txtbl2.Text= TextBox2.Text;
drow["blk_3"] = txtbl3.Text= TextBox3.Text;
drow["blk_4"] = txtbl4.Text= TextBox4.Text;
drow["blk_5"] = txtbl5.Text= TextBox5.Text;
drow["blk_6"] = txtbl6.Text= TextBox6.Text;
drow["blk_7"] = txtbl7.Text= TextBox7.Text;
drow["blk_8"] = txtbl8.Text= TextBox8.Text;
drow["blk_9"] = txtbl9.Text= TextBox9.Text;
drow["blk_10"] = txtbl10.Text= TextBox10.Text;
ds.Tables["tbl_sch111"].Rows.Add(drow);
da.Update(ds, "tbl_sch111");
Reply
Answers (
1
)
How to Pass Value in JavaScript ?
Describe/define - when to de-normalization data?