Good morning Guru
Our applications use an ini configuration file.
eg: ProfileString ('app_lore', "stock", "0105", "S")
Unfortunately, erroneously, in some cases there are more than one 'app_lore' file (in different folders).
Is there a way to know which file was read by ProfileString (complete path)?
ty
- You are here:
- Home
- Q&A
- Q&A
- PowerBuilder
- ProfileString
Resolved
ProfileString
- How-to
- ATK Gimmy Susan
- PowerBuilder
- Monday, 13 May 2019 15:40 PM UTC
- Tuesday, 14 May 2019 18:54 PM UTC
- PowerBuilder
- # Permalink
ProfileString ( filename, section, key, default )
ProfileString ('app_lore', "stock", "0105", "S")
At some point, your design must be changed. Decide which fix you will implement, code it, test it, QA it, then create a new build. Schedule time to replace the segments/PBDs or DLLs of code that need to be replaced.
In most cases, these segments can be replaced hot, i.e. while users are in the application, and the changes will get picked up the next time the app is started.
Suggestions / ideas / options:
1) Read your INI file at start-up then store the data in one or more application caches.
Use the cache(s) instead of the multiple INI files.
2) From what it looks like, the data in the "app_lore" section really needs to be in a table.
If possible, move the data from the INI file into a table a RETRIEVE your data as needed.
If not possible, come up was a way to distinguish between data segments and revise "app_lore" accordingly.
3) Offer the users an option to select & read the INI file they need with a GetFileOpenName.
Good Luck,
Olan
- Roland Smith
- Wednesday, 15 May 2019 00:17 AM UTC
-
Helpful Loading... Helpful 0
- Monday, 13 May 2019 17:42 PM UTC
- PowerBuilder
- # 1
Not from the program. It will use the standard search that Windows uses for loading DLL files, current folder then folders in the path starting at the first one.
- Chris Pollach @Appeon
- Monday, 13 May 2019 19:31 PM UTC
-
Helpful Loading... Helpful 0
- Monday, 13 May 2019 18:49 PM UTC
- PowerBuilder
- # 2
Hi Gimmy;
FWIW: You can use the GetCurrentDirectory() command before the ProfileString to see what folder the INI would be coming from if it does not have an O/S "path" in the ProfileString/Int() command's 1st argument (like you seem to indicate).
Regards ... Chris
- ATK Gimmy Susan
- Tuesday, 14 May 2019 11:09 AM UTC
-
Helpful Loading... Helpful 0
- Chris Pollach @Appeon
- Tuesday, 14 May 2019 15:37 PM UTC
-
Helpful Loading... Helpful 0
- Monday, 13 May 2019 19:38 PM UTC
- PowerBuilder
- # 3
You can always pass the full path name of the file if you want.
- ATK Gimmy Susan
- Tuesday, 14 May 2019 11:07 AM UTC
The installation is already operational
-
Helpful Loading... Helpful 0
- Page :
- 1
However, you are not allowed to reply to this question.