Hello,
I have a problem when i want to insert a string into a table using SQL Insert Into statement
example:
it gives an error because in the string is an '
how can i resolve this without replacing the ' with something else?
I have a problem when i want to insert a string into a table using SQL Insert Into statement
example:
Code:
set db = currentdb()
set rs = db.openrecordset(AnSQLstr, dbopensnapshot,dbfailonerror)
rs ....
....
'examplefield: RS!afield has this string = "an example that has an ' inside"
when i run
db.execute "insert into atbl(tstrow) values ('" & RS!afield & "';", dbfailonerror)
how can i resolve this without replacing the ' with something else?