FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour how to write a string of string
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
how to write a string of string
Posted: Mon Dec 15, 2014 11:38 AM

Hi!
A string "select a from "+ctable1+" where id='001' "
how to write this as a string ?
Regards!
Shuming Wang

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: how to write a string of string
Posted: Mon Dec 15, 2014 11:44 AM
Shuming,

I don't know if I understood correctly. Try this:

Code (fw): Select all Collapse
["select a from "+ctable1+" where id='001' "]


EMG
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: how to write a string of string
Posted: Mon Dec 15, 2014 12:21 PM
You could try this :
Code (fw): Select all Collapse
CHR(34)+"select a from "+CHR(34)+"+ctable1+"+CHR(34)+" where id="+CHR(39)+"001"+CHR(39)+SPACE(1)+CHR(34)

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: how to write a string of string
Posted: Mon Dec 15, 2014 12:21 PM
driessen wrote:You could try this :
Code (fw): Select all Collapse
CHR(34)+"select a from "+CHR(34)+"+ctable1+"+CHR(34)+" where id="+CHR(39)+"001"+CHR(39)+SPACE(1)+CHR(34)
For your information :

CHR(34) = "
CHR(39) = '

You can see what the result is by putting my code into MsgInfo().

Good luck

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
Re: how to write a string of string
Posted: Mon Dec 15, 2014 12:44 PM

Thank Mr E.M.G. and Mr Michel D.!
Shuming Wang

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651

Continue the discussion