passing pragma arguments to sqlite

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
sandy771
Posts: 194
Joined: Tue 22 May 2007 13:57

passing pragma arguments to sqlite

Post by sandy771 » Thu 26 Aug 2010 08:18

I have tried various names and valuesin the macros tab of the UniConnection but none seem to work

If I wanted to implement pragma journal_mode= WAL how would I go about it?

sandy771
Posts: 194
Joined: Tue 22 May 2007 13:57

Post by sandy771 » Sat 28 Aug 2010 06:18

Does this mean you cant do this?

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Mon 30 Aug 2010 14:23

If you want to set the journal mode, you should execute the following SQL query:

Code: Select all

  PRAGMA journal_mode = WAL
in Delphi it can be executed by the following code:

Code: Select all

begin
  UniSQL1.SQL.Text := 'PRAGMA journal_mode = WAL';
  UniSQL1.Execute;
end;
To define a macro you can use the following code:

Code: Select all

  UniConnection1.MacroByName('a').Value := 'test';
You can find more detailed information about macros in the UniDAC help.

sandy771
Posts: 194
Joined: Tue 22 May 2007 13:57

Post by sandy771 » Tue 31 Aug 2010 07:40

Thanks bork

Post Reply