That's it, thanks Derek.

So, the object.SqlValue property can only accept a unique value but it is good to see that we can place a "or" in between them one way or another! smile


if (form1.combobox1.sqlvalue = '4') or (form1.combobox1.sqlvalue = '5') then form1.panel1.color := clpurple;

152

(35 replies, posted in General)

pavlenko.vladimir.v wrote:

Текст свободно переводят браузеры...
yandex brawser может переводить видео
 
The text is freely translated by browsers...
yandex browser can translate video

The main issue is the translation by the browser, it is not always accurate or even effective. I got my headache while using the auto translate feature of my web browser. Some paragraphs of the wiki are not translated for some reason and the images that contain examples cannot be translated. Translation is time consuming. Most of us already speak at least 2 languages if not more but few are from Eastern Europe.
Yandex is a Russian web browser which might not be trusted in Western countries.

Anyway, as mentioned by tec049, switching to another software requires some time and documentation not to mention the maintenance of the software itself. Abandonware are a nightmare. In some companies, it is even mandatory to provide information about the development tools used to develop bespoke apps and that is not possible with current state of DataExpress.

I may express myself wrongly, let me reformulate.

I have a table with ids that are associated to a status.
This status is displayed via a combobox.
According to the status displayed or chosen, a script changes something in the project, like disabling an object or checking automatically a checkbox.
Some other status could lead to the same action.
Instead of writing complex SQL queries that I can write, I want to know if I can associate multiple values to the object property "SqlValue" in the script tab like in the attached example.

In this project, selecting a color changes the panel below it. The last 2 choices should both change to purple, not red but it does not with current script.

procedure Form1_ComboBox1_OnChange (Sender: TObject);
begin
if form1.ComboBox1.sqlValue='2' then
form1.Panel1.Color:= clGreen;
if form1.ComboBox1.sqlValue='3' then
form1.Panel1.Color:= clTeal;

// I would like to combine both sqlvalue = so it would be like a sqlExecute(select status.id from status where id=4 or id=5) .... or where id in('4','5')

{if form1.ComboBox1.sqlValue='4' then    // same color as below
form1.Panel1.Color:= clRed;
if form1.ComboBox1.sqlValue='5' then    // same color as above
form1.Panel1.Color:= clRed; }

if form1.ComboBox1.sqlValue='4 or 5' then    // either choice = same color
form1.Panel1.Color:= clPurple;
end;

That is not exactly what I am looking for, this is data aggregation within a combobox.
I am writing a script to check if a combobox sqlvalue is either X or Y to change its display according to what is found. I know I can write a sql query to get the "sqlvalue in the range I want but I was wondering if the "SqlValue" property could retrieve multiple values or if it is always a unique value.

Does anyone knows if it is possible to retrieve multiple values for the property "SqlValue" of a combobox like so or do I have to write an SQL query?

Possible or not?  I already know this syntax does not work but I cannot find any documentation about this property:

if Form.Statuslist.sqlValue in ('2', '13') then .... do something

156

(23 replies, posted in General)

Effectivement utiliser MessageBox permet d'avoir une traduction sans les lignes Translate() mais les paramètres/options ne sont pas les mêmes qu'avec Messagedlg:

MessageBox('Voulez-vous supprimer la ligne?','Confirmation', MB_YESNO+MB_ICONQUESTION);

Les paramètres MessageBox ici:

https://docwiki.embarcadero.com/Librari … MessageBox


D'autres paramètres MessageBox avec les icônes possibles:

https://learn.microsoft.com/fr-fr/windo … dfrom=MSDN

157

(35 replies, posted in General)

vovka3003 wrote:
v_pozidis wrote:

DataExpress is a great software, but if it had a help file in english it would be much better.

Неужели так не проканает..?
Вообще, поднимите руку те, кто всегда начинает работу в какой-нибудь программе с чтения справки? smile

v_pozidis wrote:

A minus the it has no executable file and no database file.

Firebird (Embed/Server).


I had a look a their website and I do not read or speak Russian so I had quite the headache just by surfing on their website, wiki and forum. The software looks promising but it might be for Russian speakers only. Google translate does a very poor job at translating huge volume of text from complex languages and so does DeepL but with better language refinement.

158

(23 replies, posted in General)

Et Windows est réglé pour un affichage en Français sur ton PC?

159

(23 replies, posted in General)

Tu as essayé de mettre les translate tout en bas du script avant le dernier end.  (Celui qui finit par un point et pas un point-virgule)

160

(18 replies, posted in General)

The counter property in frmInterventi should match the table Intervento, doing so makes it work, no, the data in the combobox are retrieved but are indexed in a weird fashion...

161

(23 replies, posted in General)

Dans la partie script tout en bas avant le end.

Essaie:

 Translate('Yes', 'Oui');
    Translate('No', 'Non');
    Translate('None', 'Aucun');
    Translate('Skip', 'Passer');
    Translate('Close', 'Fermer');
    Translate('Cancel', 'Abandonner');

D'après le post : http://myvisualdatabase.com/forum/viewtopic.php?id=8462

162

(23 replies, posted in General)

Tu veux traduire les boutons des message box?

No, I am talking about the forms and buttons color, the global application look within the project that are defined by this style.vsf file. By default, MVD buttons are pretty standard (ugly?). Maybe you got the file somewhere and you are using it by default for all your projects?

I am referring to the project "foreign key translation2-1" on post #6 so maybe the style has been done by Derek?? It is also present in your project in http://myvisualdatabase.com/forum/viewtopic.php?id=8457 post #2 same style applied with a style.vsf file.

165

(27 replies, posted in General)

derek wrote:

Hi Fabio,
Have a look at this link
http://myvisualdatabase.com/forum/edit.php?id=46947
If you search on Google for 'unicode symbols' or 'utf symbols' you'll find many sites that have thousands of symbols.
I just collect a list of the ones that I'm likely to use and save them in a .txt file for quick access (see attached).  And as I find a new symbol that I might need, I simply add it to the .txt file.
Derek.


Too bad, I get the error : "You do not have permission to access this page." when following your link.

I mean the VCL style of the application, there is a style.vsf in your project and it looks easier to do this than playing with a lot of scripts to change the appearance of the app.

@Sparrow, I did read the help before posting but it was so unclear that I did not understand how to use it. I think YOUR explanation should replace what is written in the help smile To be fair, the MVD manual is pretty thin on how exactly we should/could use the components/methods and properties.

@Derek, the counter idea is a good idea, I will keep it for another purpose!!

I got it working with just this script:

procedure Admin_OnShow (Sender: TObject; Action: string);
begin
Admin.Adm_PC_ID.Text:= IntToStr(Admin.Adm_save.dbGeneralTableId);
end;

I still think this should not be so cumbersome to get this ID!!

Thanks folks once again!

I want to add that it is super easy to get the id with a written SQL query but we all prefer to use internal features of MVDB as much as possible as it saves a lot of coding, this is why I want to understand how to get access to the hidden record ID stored by MVDB when editing a record in a form while using auto queries.

@reteinformatica What did you use to create the VSF file to get the nice button icons?

170

(3 replies, posted in General)

select count(column) from table or select count(*) from table from table everything here for SQLite: https://www.sqlitetutorial.net/sqlite-count-function/

Difficile de savoir exactement comment aider sans plus de détails.

The purpose is very simple, I need to use scripts to update information not shown in the current form to be updated according to the id of the record being edited and not using a field that could contain a duplicate. Why do I use 2 table grids in Form1 is because the client needs to see which computers are in need of maintenance and access them without having to lookup for them to not forget about them. There are other "prime" information displayed as well in the full project.

Now I have tricked the app by altering the database while the app was open so it would throw an SQL error to see exactly what it does when using "Show record" and "Save record" functions within the grids and the SQL query triggered contains indeed the id of the computer related to what I am doing!!! The id looks like it is stored as a temporary variable within MVDB framework when saving the record. So, where is this id stored that we cannot access it with scripts or even display in a field?

I even tried to select the computers.id within the search grid, it is displayed in the table grid but we cannot display it in a field as it is not available in the dropdown of the field properties!!!!!

The "show record" function triggers this SQL query:

SELECT table1.columnX, table1.columnY, table1.columnZ from table1 where table1.id=A

The "save record" function triggers this SQL query:

UPDATE table1 SET columnZ='F', columnY='D', columnX='S' where id=A

Hi,

thanks for the example but it is not what I am looking for since I also need to get the Id from the showman grid. What I do not understand is that the ID is automatically retrieved and stored somewhere in memory when using the auto search grid to show a record but how is it possible that we cannot access it easily like any other field?

I have made a quick and dirty version of my huge project with no script for no interference that illustrate my issues. I am open to suggestions but I want to keep the display of form1 to remain in the same way of working.

Here is what I mean by the record ID that does not show. I kind of solved my issue with the combobox, but I do not understand why the id does is not displayed in the Admin form while it is on the Maintenance form.

Both grids on Form1 are using grid search to display the info and the other forms are just called using the "show record" property of a button.

http://myvisualdatabase.com/forum/misc.php?action=pun_attachment&item=9532

Hi Sparrow, I do agree, I replaced with an Update statement.

Derek's answer works like this

sqlexecute('update computers set id_status = "2" where id = '+form1.gridsearch.row[form1.gridsearch.selectedrow].id');

Now I am scratching my head to see if I can use an "OR" in the query as I need to use 2 sources for the current ID to change a combobox display.

Form1 has 2 grids: GridSearch (search all records with filters)
                                                                                                     
                               ShowMaint (Filters all records with 1 status only)

                                              => Both can open the same Admin form and the computers.ID should be consistent whether accessed from one grid or another but... it does not work. I tried to display the computers.id in a field on Admin using the object properties is and it does not refresh when I open the form using one grid after the other. I tried a script but I am stuck

What I want to do is change the Admin.StatusList combo display according to current status as soon as I save a certain status in Maintenance form.