single quotes problem

Results 1 to 2 of 2

Thread: single quotes problem

  1. #1
    Join Date
    Dec 1969

    Default single quotes problem

    Hi!!<BR><BR>Here is my sql query <BR>sqlacc="select AS_TO from MESSAGE_ASTO where MESSAGE_ID=10"<BR>set rsacc=ObjDBConn.execute(sqlacc)<BR> if not rsacc.eof then<BR> delimiter1 = "" <BR> ASTO=""<BR> Do until rsacc.eof<BR> <BR> ASTO= ASTO & delimiter1 & rsacc(0)<BR> delimiter1 = "," <BR> rsacc.Movenext<BR> Loop<BR> end if<BR> rsacc.close<BR> set rsacc=Nothing <BR><BR>now I am getting ASTO values like this<BR>ASTO="test1,test2,test3"<BR><BR>but I want the values to be ASTO="&#039;test1&#039;,&#039;test2&#039;,&#039;te st3&#039;"<BR><BR>pls help

  2. #2
    Join Date
    Dec 1969

    Default RE: single quotes problem

    Do until rsacc.eof<BR><BR>ASTO = ASTO &"&#039;"& rsacc(0) &"&#039;,"<BR><BR>rsacc.Movenext<BR>Loop<BR><BR>AS TO = Left(ASTO,Len(ASTO)-1)<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts