

UserName := 'SYSDBA' //for embedded, this should be an existing name 177 IBConnection1. We'll need to reconnect some components as they were 173 // set up for sqlite 174 // Hostname was already empty in Object Inspector so we use embedded 175 //IBConnection1.HostName:='' 176 IBConnection1. Terminate 163 end 164 end 165 end 166 end 167 Caption := Caption + ' (SQLite3)' 168 end 169 170 if FUsingFirebird then 171 begin 172 // Try Firebird. Active := true 157 ShowMessage ( 'The SQLite3 database has been recreated' ) 158 end 159 else 160 begin 161 ShowMessage ( 'Failure to create SQLite3 databse. Check your installation.' => but this text may change 149 begin 150 FUsingFirebird := true 151 end 152 else 153 begin 154 if RecreateDb then 155 begin 156 SQLQuery1. ClassNameIs ( 'EInOutError' ) then 148 // Assume 'Can not load SQLite client library "sqlite3.dll". Active := true 143 except 144 on E :Exception do 145 begin 146 //ShowMessage('Exception: '+E.ClassName+': '+E.Message) 147 if E. DatabaseName := ExtractFilePath ( ParamStr ( 0 )) + SQLiteDB 141 try 142 SQLQuery1.
FREE PASCAL SQLITE EXAMPLE CODE DRIVER
Close 134 135 // First try SQLite3 database in application directory 136 // If no sqlite3 driver is found, try Firebird 137 FUsingFirebird := false //try sqlite first 138 if not (FUsingFirebird ) then 139 begin 140 SQLite3Connection1. FormCreate (Sender : TObject ) 132 begin 133 SQLQuery1. FormClose (Sender : TObject var CloseAction : TCloseAction ) 126 begin 127 SQLQuery1. CommitRetaining 122 end 123 end 124 125 procedure TForm1. DBNavigator1BeforeAction (Sender : TObject Button : TDBNavButtonType ) 117 begin 118 if Button = nbRefresh then 119 begin 120 SQLQuery1.

DBImage1DblClick (Sender : TObject ) 112 begin 113 ChangeImage 114 end 115 116 procedure TForm1. TextStyle := MyTextStyle 108 end 109 end 110 111 procedure TForm1. DBGrid1PrepareCanvas (sender : TObject DataCol : Integer 100 Column : TColumn AState : TGridDrawState ) 101 var MyTextStyle : TTextStyle 102 begin 103 if (DataCol = 5 ) then 104 begin 105 MyTextStyle := DbGrid1. Datasource1DataChange (Sender : TObject Field : TField ) 94 begin 95 if Field = nil then 96 UpdateImageLink 97 end 98 99 procedure TForm1. ShowReport () 91 end 92 93 procedure TForm1. ExeName ) + 89 'Mushroom_Report.lrf' ) 90 frReport1. LoadFromFile ( ExtractFilePath (application. Bt_PrintClick (Sender : TObject ) 87 begin 88 frReport1. Button1Click (Sender : TObject ) 82 begin 83 ChangeImage 84 end 85 86 procedure TForm1. August 2013 3 // Firebird embedded support added 2014 4 80 81 procedure TForm1.
FREE PASCAL SQLITE EXAMPLE CODE CODE
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) delphi source code syntax highlighting (style: standard) with prefixed line numbers.Īlternatively you can here view or download the uninterpreted source code file.ġ unit Unit1 2 // J.P.
