How to INSERT data from Textbox using Oledb?

seahck

Member
Joined
Jul 12, 2004
Messages
6
Programming Experience
Beginner
How to INSERT data from Textbox using Oledb?

Someone know how to add data from textbox into database using Oledb and INSERT command?

thank You very much?
 

mzim

Well-known member
Joined
Jun 3, 2004
Messages
187
Location
Other side of the rock
Programming Experience
1-3
VB.NET:
 Dim cn As New OledbConnection()
 		 Dim cmdtext As String = "insert into smplsave values('" & TextBox1.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "')"
 		Dim cm As New OledbCommand(cmdtext, cn)
 		cm.ExecuteNonQuery()
 
Top Bottom