The Corner
Would you like to react to this message? Create an account in a few clicks or log in to continue.

The CornerLog in

descriptionHelp needed, VB.NET questions EmptyHelp needed, VB.NET questions

more_horiz
Hello guys, I want to ask, is there any other way to enter data to access database?

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?

descriptionHelp needed, VB.NET questions EmptyRe: Help needed, VB.NET questions

more_horiz
Learn code VB.NET ah
privacy_tip Permissions in this forum:
You cannot reply to topics in this forum
power_settings_newLogin to reply