Imports system.data.sqlclient
Public class Form1
dim con as new sqlconnection
dim cmd as new sqlcommand
dim dr as new datareader
public sub Button1_click()
Try
con = new sqlconnection("Type ur Connection String")
con.open()
cmd = new sqlcommand("Insert into table1 values ('" & TextBox1.Text &"','" & TextBox2.Text"')",con)
i=cmd.ExecuteNonquery()
msgbox("Record Inserted ",i)
Catch ex as Exception
End Try
con.open()
End Sub
Thursday, October 16, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment