-
Content Count
882 -
Joined
-
Last visited
-
Days Won
7
Everything posted by Stano
-
Is anyone using IBX (Interbase Express) and compatibility question
Stano replied to Jasonjac2's topic in Databases
Professional has FireDAC. But he doesn't have his * .pas- 15 replies
-
- ibx
- interbase express
-
(and 2 more)
Tagged with:
-
PrimaryKeys are an internal DB issue. You have nothing to do with them. The user must not suspect that such a thing exists. I repeat: you must use the Generator to insert new PrimaryKeys. If you need to know the new PrimaryKey, then Get its value from Generator Use it in the new record and for your purpose. If something goes wrong, you throw it away!
-
Is anyone using IBX (Interbase Express) and compatibility question
Stano replied to Jasonjac2's topic in Databases
Add-on Packs have long been removed for FireDAC- 15 replies
-
- ibx
- interbase express
-
(and 2 more)
Tagged with:
-
I don't want to read your entire code. Please be aware of one thing. This is a forum to help solve problems. Not distance learning. As said: read the DB manual Read some general book about DB Not to be bad: FB has generators. Study it Enter PrimaryKey using FireDAC. You will find it quickly You can specify PrimaryKey using MyQuery.SQL.Text: = 'INSERT INTO USERS' + 'SELECT GEN_ID (DEPOSIT_ID, 1), CAST (: FKOWNERFLAT AS INTEGER), ...,' + MyQuery.SQL.Text: = 'INSERT INTO USERS' + 'SELECT GEN_ID (DEPOSIT_ID, 1), CAST (: FKOWNERFLAT AS INTEGER), ...,' +
-
If I decide to put it here, I'll adjust the formatting first. This will take some time.
-
Hard to say. His book as a whole was highly praised. They discussed one issue here. In my opinion, he could not agree with the opinion presented here. He announced that he had downloaded the book and did not respond. At the same time, everyone just wanted to help him. He wrote that the comment does not resist. I do not understand that. I personally offered the book so that the members could help him with professional proofreading. Not me I consider it a great pity
-
I offer help. To author. My well-thought-out comments. Without reading a book: Format the * .docx file is appalling. If you want it, I will adjust it for you The CONTENTS field is not used. This is a problem with any change. Correction, addition of text. Translation Indentation. The book is also about that. Well, in the examples, it's probably in the mood. I can fix it At least there would be something useful here
-
That's what I thought.
-
If you want, I can put a PDF attachment and * .docx. Perhaps the author is not angry.
-
I voted. But I'm only third.
-
I TAdvTaskDialog from TSM
-
Really. I didn't notice it. Well thank you.
-
I read a quality book on the subject. (Perfect Code - Steve MCConnell - 2005). I still want to read yours. I don't know English, so I use google transaltor. If you have the text itself, it would help me. Now I need to copy the text from the PDF first. Remove unnecessary spaces. The add-on to remove them doesn't work for me. Only then translate. Then I'll send you a translated book. Although I don't know if he will be interested in Slovak translation (Czechs also understand him). If I find a shortage with blind eyes, I'll let you know.
-
It depends on the purpose of use. If it is an embedded / local version, I recommend Firebird. There is no need to install anything. Just copy. Access is, as usual with MS, unlike other DBs. You will not acquire the right habits.
-
Such a small tool class function TFDFunction.TextInsertInto(const ATableName: string; AllFields: Boolean = False): string; var FTable: TFDTable; sFields, sValues: string; Field1: Integer; begin FTable := TFDFunction.NewTable(nil, ATableName); if AllFields then Field1 := 0 else Field1 := 1; try // Without primary key. It is auto increment. sFields := ATableName + ' ([' + FTable.FieldList[Field1].FullName + ']'; sValues := ' VALUES (:' + FTable.FieldList[Field1].FullName; for var I := Field1 + 1 to FTable.FieldList.Count - 1 do begin sFields := sFields + ', [' + FTable.FieldList[I].FullName+ ']'; sValues := sValues + ', :' + FTable.FieldList[I].FullName; end; Result := 'INSERT INTO ' +sFields + ')' + sValues + ')'; finally FreeAndNil(FTable); end; end;
-
My experiment (s) FMTSpace.UpdateOptions.UpdateTableName := 'DISTANCES'; FMTSpace.UpdateOptions.EnableInsert := True; FMTSpace.UpdateOptions.UpdateChangedFields := True; FMTSpace.Active := True; FMTSpace.CachedUpdates := True; /// Filling FMTSpace with data FMTSpace.ApplyUpdates(-1); That's how it works for me. I consider it extra work. for var J := 0 to FRecordCount -1 do begin for K := 0 to qryDistanceIns.Params.Count -1 do qryDistanceIns.Params[K].Values[J] := FMTSpace.Fields.Fields[K].Value; FMTSpace.Next; end; try TFDFunction.QryExecute(qryDistanceIns, True); finally FreeAndNil(qryDistanceIns); end; Unfortunately, the instructions and examples are more than brief. They are not complete. Thanks!
-
Defining field types in MemTable and retrieving data using CopyDataSet is the easiest for me. Only now did I realize that I had written nonsense in Uwe Rabe's answer. I meant MemTable.Data := MyQuery.Data. No CopyDataSet. I apologise.
-
More efficient string handling
Stano replied to parallax's topic in Algorithms, Data Structures and Class Design
You probably meant TFDBatchMoveTextReader -
I write here again that I am not a programmer. I seldom understand foreign code. The reason for asking the question: it's hard to find something, especially FireDAC, in help. Examples are: about something other than the topic very complicated incomplete, possibly with errors I couldn't find anything. I was successful later. I forgot to write it here. Thanks to all.
-
No, I have Delphi Professional.
-
Not for me. The SQL has "0 AS X". The actual field type in DB is Float. Therefore, I always define the MemTable structure for each use. As I was explained, Pointer is passed to CopyDataSet. Field type data is lost. X will be ftInteger. I don't have to deal with performance. These are just a few records / rows.
-
There was no other option than FDBatchMove. It already works for me. Thanks for the response.
-
Using translations in unit Consts with Delphi 10.4 VCL
Stano replied to Dirk Janssens's topic in VCL
I have the Slovensky.pas file quoted only in * .dpr. I'm not setting anything anywhere. I use TSM. I'm bypassing the OS dialogs. I can't say more about that. -
Using translations in unit Consts with Delphi 10.4 VCL
Stano replied to Dirk Janssens's topic in VCL
Yes. -
Using translations in unit Consts with Delphi 10.4 VCL
Stano replied to Dirk Janssens's topic in VCL
I once found it on the internet. It never disappointed me. unit slovensky; interface implementation uses System.Classes, Vcl.Forms, Vcl.Consts, Vcl.Dialogs; resourcestring SMsgDlgCZWarning = 'Výstraha'; SMsgDlgCZError = 'Chyba'; SMsgDlgCZInformation = 'Informácia'; SMsgDlgCZConfirm = 'Potvrdiť'; // Otázka SMsgDlgCZYes = 'Án&o'; SMsgDlgCZNo = '&Nie'; SMsgDlgCZOK = 'OK'; SMsgDlgCZCancel = 'Zruš'; SMsgDlgCZHelp = 'Nápoveď'; // SMsgDlgCZHelpNone = 'Nápoveď nie je'; // SMsgDlgCZHelpHelp = 'Nápoveď'; SMsgDlgCZAbort = '&Zrušiť'; SMsgDlgCZRetry = 'Opakovať'; SMsgDlgCZIgnore = '&Ignorovať'; SMsgDlgCZAll = '&Všetko'; SMsgDlgCZNoToAll = 'Nie všetkým'; SMsgDlgCZYesToAll = 'Ano všetkýmm'; SMsgDlgCZClose = 'Zavrieť'; const Captions: array[TMsgDlgType] of Pointer = (@SMsgDlgCZWarning, @SMsgDlgCZError, @SMsgDlgCZInformation, @SMsgDlgCZConfirm, nil); ButtonCaptions: array[TMsgDlgBtn] of Pointer = ( @SMsgDlgCZYes, @SMsgDlgCZNo, @SMsgDlgCZOK, @SMsgDlgCZCancel, @SMsgDlgCZAbort, @SMsgDlgCZRetry, @SMsgDlgCZIgnore, @SMsgDlgCZAll, @SMsgDlgCZNoToAll, @SMsgDlgCZYesToAll, @SMsgDlgCZHelp, @SMsgDlgCZClose); {$WARN SYMBOL_PLATFORM OFF} procedure _ChangeCaptions(List: TPointerList; Last: Pointer); const Two = 2; var I, Max: Integer; IsFind: Boolean; begin {$R-} try Max := (Integer(Last)-Integer(List)) div SizeOf(Pointer); IsFind := False; for I := 0 to Max - Two do if (List[I] = @SMsgDlgWarning) and (List[I + Two] = @SMsgDlgInformation) then begin IsFind := True; break; end; if IsFind then Move(Captions, List[I], SizeOf(Captions)); IsFind := False; for I := I to Max - Two do if (List[I] = @SMsgDlgYes) and (List[I + Two] = @SMsgDlgOK) then begin IsFind := True; break; end; if IsFind then Move(ButtonCaptions, List[I], SizeOf(ButtonCaptions)); finally {$R+} end; end; initialization // _ChangeCaptions(@DebugHook, @Application); end.