Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asptoday_discuss thread: SQL QUERIES IN ASP: VAR'S W/ APOSTROPHES


Message #1 by "Trish Donnell" <tdonnell@s...> on Fri, 12 Jul 2002 18:04:21
Usually when I have strings containing apostrophes in my SQL queries, I 
just replace them with the ASCII code before sending to DB.  That worked 
fine until now, since I'm only using the DB to view and print records 
(directly from DB), not for the web.  So the records print with 
the "&#39;" in them.  

Is there another way around writing SQL queries so the 'real' apostrophe 
actually gets passed into the DB??

Thank You!!
Trish
Message #2 by "Zhang, Yongrong" <Yongrong.Zhang@R...> on Fri, 12 Jul 2002 13:25:26 -0400
use "set indetifier on, set identifier off". 

-----Original Message-----
From: Trish Donnell [mailto:tdonnell@s...]
Sent: Friday, July 12, 2002 2:04 PM
To: ASPToday Discuss
Subject: [asptoday_discuss] SQL QUERIES IN ASP: VAR'S W/ APOSTROPHES


Usually when I have strings containing apostrophes in my SQL queries, I 
just replace them with the ASCII code before sending to DB.  That worked 
fine until now, since I'm only using the DB to view and print records 
(directly from DB), not for the web.  So the records print with 
the "&#39;" in them.  

Is there another way around writing SQL queries so the 'real' apostrophe 
actually gets passed into the DB??

Thank You!!
Trish


======== H =========
 This email message may contain legally privileged and/or confidential
information.  If you are not the intended recipient(s), or the employee or
agent responsible for the delivery of this message to the intended
recipient(s), you are hereby notified that any disclosure, copying,
distribution, or use of this email message is prohibited.  If you have
received this message in error, please notify the sender immediately by
e-mail and delete this email message from your computer. Thank you.

Message #3 by "Trish Donnell" <tdonnell@s...> on Fri, 12 Jul 2002 18:51:54
where can i find this?  are you talking about on the database?  or in my 
asp code?

> use "set indetifier on, set identifier off". 

-----Original Message-----
From: Trish Donnell [mailto:tdonnell@s...]
Sent: Friday, July 12, 2002 2:04 PM
To: ASPToday Discuss
Subject: [asptoday_discuss] SQL QUERIES IN ASP: VAR'S W/ APOSTROPHES


Usually when I have strings containing apostrophes in my SQL queries, I 
just replace them with the ASCII code before sending to DB.  That worked 
fine until now, since I'm only using the DB to view and print records 
(directly from DB), not for the web.  So the records print with 
the "&#39;" in them.  

Is there another way around writing SQL queries so the 'real' apostrophe 
actually gets passed into the DB??

Thank You!!
Trish


======== H =========
 This email message may contain legally privileged and/or confidential
information.  If you are not the intended recipient(s), or the employee or
agent responsible for the delivery of this message to the intended
recipient(s), you are hereby notified that any disclosure, copying,
distribution, or use of this email message is prohibited.  If you have
received this message in error, please notify the sender immediately by
e-mail and delete this email message from your computer. Thank you.

Message #4 by "Zhang, Yongrong" <Yongrong.Zhang@R...> on Fri, 12 Jul 2002 13:48:00 -0400
You can do it either way: 
1) from asp, do conn.execute("set identifier on")
2) from dbms, run the script
------------------------------------------

-----Original Message-----
From: Trish Donnell [mailto:tdonnell@s...]
Sent: Friday, July 12, 2002 2:52 PM
To: ASPToday Discuss
Subject: [asptoday_discuss] RE: SQL QUERIES IN ASP: VAR'S W/ APOSTROPHES


where can i find this?  are you talking about on the database?  or in my 
asp code?

> use "set indetifier on, set identifier off". 

-----Original Message-----
From: Trish Donnell [mailto:tdonnell@s...]
Sent: Friday, July 12, 2002 2:04 PM
To: ASPToday Discuss
Subject: [asptoday_discuss] SQL QUERIES IN ASP: VAR'S W/ APOSTROPHES


Usually when I have strings containing apostrophes in my SQL queries, I 
just replace them with the ASCII code before sending to DB.  That worked 
fine until now, since I'm only using the DB to view and print records 
(directly from DB), not for the web.  So the records print with 
the "&#39;" in them.  

Is there another way around writing SQL queries so the 'real' apostrophe 
actually gets passed into the DB??

Thank You!!
Trish


======== H =========
 This email message may contain legally privileged and/or confidential
information.  If you are not the intended recipient(s), or the employee or
agent responsible for the delivery of this message to the intended
recipient(s), you are hereby notified that any disclosure, copying,
distribution, or use of this email message is prohibited.  If you have
received this message in error, please notify the sender immediately by
e-mail and delete this email message from your computer. Thank you.



======== H =========
 This email message may contain legally privileged and/or confidential
information.  If you are not the intended recipient(s), or the employee or
agent responsible for the delivery of this message to the intended
recipient(s), you are hereby notified that any disclosure, copying,
distribution, or use of this email message is prohibited.  If you have
received this message in error, please notify the sender immediately by
e-mail and delete this email message from your computer. Thank you.

Message #5 by "Trish Donnell" <tdonnell@s...> on Fri, 12 Jul 2002 19:07:08
thanks...

i tried the first one, but an error returned saying the token "identifier" 
wasn't valid.  i'm sending this data to an IBM AS400 - does that help?

> You can do it either way: 
1) from asp, do conn.execute("set identifier on")
2) from dbms, run the script
------------------------------------------

-----Original Message-----
From: Trish Donnell [mailto:tdonnell@s...]
Sent: Friday, July 12, 2002 2:52 PM
To: ASPToday Discuss
Subject: [asptoday_discuss] RE: SQL QUERIES IN ASP: VAR'S W/ APOSTROPHES


where can i find this?  are you talking about on the database?  or in my 
asp code?

> use "set indetifier on, set identifier off". 

-----Original Message-----
From: Trish Donnell [mailto:tdonnell@s...]
Sent: Friday, July 12, 2002 2:04 PM
To: ASPToday Discuss
Subject: [asptoday_discuss] SQL QUERIES IN ASP: VAR'S W/ APOSTROPHES


Usually when I have strings containing apostrophes in my SQL queries, I 
just replace them with the ASCII code before sending to DB.  That worked 
fine until now, since I'm only using the DB to view and print records 
(directly from DB), not for the web.  So the records print with 
the "&#39;" in them.  

Is there another way around writing SQL queries so the 'real' apostrophe 
actually gets passed into the DB??

Thank You!!
Trish


======== H =========
 This email message may contain legally privileged and/or confidential
information.  If you are not the intended recipient(s), or the employee or
agent responsible for the delivery of this message to the intended
recipient(s), you are hereby notified that any disclosure, copying,
distribution, or use of this email message is prohibited.  If you have
received this message in error, please notify the sender immediately by
e-mail and delete this email message from your computer. Thank you.



======== H =========
 This email message may contain legally privileged and/or confidential
information.  If you are not the intended recipient(s), or the employee or
agent responsible for the delivery of this message to the intended
recipient(s), you are hereby notified that any disclosure, copying,
distribution, or use of this email message is prohibited.  If you have
received this message in error, please notify the sender immediately by
e-mail and delete this email message from your computer. Thank you.

Message #6 by "Zhang, Yongrong" <Yongrong.Zhang@R...> on Fri, 12 Jul 2002 14:11:29 -0400
sorry, should be: SET QUOTED_IDENTIFIER on

-----Original Message-----
From: Trish Donnell [mailto:tdonnell@s...]
Sent: Friday, July 12, 2002 3:07 PM
To: ASPToday Discuss
Subject: [asptoday_discuss] RE: SQL QUERIES IN ASP: VAR'S W/ APOSTROPH
ES


thanks...

i tried the first one, but an error returned saying the token "identifier" 
wasn't valid.  i'm sending this data to an IBM AS400 - does that help?

> You can do it either way: 
1) from asp, do conn.execute("set identifier on")
2) from dbms, run the script
------------------------------------------

-----Original Message-----
From: Trish Donnell [mailto:tdonnell@s...]
Sent: Friday, July 12, 2002 2:52 PM
To: ASPToday Discuss
Subject: [asptoday_discuss] RE: SQL QUERIES IN ASP: VAR'S W/ APOSTROPHES


where can i find this?  are you talking about on the database?  or in my 
asp code?

> use "set indetifier on, set identifier off". 

-----Original Message-----
From: Trish Donnell [mailto:tdonnell@s...]
Sent: Friday, July 12, 2002 2:04 PM
To: ASPToday Discuss
Subject: [asptoday_discuss] SQL QUERIES IN ASP: VAR'S W/ APOSTROPHES


Usually when I have strings containing apostrophes in my SQL queries, I 
just replace them with the ASCII code before sending to DB.  That worked 
fine until now, since I'm only using the DB to view and print records 
(directly from DB), not for the web.  So the records print with 
the "&#39;" in them.  

Is there another way around writing SQL queries so the 'real' apostrophe 
actually gets passed into the DB??

Thank You!!
Trish


======== H =========
 This email message may contain legally privileged and/or confidential
information.  If you are not the intended recipient(s), or the employee or
agent responsible for the delivery of this message to the intended
recipient(s), you are hereby notified that any disclosure, copying,
distribution, or use of this email message is prohibited.  If you have
received this message in error, please notify the sender immediately by
e-mail and delete this email message from your computer. Thank you.



======== H =========
 This email message may contain legally privileged and/or confidential
information.  If you are not the intended recipient(s), or the employee or
agent responsible for the delivery of this message to the intended
recipient(s), you are hereby notified that any disclosure, copying,
distribution, or use of this email message is prohibited.  If you have
received this message in error, please notify the sender immediately by
e-mail and delete this email message from your computer. Thank you.



======== H =========
 This email message may contain legally privileged and/or confidential
information.  If you are not the intended recipient(s), or the employee or
agent responsible for the delivery of this message to the intended
recipient(s), you are hereby notified that any disclosure, copying,
distribution, or use of this email message is prohibited.  If you have
received this message in error, please notify the sender immediately by
e-mail and delete this email message from your computer. Thank you.


  Return to Index