Ask a Question related to ASP Database, Design and Development.
-
Tim johnson #1
SQL Insert Query using ADO
Hi,
I am sending an SQL Insert query to my ADO connection
object, my Insert query looks a litte like this...
INSERT INTO tblRequests
(RequestedBy,ContactPerson,RequestReason) VALUES ('Test
Person','Joe Bloggs','The main reason's are this...')
Notice that the value of the RequestReason field contains
a ' character in the word "Reason's", SQL seem to handle
this as the end of the value for that field. How can I
stop this from happening? I don't want to have to remove
all ' chars from each field value?
Help. Tia!
Tim johnson Guest
-
INSERT Statement Query
Hi, I am about to embark on performing a data migration into a MySQL database. The goal is to be able to take the input data, and generate SQL... -
INSERT QUERY WEIGHT
Hi I would like to know if there is a limit in mysql to the weight of an insert query, I mean which size of data can I insert in my table at the... -
mulitple query insert problem
Ben. I am doing the scenario where the id key is auto generated from Access. I know I need to get that id to do the second insert into the... -
INSERT error :: Updateable query?
I am picking up an error message on a straightforward INSERT - do I need an optimistic-type to get this working....here is is the error: ... -
Query to insert into current record
It sounds as though you are using one file (table), and you want all this activity to take place within the one file. You don't say where (what... -
Ken Schaefer #2
Re: SQL Insert Query using ADO
To escape a single quote, you need to double it, so your SQL statement looks
like this:
INSERT INTO
tblRequests
(
RequestedBy
, ContactPerson
, RequestReason
)
VALUES
(
'Test Person'
, 'Joe Bloggs'
, 'The main reason''s are this...'
)
(that's two ' in a row, not a double quote)
Cheers
Ken
"Tim johnson" <timj@smithscity.co.nz> wrote in message
news:054701c366aa$d855c900$a401280a@phx.gbl...
: Hi,
:
: I am sending an SQL Insert query to my ADO connection
: object, my Insert query looks a litte like this...
:
: INSERT INTO tblRequests
: (RequestedBy,ContactPerson,RequestReason) VALUES ('Test
: Person','Joe Bloggs','The main reason's are this...')
:
: Notice that the value of the RequestReason field contains
: a ' character in the word "Reason's", SQL seem to handle
: this as the end of the value for that field. How can I
: stop this from happening? I don't want to have to remove
: all ' chars from each field value?
:
: Help. Tia!
Ken Schaefer Guest



Reply With Quote

