[Lazarus] Right click, paste as string?

Reinier Olislagers reinierolislagers at gmail.com
Sat Apr 21 12:18:54 CEST 2012


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.

Perhaps the general case:
- convert ' to ''
- replace #13#10 and #10 with +LineEnding (thanks Mattias, yes, I forgot
that one)
- indent
- paste
could still be handy.... but glad there's already some functionality for
the SQL case!

Thanks,
Reinier




More information about the Lazarus mailing list