tobenschain
Members-
Content Count
37 -
Joined
-
Last visited
Everything posted by tobenschain
-
Can't figure out why BudSys_DB.Indexes.Count is zero BudSys_Con := TFDConnection.Create(nil); with BudSys_Con do begin Params.DriverId := 'SQLite'; Params.Database := sys_dir^+'BudSysDB'+'.sdb'; ExecSQL('PRAGMA locking_mode = NORMAL'); ExecSQL('PRAGMA journal_mode = OFF'); Open; end; if BudSys_DB=nil then begin BudSys_DB := TFDTable.Create(nil); BudSys_DB.TableName := 'BudSysDB'; BudSys_DB.IndexFieldNames := 'key'; BudSys_DB.Connection := BudSys_Con; BudSys_DB.Open; end;
-
Can't figure out why I can process Module Data but not BudSys, BudSys works after I create it but not after I exit BudGen.
-
I am unable to delete a TFDTable after creating it. I tried Close and Disconnect.
-
Many thanks for the example.
-
I needed: try FDQuery1.ExecSQL('insert into MyTab(code, name) values (:code, :name)', [100, 'Tokyo']); except on E: EFDDBEngineException do begin // E.Message - Actual error message. For the DBMS messages only Message property is used. // E.ErrorCode - DBMS-specific error code. // E.Kind - DBMS-independent error code and other properties. if E.Kind = ekUKViolated then ShowMessage('Please enter unique value !'); raise; end; end;
-
This is what I do Module_DB.Close; Module_DB.Disconnect; Module_Con.Close;
-
Created, Copied and Deleted
-
<<Have you checked what PRAGMA locking_mode is returning?>> I use: ExecSQL('PRAGMA locking_mode = NORMAL'); <<Can you delete the file before opening any connection?>> The file is being created.
-
I tried Module_Con.Close; Didn't help
-
I wasn't qualifying the Close statement
-
if I try to delete the file manually it says it's still in use by the program
-
The file should be gone.
-
Using SQLite Module_DB: TFDTable; Module_DB.Close; Module_DB.Disconnect; SysUtils.DeleteFile('Test.DB');
-
I'm getting "no such table" on the second.
-
I can't understand why this doesn't work Using FireDAC with SQLite and TFDTable, this returns RecNo of -1 findkeyw := '8F'; ABudSys_DB.IndexFieldNames := 'key'; ABudSys_DB.IndexName := 'KeyIdx'; ABudSys_DB.FindNearest([findkeyw]); This also returns RecNo of -1 findkeyw := '8F30'; ABudSys_DB.IndexFieldNames := 'key'; ABudSys_DB.IndexName := 'KeyIdx'; if ABudSys_DB.FindKey([findkeyw]) then File has for index 8A43 8F30 8F31
-
good to go thanks
-
KeyIdx is primary and unique other settings:
-
CachedUpdates false FetchOptions.Unidirectional false FetchOptions.CursorKind ckAutomatic FetchOptions.LiveWindowParanoic false
-
BudSys_DB.Params.RecordCountMode := cmTotal; doesn't help
-
I do not understand why I am getting [FireDAC][Stan][Def]-254. Definition [C:\Prog2\employee.fdb] is not found in [C:\WINDOWS\FDConnectionDefs.ini] This is C:\WINDOWS\FDConnectionDefs.ini [EMPLOYEE] DriverID=FB Protocol=TCPIP Database=C:\Prog2\employee.fdb User_Name=sysdba Password=masterkey CharacterSet= ExtendedMetadata=True I am using XE7. This is my code var out_Table: TFDTable; out_Connection: TFDConnection; begin out_Table := TFDTable.Create(Application); with out_Table, FieldDefs do begin Clear; Add('key',ftString, 51); Add('data',ftString, 32{000}); Add('control',ftString, 32{000}); TableName := out_Table.Name; Convert := TConvert.Create(Application); Connection := Convert.FDConnection1; Active := true; end;
-
i can create a sqlite file in memory but I cannot save it to disk
-
Using FireDAC i created a Fire Bird table. I use Next command to go through the entire file of 6,000 records. The keys essentially go like this: 'B040' 'B060' 'B070' 'Xƒ0000' 'Xƒ0010' 'Xƒ0020' 'X‡62170' 'X‡62180' 'X‡62190' 'Xˆ001' 'Xˆ002' 'Xˆ003' For some reason the Next command pulls up 'Xƒ0000' for a second time after 'X‡62190'. Are extended ASCII codes allowed?
-
where is charset specified?
-
using the default