function LockDataModule: TDataModule1; procedure UnlockDataModule(ADataModule: TDataModule1);
FDPhysSQLiteDriverLink1: TFDPhysSQLiteDriverLink; FDGUIxWaitCursor1: TFDGUIxWaitCursor; FDConnection1: TFDConnection; DataSource1: TDataSource; FDTable1: TFDTable;
procedure TDataModule1.DataModuleCreate(Sender: TObject); begin FDTable1.Connection := FDConnection1; DataSource1.DataSet := FDTable1; FDConnection1.DriverName := ‘SQLite‘; FDConnection1.Params.Add(‘Database=FDDemo.sdb‘); //别忘了把 FDDemo.sdb 复制到程序目录下 FDTable1.TableName := ‘Orders‘; // FDTable1.Active := True; end;
uses DataModuleUnit, ServerController; procedure TIWForm1.IWAppFormCreate(Sender: TObject); var fDataModule: TDataModule1; begin fDataModule := LockDataModule; IWDBGrid1.DataSource := fDataModule.DataSource1; fDataModule.FDTable1.Active := True; UnlockDataModule(fDataModule); IWDBGrid1.Align := alClient; end;
使用 IntraWeb (44) - 测试读取 SqLite (三),布布扣,bubuko.com
使用 IntraWeb (44) - 测试读取 SqLite (三)
原文地址:http://www.cnblogs.com/del/p/3813205.html