-
Content Count
888 -
Joined
-
Last visited
-
Days Won
7
Everything posted by Stano
-
I'm avoiding the Continue command. I use it exceptionally. en when I need to skip/skip something. At least that's how I understand it. So I usually have it in some if..then..else... branch. In the above example it has no meaning. I suppose this is just a symbolic demonstration.
-
https://docwiki.embarcadero.com/RADStudio/Athens/en/Continue
-
Programmers have a strange way of thinking that I don't understand. Because I'm not a pro-programmer. That's the case here. I'm dealing with something similar. It is about setting values and appearance of individual components on a form. I'm using JSON to do this. That's a significant difference, because you're using IniFile. The principle is simple. The title consists of the names: Owner (form) + Parent + Component The result is e.g.: "frmsubMatchesByRoundfdnvDraw": { "jstpnlTeamVst": { "jstvstTeam": { "VTSearchDirection": 0, "Width": [ 120,165,100,84,167], "Position": [ 0,1,2,3,4], "SortColumn": -1, "VTSearchStart": 2, "ShowSortGlyphs": false, "FirstSetFocus": false, "VTSortDirection": 0 } }, ... }, To do this, functions of the type Read..., Write... function TAppearance.DoCareNoEdit(const ACont: TControl): Boolean; begin Result := True; if (ACont is TAdvOfficeRadioButton) then CareAdvOfficeRadioButton(TAdvOfficeRadioButton(ACont)) else if (ACont is TjstVirtualStringTree) then CarejstVirtualStringTree(TjstVirtualStringTree(ACont)) ... procedure TAppearance.CarejstVirtualStringTree(const AComp: TjstVirtualStringTree); begin AComp.ParentDoubleBuffered := True; FjstVst := AComp; FJsonItemName := oGlobVar.ActualForm.Name +'.'+ FjstVst.Parent.Name +'.'+ FjstVst.Name +'.'; CreateVstPopupMenu; SetVstProperties; end; Hopefully this will help in some way. If I haven't hit the topic at all, then ignore it
-
FDTable: EFDException with message '[FireDAC][Stan][Eval]-117. Empty expression'
Stano posted a topic in Databases
Suddenly, everywhere I have FDTAble at MyTable.Open throws me the given error. No change in the code. I have D professional, so I don't have the source. At design time the table can be activated. The only thing I have done is an update: EurekaLog to EurekaLog_7.12.0.4_Professional_for_RAD_Studio - hotfix CnPack 31.12.2023 -
FDTable: EFDException with message '[FireDAC][Stan][Eval]-117. Empty expression'
Stano replied to Stano's topic in Databases
I will add this to my solution! -
FDTable: EFDException with message '[FireDAC][Stan][Eval]-117. Empty expression'
Stano replied to Stano's topic in Databases
The error is in this code: // MyTable.Filter is empty MyTable.Filtered := True; MyTable.Open; From another discussion: Probably during the upgrade they decided that enabling the filter without a defined filter expression is nonsense. And it is. I fully agree with that. I have already figured it out. I found no mention of such behaviour. The problem was that I didn't know what the Empty exptession referred to! -
I had no idea it was interactive. Thank you. It's OK now.
-
Asi mám špeciálnu stránku Nikde ju nevidím.
-
I can't find where I can download my license file. What is its name? Thanks!
-
I ran it 10 times. No result.
-
Now I've tried it. The result is the same. Nothing.
-
I foresee the next stage of improvement. To make the descriptive text (in Memo) formatted - RTF.
-
While this is a simple case and serves to teach, I do suggest one change there. Let it be as it should be. Create a TDataModule and put a FireDAC on it: WaitCursor Connection Transaction The TFDTable-s in the whole project will connect to the DB using MyDataModule.MyConnection. The appropriate code from the form will also be moved to the TDataModule. I didn't want to write this by the shovelful. Since you didn't get it, here it is exactly: if TableDino.Locate('record', iSelect, []) then As you can see, I'm not searching by text, but by number. This is always faster and more certain.
-
Try if TableDino.Locate(name, iSelect, []) then ShowMessage('Succes') ele ShovMessage('Issue'); Name := 'RECORD'; My previously attached sample shows this nicely.
-
This is not a criticism. These are comments (advice) based on experience, read recommendations and comments from the experienced. I've had my fill of those comments. Some have been quite harsh. Maximizing the window: I want to have a running application available - especially during development. See image. Can't you do a double-click on the image? I can't switch it to another mode - size can't move it you can't even collapse it be aware that with my monitor resolution of 3440 x 1440 it's driving me to despair Table "dino": Capitalization is based on practice and some convention, convention. Note that all published SQL text and metadata is capitalized some DBs require it hardcoded it's good to stick to conventions Record lookup: "randomly" I meant they are not alphabetical since I read the recent article, there has been a change in the breakdown of eras. I don't know when. And you may already have order problems *) those hints are meant in general. You're not supposed to apply them to one case *) such things are dealt with e.g. the primary key must always be insert the next column with the order. Depending on the situation it may be: close behind with spaces To repeat: the physical order of records in tables is not guaranteed. Query with frequent ORDER BY is always used for this!
-
My 200 cents You have to make the app the way the whole world should use it! Throw out that maximized window. We already "require" it for two. You've got a picture of why at the end. It's for illustration purposes only. Every app has to remember: the position of each window/form the size of the form the content of the form Now this is premature, but you get the point. Table "dino": everything should be capitalized name DINOS field "record": is a reserved word it must be a Primary Key (PK). Values for PK are generated automatically. They have nothing to do with the order of the record. During DB maintenance, the order of records in the table may change Record lookup: Users are used to searching alphabetically you have entries written "randomly" if the table (not only dino) will have a lot of records: ComboBox will have large responses. I used it as one of the options. Note the record lookup you have to have a search there by typing the first letters. I don't know if you meet that I solve it with VirtualStringTree (VST) at the same time I use it for basic record display. Instead of DBGrid. It has the following advantages: you have full control over everything - very important it is really fast you can sort the records by the selected column. Ascending or descending has a built-in node search by column you can filter the records Disadvantage I had to make my own DBManager for it. This can be worked around Task for the future: It belongs to make there the possibility to edit records: insert, update, delete... Sorry, Google translator.
-
Table names are always plural!
-
But in my PC there is not exists this path. That's why I don't understand it. That would be because it's created using the CE version and I haven't changed anything. I would have to destroy the automatically created files. I don't know in which one the information in question is located.
-
My humble remarks // I would kill for this. You don't know what I'm doing and what's on my screen. WindowState := wsMaximized; //Maximize the window Set CustomTitleBar.Enabled = True is not a good idea. procedure TfrmDino.FormCreate(Sender: TObject); //Form creation begin lbxData.Visible := False; // That was missing here Rename the RECORD field to IDDINO or DINOID or PKDINO or DINOPK I modified the record search using ComboBox. Remark: For my own use I changed the DB in conPLife. Because the suggested dynamic path setting gives me nonsense. I'm not that familiar with it. D:\Delphi_11_Community\MyProjects\Dinobase\dino.db My path d:\Dokumenty\Z internetu\PrehistoricLife\dino.db Dinobase_u.zip
-
I tried the link. Just a blip and nothing more. Put it here as an attachment.
-
Put a picture of the form here at the time of design. Let us have some idea of what you are doing and probably how you are doing it. That way we're just guessing from the coffee.
-
Yes. But you are using a modified DBNavigator. See also the reply from JonRobertson.
-
Hm, I've opined that you should get rid of your DBNavigator altogether. You're supposed to make do with a standard one. Without the added buttons! Everything is linked to the record search in SearchBox. You chose the wrong methodology.
-
In that case, I recommend you to go to "help" and always check all the properties and methods of what you are interested in. You want to use. In this case, it's DataSet. After that, T(FD)Table and T(FD)Query are also included. They are its descendants. They inherit from it. This is a very best and recommended practice!
-
I personally wouldn't add buttons to a standard component. You need to use what is there. DBNavigator takes care of the button control automatically. You're supposed to use the DataSet.Locate() function in SearchBox.OnChange(?). Or another appropriate event - we don't know what you do where. I don't use SearchBox. I prefer ComboBox. That way you won't have to worry about anything. No additional buttons. Don't forget that you'll be using DBNavigator in multiple places. So don't break it.