[Lazarus] Right click, paste as string?

Michael Van Canneyt michael at freepascal.org
Sat Apr 21 13:31:40 CEST 2012



On Sat, 21 Apr 2012, Reinier Olislagers wrote:

> On 21-4-2012 12:01, Michael Van Canneyt wrote:
>>
>>
>> On Sat, 21 Apr 2012, Reinier Olislagers wrote:
>>
>>> Hi list,
>>>
>>> When working with e.g. multiline SQL statements, sometimes I want to
>>> copy them to a string in Lazarus, e.g from something like:
>>
>> The lazarus data dictionary SQL editor does this for you.
>> Execute query.
>> Select 'generate code' button.
>> Select 'Generate Pascal string/constant'
>>
>> That's it.
> Thanks, that one I knew about...
>>
>> The same can be done in the Lazarus IDE.
>>
>> 1. Open TSQLQuery component's SQL property editor.
>> 2. Type query.
>> 3. Right click in SQL editor.
>> 4. select 'Create string constant' from popup menu.
> Ok, thanks.

Note that the constant is put on the clipboard and is ready to be pasted in the code.
(if you were wondering "why doesn't anything happen? " :) )

Michael.




More information about the Lazarus mailing list