[FONT=Courier New][SIZE=2][COLOR=#009000] **First of all we need to inilialized SQLite engine.[/COLOR][/SIZE][/FONT]
[FONT=Courier New][SIZE=2] [COLOR=#000090][B]PluginRun[/B][/COLOR]("PlugIn","SQLiteInit") [/SIZE][/FONT]
[FONT=Courier New][SIZE=2] [COLOR=#000090][B]PluginGet[/B][/COLOR]("PlugIn","IsInitialized") [/SIZE][/FONT]
[FONT=Courier New][SIZE=2] [COLOR=#0000ff]If[/COLOR] (IsInitialized = [COLOR=#ff0000]1[/COLOR]) [COLOR=#0000ff]Then[/COLOR] [/SIZE][/FONT]
[FONT=Courier New][SIZE=2] [COLOR=#009000]/*We tell the plug-in about our database path. [/COLOR][/SIZE][/FONT]
[FONT=Courier New][SIZE=2][COLOR=#009000] Please note that database file is embedded. Therefor [/COLOR][/SIZE][/FONT]
[FONT=Courier New][SIZE=2][COLOR=#009000] changes take place only on runtime and this means [/COLOR][/SIZE][/FONT]
[FONT=Courier New][SIZE=2][COLOR=#009000] updates are temparory. [COLOR=#0000ff]if[/COLOR] you want permanet update [/COLOR][/SIZE][/FONT]
[FONT=Courier New][SIZE=2][COLOR=#009000] [COLOR=#0000ff]Then[/COLOR] you have [COLOR=#0000ff]To[/COLOR] make your database external. [/COLOR][/SIZE][/FONT]
[FONT=Courier New][SIZE=2][COLOR=#009000] */[/COLOR] [/SIZE][/FONT]
[FONT=Courier New][SIZE=2] DBPath$ = [COLOR=#800000]'<Embedded>\MyAddressBookDB.db'[/COLOR] [/SIZE][/FONT]
[FONT=Courier New][SIZE=2] [COLOR=#000090][B]PluginSet[/B][/COLOR]("PlugIn","DBPath$") [/SIZE][/FONT]
[FONT=Courier New][SIZE=2] [COLOR=#000090][B]PluginRun[/B][/COLOR]("PlugIn","GetDBFileName") [/SIZE][/FONT]
[FONT=Courier New][SIZE=2] [COLOR=#000090][B]PluginRun[/B][/COLOR]("PlugIn","OpenSQLDB") [/SIZE][/FONT]
[FONT=Courier New][SIZE=2] [COLOR=#000090][B]PluginGet[/B][/COLOR]("PlugIn","IsOpened") [/SIZE][/FONT]
[FONT=Courier New][SIZE=2] [COLOR=#0000ff]If[/COLOR] (IsOpened = [COLOR=#ff0000]0[/COLOR]) [COLOR=#0000ff]Then[/COLOR] [/SIZE][/FONT]
[FONT=Courier New][SIZE=2] [COLOR=#000090][B]Message[/B][/COLOR]("Unable [COLOR=#0000ff]To[/COLOR] open database.","") [/SIZE][/FONT]
[FONT=Courier New][SIZE=2] [COLOR=#000090][B]Return[/B][/COLOR]() [/SIZE][/FONT]
[FONT=Courier New][SIZE=2] [COLOR=#0000ff]Else[/COLOR] [/SIZE][/FONT]
[FONT=Courier New][SIZE=2] [COLOR=#009000]**Here we like to get our database size to let users know.[/COLOR] [/SIZE][/FONT]
[FONT=Courier New][SIZE=2] [COLOR=#009000]**Return value is in bytes.[/COLOR] [/SIZE][/FONT]
[FONT=Courier New][SIZE=2] [COLOR=#000090][B]PluginRun[/B][/COLOR]("PlugIn","DBFileSize") [/SIZE][/FONT]
[FONT=Courier New][SIZE=2] [COLOR=#000090][B]PluginGet[/B][/COLOR]("PlugIn","DBSize") [/SIZE][/FONT]
[FONT=Courier New][SIZE=2] [COLOR=#000090][B]DisplayValue[/B][/COLOR]("DatabaseSize","DBSize") [/SIZE][/FONT]
[FONT=Courier New][SIZE=2] [COLOR=#009000]** If everything was OK, then go to next step.[/COLOR] [/SIZE][/FONT]
[FONT=Courier New][SIZE=2] [COLOR=#000090][B]RunScript[/B][/COLOR]("ReadFirstRow") [/SIZE][/FONT]
[FONT=Courier New][SIZE=2] [COLOR=#0000ff]End[/COLOR] [/SIZE][/FONT]
[FONT=Courier New][SIZE=2] [COLOR=#0000ff]Else[/COLOR] [/SIZE][/FONT]
[FONT=Courier New][SIZE=2] [COLOR=#000090][B]Message[/B][/COLOR]("Unable [COLOR=#0000ff]To[/COLOR] initialize SQLite engine.","") [/SIZE][/FONT]
[FONT=Courier New][SIZE=2] [COLOR=#000090][B]Return[/B][/COLOR]() [/SIZE][/FONT]
[FONT=Courier New][SIZE=2] [COLOR=#0000ff]End
[/COLOR][/SIZE][/FONT]