Hello guys, I want to ask, is there any other way to enter data to access database?
My current solution:
But I notice that, this is a very inefficient way because I noticed, a single symbol can crash the system.
For example, I entered ' inside the textbox, and submit it, the system will crash.
Dear sifus, can you teach me how to enter data in different way other than what I show above?
My current solution:
Code:
Dim sql as String = "insert into blablabla(bla1, bla2, bla3) values("
sql = sql & "'" & Textbox1.Text & "'," 'this is to fill bla1
sql = sql & "'" & Textbox2.Text & "'." 'this is to fill bla2
sql = sql & "'" & Textbox3.Text & “')" 'this is to fill bla3
command = New OleDb.OleDbCommand(sql, connection)
command.ExecuteNonQuery()
But I notice that, this is a very inefficient way because I noticed, a single symbol can crash the system.
For example, I entered ' inside the textbox, and submit it, the system will crash.
Dear sifus, can you teach me how to enter data in different way other than what I show above?