My name is Shefeek Jinnah.I am a Software Engineer by profession.I completed my graduation from Mar Athanasious College Of Engineering,Kothamangalam,Kerala in the year 2008.Coding is my passion and technical expedition is my pursuit.
I have been writing technical blogs for the last few years.But i find myself difficult in managing all the blogs and communities.So i decided to combine all my blogs and keep it under a single roof and here it is.The intention of this website is to share information so that it will be useful for me as well as for the visitors.I will post everything technicaly that goes through my head daily and which i am involved in.
I offer free technical assistance though the discussion forum of this website.You can ask me for any technical assistance.I will provide you with enough information if it is within my range or i can get you the details soon after consulting with my senior’s
http://www.shefeekj.com/
e hënë, 26 janar 2009
e shtunë, 16 qershor 2007
Data Insertion
In this chapter let us examine how to insert data into a table from a webform
Suppose we have a text box named 'sname' and a button named 'insert' .Our aim is to
insert the value in the text box to the table named 'reg' when the button is clicked
steps
1.Establish the connection
2.Double click on the button
Since the event is to happen when the button is clicked,the code for insertion should be written below buttons click event heading.When you double click on the button,you will be guided to this location
Code
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click (No need to write the above line.It will be there)
con.open()
//open the connection
cmd.CommandType = CommandType.Text
cmd.CommandText = "insert into reg values('" & Me.sname.Text & "')"
//code to insert
cmd.ExecuteNonQuery()
con.Close()
Suppose we have a text box named 'sname' and a button named 'insert' .Our aim is to
insert the value in the text box to the table named 'reg' when the button is clicked
steps
1.Establish the connection
2.Double click on the button
Since the event is to happen when the button is clicked,the code for insertion should be written below buttons click event heading.When you double click on the button,you will be guided to this location
Code
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click (No need to write the above line.It will be there)
con.open()
//open the connection
cmd.CommandType = CommandType.Text
cmd.CommandText = "insert into reg values('" & Me.sname.Text & "')"
//code to insert
cmd.ExecuteNonQuery()
con.Close()
Abonohu te:
Postimet (Atom)