Original Message:
Sent: 05-14-2024 08:51
From: Ingo Stiller
Subject: Verify Pathname after changing it dynamically
And if you have such a file/table, I guarantee you that the next time you make a copy for a test environment, you will forget to change the content and it can happen that the wrong database is supplied with updates!
But how about writing a view that collects and returns all relevant/necessary information.
At https://dev.mysql.com/doc/refman/8.0/en/information-functions.html you can find some more functions.
If the name of the view is kept generic (e.g. 'SysInfos') and the column names are also generic, you can even set up this view on other database systems and get a standardized return of what you are dealing with. [A first column in the view should then contain "MQL" in your case :-)]
Ingo
------------------------------
Ingo Stiller
Aareon Deutschland GmbH
Original Message:
Sent: 05-13-2024 05:08
From: Osman Shariff
Subject: Verify Pathname after changing it dynamically
That would work, but why bother when a perfectly working way already exists without the maintenance. I can't see the purpose.
------------------------------
Osman Shariff
Original Message:
Sent: 05-13-2024 04:15
From: Jérémie CEDOLIN
Subject: Verify Pathname after changing it dynamically
However, I do it by another way:
I create a parameter in a file of each database, with the same key but a different value.
After the "open" instruction, I read this parameter and check if the value returned is the one that is expected.
------------------------------
Jérémie CEDOLIN
Proges Plus
Willems FR
Original Message:
Sent: 05-13-2024 03:59
From: Jérémie CEDOLIN
Subject: Verify Pathname after changing it dynamically
Thanks for the answer, it's ok with "select database()" on MySQL
------------------------------
Jérémie CEDOLIN
Proges Plus
Willems FR
Original Message:
Sent: 04-05-2024 06:06
From: Iain Sharp
Subject: Verify Pathname after changing it dynamically
On MySql it appears that would be
SQL "select DATABASE()",$path
------------------------------
Iain Sharp
Head of Technical Services
Pci Systems Ltd
Sheffield GB
Original Message:
Sent: 04-05-2024 04:46
From: Osman Shariff
Subject: Verify Pathname after changing it dynamically
Would this work using Sql Server
sql "SELECT DB_NAME()",$path
{test the result}
------------------------------
Osman Shariff
Original Message:
Sent: 04-04-2024 07:59
From: Jérémie CEDOLIN
Subject: Verify Pathname after changing it dynamically
Hello,
I used the "open" and "close" instruction to connect on differents databases, changing the PathName of the connector $MQL.
However, I want to verify if the connection is done on the correct database after open a new one, even if the $Status = 0.
(I have cases where I put something wrong in the pathname, and $Status=0 however)
Is there a Uniface instruction which can give me the pathname actually used?
Thanks
------------------------------
Jérémie CEDOLIN
Proges Plus
Willems FR
------------------------------