Go down
New User
New User
Republican Party Liberal Democrats Donald Trump
Posts : 6
Join date : 2016-08-05
Male Age : 23
Location : Bishan
View user profile

Help needed, VB.NET questions Empty Help needed, VB.NET questions

on Fri 05 Aug 2016, 9:19 am
Hello guys, I want to ask, is there any other way to enter data to access database?

My current solution:
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)
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?
New User
New User
Conservative Party Les Républicains
Gary Johnson
Posts : 43
Join date : 2015-12-16
Male Age : 29
Location : Malaysia
View user profile

Help needed, VB.NET questions Empty Re: Help needed, VB.NET questions

on Mon 08 Aug 2016, 8:44 am
Learn code VB.NET ah
Back to top
Permissions in this forum:
You cannot reply to topics in this forum