I have a text box invoice no on windows form and i need to retrieve data from database and everytime user click on the add button the invoice no should increment by 1
increment value of textbox and save it in the database
Collapse
X
-
Bytes.com isn't a code or homework service, we're a community of like minded people who come together to help those who are willing to help themselves.
Show us what you've tried and we will do everything we can to nudge you in the right direction but we will not just do the work for you. -
Code:private void button3_Click(object sender, EventArgs e) { con.Open(); da = new SqlDataAdapter("Select UserId from tab_userinformation ",con); ds = new DataSet(); da.Fill(ds); textBox1.Text = ds.Tables[0].Rows[0][0].ToString(); con.Close(); }Comment
-
I'm not understanding what it is you're having trouble with, or what you're trying to accomplish for that matter.Comment
Comment