Topic: How Use Single Quotes In String

How To Add  '  in statement

ATTACH DATABASE 'DatabaseName' As 'Alias-Name';

attachconfig:= Form1.Memo2.Text;
attachdb:= SQLExecute('ATTACH DATABASE '+attachconfig+' as ''lib''');

and  display error

ATTACH DATABASE sample.db as 'ilb' 

It error because have not symbol ' in statement at sample.db
How To fix

My Visual Database : I Love You
Easy For Beginner Student For Me

Re: How Use Single Quotes In String

Try this

attachconfig:= ''''+Form1.Memo2.Text+'''';
attachdb:= SQLExecute('ATTACH DATABASE '+attachconfig+' as ''lib''');
Dmitry.

3 (edited by prahousefamily 2016-06-17 02:53:48)

Re: How Use Single Quotes In String

OK Nice Work ! Thank You

Dmitry. I have little question

'''' = '


Yes Or No?

My Visual Database : I Love You
Easy For Beginner Student For Me

Re: How Use Single Quotes In String

Yes )

Dmitry.