Maziar,
If to pass an apostrophe into a database double up the apostrophe.
So If a user were to enter: 'sda
You would do this:
Dim StringForDatabase As String = TextBox1.Text.Replace("'", "''")
An enlargement of the quotes would look like this: " ' ", " ' ' "
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer
Free code library at:
www.aboutfortunate.com
"Out of chaos comes order."
Nietzche
"Maziar Aflatoun" <> wrote in message
news:a83Ab.70538$ ble.rogers.com...
> Hi everyone,
>
> I have a form that stores the information it collects into a database.
> However, for textboxes if I have a user input as something like
> this 's 'sda, the ' causes it to fails (ex. Incorrect syntax near
> 's'...etc). Is there a function that would make this database safe?
>
> Thank you
> Maz.
>
>