S
Stijn Vanpoucke
Hi,
I've made a program with an access database. In my sql insert command I need
to use escape characters to insert text strings but te problem is that I
want to use escape chars in my text strings themselves to.
strSQL = "INSERT INTO tblKlanten (Naam, Voornaam, Adres, Postnummer,
Telefoon, Fax, Gsm, Email, Gastvrouw, Matras, Lattenbodum, Waveflex,
Donsdeken, Btwnummer, Geboortedatum, Echtgenoot, Opmerkingen, Aankooplb)"
strSQL += " VALUES ('" & txtNaam.Text & "','" & txtVoornaam.Text & "','" &
txtAdres.Text & "', " & cboWoonplaats.SelectedValue & ", '" &
txtTelefoon.Text & "', '" & txtFax.Text & "', '" & txtGsm.Text & "','" &
txtMail.Text & "','" & chkGastvrouw.CheckState & "', '" &
chkMatras.CheckState & "', '" & chkLattenbodum.CheckState & "', '" &
chkWaveflex.CheckState & "', '" & chkDonsdeken.CheckState & "', '" &
txtBtw.Text & "', '" & txtGeboortedatum.Text & "', '" & txtEchtgenoot.Text &
"', '" & txtOpmerkingen.Text & "', '" & txtAankooplb.Text & "' )"
So like txtNaam.text could be 'test'a' and i must be something like "test'a"
but I need to use '
I hope someone understands my problem, and coulde give an answer.
I've made a program with an access database. In my sql insert command I need
to use escape characters to insert text strings but te problem is that I
want to use escape chars in my text strings themselves to.
strSQL = "INSERT INTO tblKlanten (Naam, Voornaam, Adres, Postnummer,
Telefoon, Fax, Gsm, Email, Gastvrouw, Matras, Lattenbodum, Waveflex,
Donsdeken, Btwnummer, Geboortedatum, Echtgenoot, Opmerkingen, Aankooplb)"
strSQL += " VALUES ('" & txtNaam.Text & "','" & txtVoornaam.Text & "','" &
txtAdres.Text & "', " & cboWoonplaats.SelectedValue & ", '" &
txtTelefoon.Text & "', '" & txtFax.Text & "', '" & txtGsm.Text & "','" &
txtMail.Text & "','" & chkGastvrouw.CheckState & "', '" &
chkMatras.CheckState & "', '" & chkLattenbodum.CheckState & "', '" &
chkWaveflex.CheckState & "', '" & chkDonsdeken.CheckState & "', '" &
txtBtw.Text & "', '" & txtGeboortedatum.Text & "', '" & txtEchtgenoot.Text &
"', '" & txtOpmerkingen.Text & "', '" & txtAankooplb.Text & "' )"
So like txtNaam.text could be 'test'a' and i must be something like "test'a"
but I need to use '
I hope someone understands my problem, and coulde give an answer.