Re: [NF] Network Request timed out
You are running pings over the internet, the result of those will be tied to the level of service being provided at each site. On Wed, May 2, 2018, 1:41 PM Frank Cazabonwrote: > Thanks, I'm just going to pass the info over to them and tell them they > need to hire a network consultant to investigate it. Just wanted to know if > that level of timeouts is normal or not. > > On 2 May 2018 16:18:10 GMT-04:00, "Paul H. Tarver" > wrote: > >I recently worked on a project where we were polling multiple SQL > >databases across multiple servers and there was one server that would > >occasionally get skipped due to timeout delays. We adjusted our wait > >times in VFP, but still on occasion this would happen. IT did further > >stress testing on the server and found the network card was going bad. > >Replaced card and problem vanished. If other locations are working > >doing the same process, then I would focus on local network > >environmental elements such as the network switches, cables or cards. > > > >Paul H. Tarver > > > > > > > >-Original Message- > >From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of > >Frank Cazabon > >Sent: Wednesday, May 02, 2018 1:08 PM > >To: profoxt...@leafe.com > >Subject: [NF] Network Request timed out > > > >I am having some problems when running code that synchronises data > >between 2 SQL Servers using SM Sync Framework. This code runs fine at > >about 50 other sites. > > > >I am getting time out errors reported: > > > >TCP Provider, error: 0 - The semaphore timeout period has expired > > > >Google has suggested this site > > > https://sqlserverscribbles.com/2013/02/15/tcp-provider-the-semaphore-timeout-period-has-expired/ > > > >as possible solutions but I wanted to make sure there is actually a > >problem before I try to fix it as I am not a network guy. My client > >doesn't have anyone who manages their network for them either. > > > >I found a suggestion to run this command: > > > >ping -t hostname > out.txt > > > >so I did that and left it running for about 4 and a half hours. In > >that > >period I got 38 Request timed out messages (out of 18,685 total > >messages, so 18,643 were successful, the majority in 3 or 4 ms but > >pretty regularly going up to 22 or 23ms). > > > >Is this normal, or do you think they have a problem? > > > >-- > > > >Frank. > > > >Frank Cazabon > > > > [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CACBEV=xtyffhn+xrwtzau8uh1iompe7vs1p4vo80kmtbaau...@mail.gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
RE: [NF] Network Request timed out
Thanks, I'm just going to pass the info over to them and tell them they need to hire a network consultant to investigate it. Just wanted to know if that level of timeouts is normal or not. On 2 May 2018 16:18:10 GMT-04:00, "Paul H. Tarver"wrote: >I recently worked on a project where we were polling multiple SQL >databases across multiple servers and there was one server that would >occasionally get skipped due to timeout delays. We adjusted our wait >times in VFP, but still on occasion this would happen. IT did further >stress testing on the server and found the network card was going bad. >Replaced card and problem vanished. If other locations are working >doing the same process, then I would focus on local network >environmental elements such as the network switches, cables or cards. > >Paul H. Tarver > > > >-Original Message- >From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of >Frank Cazabon >Sent: Wednesday, May 02, 2018 1:08 PM >To: profoxt...@leafe.com >Subject: [NF] Network Request timed out > >I am having some problems when running code that synchronises data >between 2 SQL Servers using SM Sync Framework. This code runs fine at >about 50 other sites. > >I am getting time out errors reported: > >TCP Provider, error: 0 - The semaphore timeout period has expired > >Google has suggested this site >https://sqlserverscribbles.com/2013/02/15/tcp-provider-the-semaphore-timeout-period-has-expired/ > >as possible solutions but I wanted to make sure there is actually a >problem before I try to fix it as I am not a network guy. My client >doesn't have anyone who manages their network for them either. > >I found a suggestion to run this command: > >ping -t hostname > out.txt > >so I did that and left it running for about 4 and a half hours. In >that >period I got 38 Request timed out messages (out of 18,685 total >messages, so 18,643 were successful, the majority in 3 or 4 ms but >pretty regularly going up to 22 or 23ms). > >Is this normal, or do you think they have a problem? > >-- > >Frank. > >Frank Cazabon > > [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/18131c15-2f71-4c69-9f5b-b4d211160...@gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: [NF] Network Request timed out
They are the cheapest client I have. Scrimp on everything. This is running through log me in hamachi VPN over the internet, not a LAN. On 2 May 2018 16:34:36 GMT-04:00, Alan Bourkewrote: >Frank > >>My client >> doesn't have anyone who manages their network for them either. > >Why not? > >Anyway if it is a LAN I would expect the continous ping to come back >under 10ms if not under 1ms at all times, without any timeouts. > >-- > Alan Bourke > alanpbourke (at) fastmail (dot) fm > >On Wed, 2 May 2018, at 7:07 PM, Frank Cazabon wrote: >> I am having some problems when running code that synchronises data >> between 2 SQL Servers using SM Sync Framework. This code runs fine at > >> about 50 other sites. >> >> I am getting time out errors reported: >> >> TCP Provider, error: 0 - The semaphore timeout period has expired >> >> Google has suggested this site >> >https://sqlserverscribbles.com/2013/02/15/tcp-provider-the-semaphore-timeout-period-has-expired/ > >> as possible solutions but I wanted to make sure there is actually a >> problem before I try to fix it as I am not a network guy. My client >> doesn't have anyone who manages their network for them either. >> >> I found a suggestion to run this command: >> >> ping -t hostname > out.txt >> >> so I did that and left it running for about 4 and a half hours. In >that >> period I got 38 Request timed out messages (out of 18,685 total >> messages, so 18,643 were successful, the majority in 3 or 4 ms but >> pretty regularly going up to 22 or 23ms). >> >> Is this normal, or do you think they have a problem? >> >> -- >> >> Frank. >> >> Frank Cazabon >> >> [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/c1ade2fe-4e01-4999-a55a-40adb0b6c...@gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: [NF] Network Request timed out
Frank >My client > doesn't have anyone who manages their network for them either. Why not? Anyway if it is a LAN I would expect the continous ping to come back under 10ms if not under 1ms at all times, without any timeouts. -- Alan Bourke alanpbourke (at) fastmail (dot) fm On Wed, 2 May 2018, at 7:07 PM, Frank Cazabon wrote: > I am having some problems when running code that synchronises data > between 2 SQL Servers using SM Sync Framework. This code runs fine at > about 50 other sites. > > I am getting time out errors reported: > > TCP Provider, error: 0 - The semaphore timeout period has expired > > Google has suggested this site > https://sqlserverscribbles.com/2013/02/15/tcp-provider-the-semaphore-timeout-period-has-expired/ > > as possible solutions but I wanted to make sure there is actually a > problem before I try to fix it as I am not a network guy. My client > doesn't have anyone who manages their network for them either. > > I found a suggestion to run this command: > > ping -t hostname > out.txt > > so I did that and left it running for about 4 and a half hours. In that > period I got 38 Request timed out messages (out of 18,685 total > messages, so 18,643 were successful, the majority in 3 or 4 ms but > pretty regularly going up to 22 or 23ms). > > Is this normal, or do you think they have a problem? > > -- > > Frank. > > Frank Cazabon > > [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/1525293276.1343186.1358731152.2314a...@webmail.messagingengine.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
RE: [NF] Network Request timed out
I recently worked on a project where we were polling multiple SQL databases across multiple servers and there was one server that would occasionally get skipped due to timeout delays. We adjusted our wait times in VFP, but still on occasion this would happen. IT did further stress testing on the server and found the network card was going bad. Replaced card and problem vanished. If other locations are working doing the same process, then I would focus on local network environmental elements such as the network switches, cables or cards. Paul H. Tarver -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Frank Cazabon Sent: Wednesday, May 02, 2018 1:08 PM To: profoxt...@leafe.com Subject: [NF] Network Request timed out I am having some problems when running code that synchronises data between 2 SQL Servers using SM Sync Framework. This code runs fine at about 50 other sites. I am getting time out errors reported: TCP Provider, error: 0 - The semaphore timeout period has expired Google has suggested this site https://sqlserverscribbles.com/2013/02/15/tcp-provider-the-semaphore-timeout-period-has-expired/ as possible solutions but I wanted to make sure there is actually a problem before I try to fix it as I am not a network guy. My client doesn't have anyone who manages their network for them either. I found a suggestion to run this command: ping -t hostname > out.txt so I did that and left it running for about 4 and a half hours. In that period I got 38 Request timed out messages (out of 18,685 total messages, so 18,643 were successful, the majority in 3 or 4 ms but pretty regularly going up to 22 or 23ms). Is this normal, or do you think they have a problem? -- Frank. Frank Cazabon [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/065e01d3e252$b0c2fa00$1248ee00$@tpcqpc.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
[NF] Network Request timed out
I am having some problems when running code that synchronises data between 2 SQL Servers using SM Sync Framework. This code runs fine at about 50 other sites. I am getting time out errors reported: TCP Provider, error: 0 - The semaphore timeout period has expired Google has suggested this site https://sqlserverscribbles.com/2013/02/15/tcp-provider-the-semaphore-timeout-period-has-expired/ as possible solutions but I wanted to make sure there is actually a problem before I try to fix it as I am not a network guy. My client doesn't have anyone who manages their network for them either. I found a suggestion to run this command: ping -t hostname > out.txt so I did that and left it running for about 4 and a half hours. In that period I got 38 Request timed out messages (out of 18,685 total messages, so 18,643 were successful, the majority in 3 or 4 ms but pretty regularly going up to 22 or 23ms). Is this normal, or do you think they have a problem? -- Frank. Frank Cazabon ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/de3f86f0-46e6-391a-db10-936ce5064...@gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
RE: AGETFILEVERSION Fail
Frank, you were on the right track and I really appreciated your suggestions! Gianni just pointed me in that direction a little sooner. I don't know what the connection changes once you get a handle, but apparently AGETFILEVERSION() requires the full path & filename in order to return the proper information in ALL scenarios. Even though the Foxpro documentation says that the path is optional, that is clearly not the case in every situation. Thanks again! Paul H. Tarver -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Frank Cazabon Sent: Wednesday, May 02, 2018 12:16 PM To: profoxt...@leafe.com Subject: Re: AGETFILEVERSION Fail What is the file name being passed to AGETFILEVERSION() when it fails to return anything? What is the current directory at this point in time? I believe there was a WinAPI version of this function, can you use that instead of AGETFILEVERSION() and see if it makes a difference? Frank. Frank Cazabon On 02/05/2018 12:40 PM, Paul H. Tarver wrote: > After some further testing, I determined that mis-spoke when I said that > AGETFILEVERSION() was returning an empty string and not an array. > > What it is actually doing is returning NOTHING. If I remove the LOCAL ARRAY > line from the routine, I found that the once the connection is made, > AGETFILEVERSION() does not even create the array once a connection handle to > the Oracle ODBC driver is obtained, AGETFILEVERSION() simply fails without > error, without creating an array, but it does return a 0 as the number of > elements. > > Paul H. Tarver > > > > -Original Message- > From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Paul H. > Tarver > Sent: Wednesday, May 02, 2018 11:28 AM > To: profoxt...@leafe.com > Subject: RE: AGETFILEVERSION Fail > > I checked the array generated from ADIR() in my code and it is returning the > proper list of EXE files found in the folder. But I'm thinking I want to do > some more testing with your idea about the directory or path changing after > we get a connection to the ODBC driver or something like that. I'll post > more once I chase that rabbit. > > As I mentioned in another response the weird thing is AGETFILEVERSION() is > supposed to always return an Array, but once we make a connection to the > Oracle ODBC driver, AGETFILEVERSION() simply returns an empty string. Not an > empty array, an empty string. > > On top of that, I cannot for the life of me figure out what would > AGETFILEVERSION() have in common with and ODBC connection. I'm sure that > where they overlap will be where the problem lies, but I can't figure out > where those two functions would overlap. > > Thanks for the idea though! > > Paul H. Tarver > > > > -Original Message- > From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Gianni > Turri > Sent: Wednesday, May 02, 2018 10:51 AM > To: profoxt...@leafe.com > Subject: Re: AGETFILEVERSION Fail > > Hi Paul! > > If the current directory ( curdir() ) changes to something like > C:\Windows\System32 > your array gets populated by many exe's but not the exe's you expect from > your application directory, > because in you code you load adir() with exe's from the "current" directory. > >> lnExeNumber = ADIR(laPrograms, '*.EXE') > Gianni > > -Original Message- > On Wed, 02 May 2018 02:47:00 +0200, Gianni Turri> wrote: > > Hi Paul! > > I remember many years ago when printing to pdf using the Adobe Acrobat > printer driver > that at the return from "report form ..." the curdir() was changed to > something like C:\Windows\System32. > > Are you sure it is not happening something similar? > > Gianni > > -Original Message- > On Tue, 1 May 2018 15:23:55 -0500, "Paul H. Tarver" wrote: > > Thanks Ted. > > The code I'm using now is how I determine the name of the compiled > application and once it returns the correct .EXE name, we then look for an > .INI file with the same JUSTSTEM() where our settings are. The code works > whether compiled or in the IDE and the only requirement is that I have at > least one copy of the compiled .exe file in the development folder. > > I know I can hard code that easily enough, but because I have so many > projects and they often have different compiled names, so the logic of > looking in the app folder for an .EXE with 'MAIN PROGRAM' in the file > version information makes the method to retrieve the JUSTSTEM('exe name') a > simple prospect and has worked since version 6. > > First time I've ever had a problem with it and that's only after the second > time I get a handle to the Oracle database via the Oracle ODBC driver. Weird > stuff. > > Thanks for the suggestions though. I may end up refactoring this whole > process anyway because of this weirdness. > > Paul H. Tarver > > > -Original Message- > From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Ted > Roche > Sent: Tuesday, May
Re: AGETFILEVERSION Fail
>From VFP Help AGETFILEVERSION( ) returns the number of elements in the array. If the file you specify does not exist or does not contain Windows version resources, AGETFILEVERSION( ) returns zero, and the array, if already created, remains unchanged. Try to pass the fully qualified pathname instead of the filename only. Gianni -Original Message- On Wed, 2 May 2018 11:40:49 -0500, "Paul H. Tarver"wrote: After some further testing, I determined that mis-spoke when I said that AGETFILEVERSION() was returning an empty string and not an array. What it is actually doing is returning NOTHING. If I remove the LOCAL ARRAY line from the routine, I found that the once the connection is made, AGETFILEVERSION() does not even create the array once a connection handle to the Oracle ODBC driver is obtained, AGETFILEVERSION() simply fails without error, without creating an array, but it does return a 0 as the number of elements. Paul H. Tarver -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Paul H. Tarver Sent: Wednesday, May 02, 2018 11:28 AM To: profoxt...@leafe.com Subject: RE: AGETFILEVERSION Fail I checked the array generated from ADIR() in my code and it is returning the proper list of EXE files found in the folder. But I'm thinking I want to do some more testing with your idea about the directory or path changing after we get a connection to the ODBC driver or something like that. I'll post more once I chase that rabbit. As I mentioned in another response the weird thing is AGETFILEVERSION() is supposed to always return an Array, but once we make a connection to the Oracle ODBC driver, AGETFILEVERSION() simply returns an empty string. Not an empty array, an empty string. On top of that, I cannot for the life of me figure out what would AGETFILEVERSION() have in common with and ODBC connection. I'm sure that where they overlap will be where the problem lies, but I can't figure out where those two functions would overlap. Thanks for the idea though! Paul H. Tarver -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Gianni Turri Sent: Wednesday, May 02, 2018 10:51 AM To: profoxt...@leafe.com Subject: Re: AGETFILEVERSION Fail Hi Paul! If the current directory ( curdir() ) changes to something like C:\Windows\System32 your array gets populated by many exe's but not the exe's you expect from your application directory, because in you code you load adir() with exe's from the "current" directory. > lnExeNumber = ADIR(laPrograms, '*.EXE') Gianni -Original Message- On Wed, 02 May 2018 02:47:00 +0200, Gianni Turri wrote: Hi Paul! I remember many years ago when printing to pdf using the Adobe Acrobat printer driver that at the return from "report form ..." the curdir() was changed to something like C:\Windows\System32. Are you sure it is not happening something similar? Gianni -Original Message- On Tue, 1 May 2018 15:23:55 -0500, "Paul H. Tarver" wrote: Thanks Ted. The code I'm using now is how I determine the name of the compiled application and once it returns the correct .EXE name, we then look for an .INI file with the same JUSTSTEM() where our settings are. The code works whether compiled or in the IDE and the only requirement is that I have at least one copy of the compiled .exe file in the development folder. I know I can hard code that easily enough, but because I have so many projects and they often have different compiled names, so the logic of looking in the app folder for an .EXE with 'MAIN PROGRAM' in the file version information makes the method to retrieve the JUSTSTEM('exe name') a simple prospect and has worked since version 6. First time I've ever had a problem with it and that's only after the second time I get a handle to the Oracle database via the Oracle ODBC driver. Weird stuff. Thanks for the suggestions though. I may end up refactoring this whole process anyway because of this weirdness. Paul H. Tarver -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Ted Roche Sent: Tuesday, May 01, 2018 2:38 PM To: profoxt...@leafe.com Subject: Re: AGETFILEVERSION Fail On Tue, May 1, 2018 at 3:23 PM, Paul H. Tarver wrote: > > The reason for this code is to identify the application .EXE. Perhaps there > is a better way to identify the application name that will eliminate the > need to use AGETFILEVERSION() to identify the main .exe file for the > application. > You might consider PROGRAM(), the venerable SYS(16) or the (new to VFP7) AStackInfo(). https://www.tedroche.com/hackfox7/s4g120.html [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list:
RE: AGETFILEVERSION Fail - SOLVED!
Thanks to Gianni for giving me the idea which led to the solution. Gianni had written this: > that at the return from "report form ..." the curdir() was changed to > something like C:\Windows\System32. That got me to thinking perhaps the default folder was changing for some unknown reason. It was not. The path remained the same. However, in testing, I wondered what would happen if I explicitly defined the path & filename in the AGETFILEVERSION() command. As the code was written, I got the filename from the ADIR() command but the array of filenames returned does not include the full path. I decided to try re-writing the line for AGETFILEVERSION() like this: lnElements = AGETFILEVERSION(laVersInfo, ADDBS(SYS(5) + SYS(2003)) + laPrograms[m.lnLoopCnt,1]) And it worked perfectly even after getting a connection handle to the Oracle database! I exited my form multiple times and it continued to work as expected. However, when I issue the AGETFILEVERSION() without the full path included, it starts to fail again. So I've updated my class method to include the explicit full path which will be backwardly compatible with all my previous code and I learned a valuable lesson: "When in doubt, get explicit!" Thanks for everyone's help on this! It was definitely appreciated! Paul H. Tarver -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Paul H. Tarver Sent: Wednesday, May 02, 2018 11:41 AM To: profoxt...@leafe.com Subject: RE: AGETFILEVERSION Fail After some further testing, I determined that mis-spoke when I said that AGETFILEVERSION() was returning an empty string and not an array. What it is actually doing is returning NOTHING. If I remove the LOCAL ARRAY line from the routine, I found that the once the connection is made, AGETFILEVERSION() does not even create the array once a connection handle to the Oracle ODBC driver is obtained, AGETFILEVERSION() simply fails without error, without creating an array, but it does return a 0 as the number of elements. Paul H. Tarver -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Paul H. Tarver Sent: Wednesday, May 02, 2018 11:28 AM To: profoxt...@leafe.com Subject: RE: AGETFILEVERSION Fail I checked the array generated from ADIR() in my code and it is returning the proper list of EXE files found in the folder. But I'm thinking I want to do some more testing with your idea about the directory or path changing after we get a connection to the ODBC driver or something like that. I'll post more once I chase that rabbit. As I mentioned in another response the weird thing is AGETFILEVERSION() is supposed to always return an Array, but once we make a connection to the Oracle ODBC driver, AGETFILEVERSION() simply returns an empty string. Not an empty array, an empty string. On top of that, I cannot for the life of me figure out what would AGETFILEVERSION() have in common with and ODBC connection. I'm sure that where they overlap will be where the problem lies, but I can't figure out where those two functions would overlap. Thanks for the idea though! Paul H. Tarver -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Gianni Turri Sent: Wednesday, May 02, 2018 10:51 AM To: profoxt...@leafe.com Subject: Re: AGETFILEVERSION Fail Hi Paul! If the current directory ( curdir() ) changes to something like C:\Windows\System32 your array gets populated by many exe's but not the exe's you expect from your application directory, because in you code you load adir() with exe's from the "current" directory. > lnExeNumber = ADIR(laPrograms, '*.EXE') Gianni -Original Message- On Wed, 02 May 2018 02:47:00 +0200, Gianni Turriwrote: Hi Paul! I remember many years ago when printing to pdf using the Adobe Acrobat printer driver that at the return from "report form ..." the curdir() was changed to something like C:\Windows\System32. Are you sure it is not happening something similar? Gianni -Original Message- On Tue, 1 May 2018 15:23:55 -0500, "Paul H. Tarver" wrote: Thanks Ted. The code I'm using now is how I determine the name of the compiled application and once it returns the correct .EXE name, we then look for an .INI file with the same JUSTSTEM() where our settings are. The code works whether compiled or in the IDE and the only requirement is that I have at least one copy of the compiled .exe file in the development folder. I know I can hard code that easily enough, but because I have so many projects and they often have different compiled names, so the logic of looking in the app folder for an .EXE with 'MAIN PROGRAM' in the file version information makes the method to retrieve the JUSTSTEM('exe name') a simple prospect and has worked since version 6. First time I've ever had a problem with it and that's only after the second time I get a handle to
Re: AGETFILEVERSION Fail
What is the file name being passed to AGETFILEVERSION() when it fails to return anything? What is the current directory at this point in time? I believe there was a WinAPI version of this function, can you use that instead of AGETFILEVERSION() and see if it makes a difference? Frank. Frank Cazabon On 02/05/2018 12:40 PM, Paul H. Tarver wrote: After some further testing, I determined that mis-spoke when I said that AGETFILEVERSION() was returning an empty string and not an array. What it is actually doing is returning NOTHING. If I remove the LOCAL ARRAY line from the routine, I found that the once the connection is made, AGETFILEVERSION() does not even create the array once a connection handle to the Oracle ODBC driver is obtained, AGETFILEVERSION() simply fails without error, without creating an array, but it does return a 0 as the number of elements. Paul H. Tarver -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Paul H. Tarver Sent: Wednesday, May 02, 2018 11:28 AM To: profoxt...@leafe.com Subject: RE: AGETFILEVERSION Fail I checked the array generated from ADIR() in my code and it is returning the proper list of EXE files found in the folder. But I'm thinking I want to do some more testing with your idea about the directory or path changing after we get a connection to the ODBC driver or something like that. I'll post more once I chase that rabbit. As I mentioned in another response the weird thing is AGETFILEVERSION() is supposed to always return an Array, but once we make a connection to the Oracle ODBC driver, AGETFILEVERSION() simply returns an empty string. Not an empty array, an empty string. On top of that, I cannot for the life of me figure out what would AGETFILEVERSION() have in common with and ODBC connection. I'm sure that where they overlap will be where the problem lies, but I can't figure out where those two functions would overlap. Thanks for the idea though! Paul H. Tarver -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Gianni Turri Sent: Wednesday, May 02, 2018 10:51 AM To: profoxt...@leafe.com Subject: Re: AGETFILEVERSION Fail Hi Paul! If the current directory ( curdir() ) changes to something like C:\Windows\System32 your array gets populated by many exe's but not the exe's you expect from your application directory, because in you code you load adir() with exe's from the "current" directory. lnExeNumber = ADIR(laPrograms, '*.EXE') Gianni -Original Message- On Wed, 02 May 2018 02:47:00 +0200, Gianni Turriwrote: Hi Paul! I remember many years ago when printing to pdf using the Adobe Acrobat printer driver that at the return from "report form ..." the curdir() was changed to something like C:\Windows\System32. Are you sure it is not happening something similar? Gianni -Original Message- On Tue, 1 May 2018 15:23:55 -0500, "Paul H. Tarver" wrote: Thanks Ted. The code I'm using now is how I determine the name of the compiled application and once it returns the correct .EXE name, we then look for an .INI file with the same JUSTSTEM() where our settings are. The code works whether compiled or in the IDE and the only requirement is that I have at least one copy of the compiled .exe file in the development folder. I know I can hard code that easily enough, but because I have so many projects and they often have different compiled names, so the logic of looking in the app folder for an .EXE with 'MAIN PROGRAM' in the file version information makes the method to retrieve the JUSTSTEM('exe name') a simple prospect and has worked since version 6. First time I've ever had a problem with it and that's only after the second time I get a handle to the Oracle database via the Oracle ODBC driver. Weird stuff. Thanks for the suggestions though. I may end up refactoring this whole process anyway because of this weirdness. Paul H. Tarver -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Ted Roche Sent: Tuesday, May 01, 2018 2:38 PM To: profoxt...@leafe.com Subject: Re: AGETFILEVERSION Fail On Tue, May 1, 2018 at 3:23 PM, Paul H. Tarver wrote: The reason for this code is to identify the application .EXE. Perhaps there is a better way to identify the application name that will eliminate the need to use AGETFILEVERSION() to identify the main .exe file for the application. You might consider PROGRAM(), the venerable SYS(16) or the (new to VFP7) AStackInfo(). https://www.tedroche.com/hackfox7/s4g120.html [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message:
RE: AGETFILEVERSION Fail
After some further testing, I determined that mis-spoke when I said that AGETFILEVERSION() was returning an empty string and not an array. What it is actually doing is returning NOTHING. If I remove the LOCAL ARRAY line from the routine, I found that the once the connection is made, AGETFILEVERSION() does not even create the array once a connection handle to the Oracle ODBC driver is obtained, AGETFILEVERSION() simply fails without error, without creating an array, but it does return a 0 as the number of elements. Paul H. Tarver -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Paul H. Tarver Sent: Wednesday, May 02, 2018 11:28 AM To: profoxt...@leafe.com Subject: RE: AGETFILEVERSION Fail I checked the array generated from ADIR() in my code and it is returning the proper list of EXE files found in the folder. But I'm thinking I want to do some more testing with your idea about the directory or path changing after we get a connection to the ODBC driver or something like that. I'll post more once I chase that rabbit. As I mentioned in another response the weird thing is AGETFILEVERSION() is supposed to always return an Array, but once we make a connection to the Oracle ODBC driver, AGETFILEVERSION() simply returns an empty string. Not an empty array, an empty string. On top of that, I cannot for the life of me figure out what would AGETFILEVERSION() have in common with and ODBC connection. I'm sure that where they overlap will be where the problem lies, but I can't figure out where those two functions would overlap. Thanks for the idea though! Paul H. Tarver -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Gianni Turri Sent: Wednesday, May 02, 2018 10:51 AM To: profoxt...@leafe.com Subject: Re: AGETFILEVERSION Fail Hi Paul! If the current directory ( curdir() ) changes to something like C:\Windows\System32 your array gets populated by many exe's but not the exe's you expect from your application directory, because in you code you load adir() with exe's from the "current" directory. > lnExeNumber = ADIR(laPrograms, '*.EXE') Gianni -Original Message- On Wed, 02 May 2018 02:47:00 +0200, Gianni Turriwrote: Hi Paul! I remember many years ago when printing to pdf using the Adobe Acrobat printer driver that at the return from "report form ..." the curdir() was changed to something like C:\Windows\System32. Are you sure it is not happening something similar? Gianni -Original Message- On Tue, 1 May 2018 15:23:55 -0500, "Paul H. Tarver" wrote: Thanks Ted. The code I'm using now is how I determine the name of the compiled application and once it returns the correct .EXE name, we then look for an .INI file with the same JUSTSTEM() where our settings are. The code works whether compiled or in the IDE and the only requirement is that I have at least one copy of the compiled .exe file in the development folder. I know I can hard code that easily enough, but because I have so many projects and they often have different compiled names, so the logic of looking in the app folder for an .EXE with 'MAIN PROGRAM' in the file version information makes the method to retrieve the JUSTSTEM('exe name') a simple prospect and has worked since version 6. First time I've ever had a problem with it and that's only after the second time I get a handle to the Oracle database via the Oracle ODBC driver. Weird stuff. Thanks for the suggestions though. I may end up refactoring this whole process anyway because of this weirdness. Paul H. Tarver -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Ted Roche Sent: Tuesday, May 01, 2018 2:38 PM To: profoxt...@leafe.com Subject: Re: AGETFILEVERSION Fail On Tue, May 1, 2018 at 3:23 PM, Paul H. Tarver wrote: > > The reason for this code is to identify the application .EXE. Perhaps there > is a better way to identify the application name that will eliminate the > need to use AGETFILEVERSION() to identify the main .exe file for the > application. > You might consider PROGRAM(), the venerable SYS(16) or the (new to VFP7) AStackInfo(). https://www.tedroche.com/hackfox7/s4g120.html [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/042001d3e234$54251710$fc6f4530$@tpcqpc.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
RE: AGETFILEVERSION Fail
I checked the array generated from ADIR() in my code and it is returning the proper list of EXE files found in the folder. But I'm thinking I want to do some more testing with your idea about the directory or path changing after we get a connection to the ODBC driver or something like that. I'll post more once I chase that rabbit. As I mentioned in another response the weird thing is AGETFILEVERSION() is supposed to always return an Array, but once we make a connection to the Oracle ODBC driver, AGETFILEVERSION() simply returns an empty string. Not an empty array, an empty string. On top of that, I cannot for the life of me figure out what would AGETFILEVERSION() have in common with and ODBC connection. I'm sure that where they overlap will be where the problem lies, but I can't figure out where those two functions would overlap. Thanks for the idea though! Paul H. Tarver -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Gianni Turri Sent: Wednesday, May 02, 2018 10:51 AM To: profoxt...@leafe.com Subject: Re: AGETFILEVERSION Fail Hi Paul! If the current directory ( curdir() ) changes to something like C:\Windows\System32 your array gets populated by many exe's but not the exe's you expect from your application directory, because in you code you load adir() with exe's from the "current" directory. > lnExeNumber = ADIR(laPrograms, '*.EXE') Gianni -Original Message- On Wed, 02 May 2018 02:47:00 +0200, Gianni Turriwrote: Hi Paul! I remember many years ago when printing to pdf using the Adobe Acrobat printer driver that at the return from "report form ..." the curdir() was changed to something like C:\Windows\System32. Are you sure it is not happening something similar? Gianni -Original Message- On Tue, 1 May 2018 15:23:55 -0500, "Paul H. Tarver" wrote: Thanks Ted. The code I'm using now is how I determine the name of the compiled application and once it returns the correct .EXE name, we then look for an .INI file with the same JUSTSTEM() where our settings are. The code works whether compiled or in the IDE and the only requirement is that I have at least one copy of the compiled .exe file in the development folder. I know I can hard code that easily enough, but because I have so many projects and they often have different compiled names, so the logic of looking in the app folder for an .EXE with 'MAIN PROGRAM' in the file version information makes the method to retrieve the JUSTSTEM('exe name') a simple prospect and has worked since version 6. First time I've ever had a problem with it and that's only after the second time I get a handle to the Oracle database via the Oracle ODBC driver. Weird stuff. Thanks for the suggestions though. I may end up refactoring this whole process anyway because of this weirdness. Paul H. Tarver -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Ted Roche Sent: Tuesday, May 01, 2018 2:38 PM To: profoxt...@leafe.com Subject: Re: AGETFILEVERSION Fail On Tue, May 1, 2018 at 3:23 PM, Paul H. Tarver wrote: > > The reason for this code is to identify the application .EXE. Perhaps there > is a better way to identify the application name that will eliminate the > need to use AGETFILEVERSION() to identify the main .exe file for the > application. > You might consider PROGRAM(), the venerable SYS(16) or the (new to VFP7) AStackInfo(). https://www.tedroche.com/hackfox7/s4g120.html [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/03d301d3e232$922d7090$b68851b0$@tpcqpc.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
RE: AGETFILEVERSION Fail
I did testing similar to what you suggested before I posted to the group. That's how I isolated the issue down to the AGETFILEVERSION() command. I am storing my settings in an INI file which uses the same JUSTSTEM() path and name as the EXE file for different projects where the EXE might be named various ways. By identifying the primary EXE file, we know the settings file that corresponds to the EXE for that project without having to hard code the INI file name within any of our classes, forms or reports. It's just been an easy way to do things for the past 20+ years. During that time our code hasn't changed much for this particular class, but now when we are using the Oracle ODBC Driver, AGETFILEVERSION() returns an empty string instead of the normal array of data. No error, no stop, just an empty string and not an empty array just an empty string. I have confirmed from the tests I've been doing the reason it works the first time, is because we call AGETFILEVERSION() prior to getting a connection handle to the Oracle ODBC but once a connection is established, AGETFILEVERSION() will return only an empty string until I restart Foxpro. My code was useful because as long as I had even an old version of the main EXE file in the development folder, running any program or form that needed to get values from the INI could easily check for the EXE filename and know which setting file to access. That is no longer the case and I'll have to come up with either a solution to what is causing AGETFILEVERISON() to fail or re-factor the class I use to find the EXE file name to use a different method. So far, the suggestions have been good, but most require you to be running the EXE to pull that information from the stack. My method didn't require the EXE to be running in order to identify the INI file. I'll keep testing, Thanks! Paul H. Tarver -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Frank Cazabon Sent: Wednesday, May 02, 2018 7:01 AM To: profoxt...@leafe.com Subject: Re: AGETFILEVERSION Fail Maybe you could break it up into a little test program to narrow it down and ensure it's the Oracle connection causing the problem. Cut out all your code and do something like this: AGETFILEVERSION("Your exe") * test that correct values returned * then connect to Oracle * check AGETFILEVERSION() * disconnect from Oracle * check AGETFILEVERSION() * then connect to Oracle * check AGETFILEVERSION() * disconnect from Oracle * check AGETFILEVERSION() FWIW I use NOT VERSION(2) = 0 to determine if I'm running in development mode (I almost never run the exe in development mode, just start from the main program or run the individual form). SYS(16,0) or PROGRAM(0) may also help you out as an alternative. Frank. Frank Cazabon On 01/05/2018 03:23 PM, Paul H. Tarver wrote: > Frank, > > Sorry for the delay in responding. Here's the basic code I'm using: > > m.plFileDesc = "MAIN PROGRAM" > > lnExeNumber = ADIR(laPrograms, '*.EXE') > =ASORT(laPrograms,3,-1,1) > > leRetVal = '' > > IF m.lnExeNumber > 0 > > FOR lnLoopCnt = 1 TO m.lnExeNumber > > lnElements = AGETFILEVERSION(laVersInfo, > laPrograms[m.lnLoopCnt,1]) > > IF m.lnElements > 0 > > IF UPPER(ALLTRIM(laVersInfo(3))) == > ALLTRIM(m.plFileDesc) > > leRetVal = > ALLTRIM(laPrograms[m.lnLoopCnt,1]) > EXIT > > ENDIF > > ENDIF > > ENDFOR > > ENDIF > > Here's the logical process: > > 1) Start Foxpro, run form, get connection handle to Oracle via ODBC and the > code above works perfectly. > 2) Exit form (without closing Foxpro) and restart form and though we get a > valid array from ADIR() but AGETFILEVERSION() returns '' > 3) Exit Foxpro, restart and GOTO back to step 1 > > The reason for this code is to identify the application .EXE. Perhaps there > is a better way to identify the application name that will eliminate the > need to use AGETFILEVERSION() to identify the main .exe file for the > application. > > Paul > > -Original Message- > From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Frank > Cazabon > Sent: Sunday, April 29, 2018 4:26 PM > To: profoxt...@leafe.com > Subject: Re: AGETFILEVERSION Fail > > Paul, > > what's the code you are using? > > Frank. > > Frank Cazabon > > On 28/04/2018 02:38 PM, Paul H. Tarver wrote: >> Has anyone ever had any problem with AGETFILEVERSION() failing to return >> values after an ODBC connection is made? >> >> >> >> I'm using the Oracle ODBC Driver and until the SQLCONNECT() command is >> issued AGETFILEVERSION() works perfectly. After I issue the SQLCONNECT() >> command and get a valid handle, AGETFILEVERSION() will not return any >> values. I have to exit VFP and restart it, then, AGETFILEVERSION() works >> again until I make another connection to Oracle via ODBC. >> >> >> >> I've used
RE: AGETFILEVERSION Fail
Thanks for the suggestion, but this method will require the EXE to be running to return the correct value. My current method only requires an EXE file to be in the development folder so my method will work even if in the IDE. Paul H. Tarver -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Charlie-gm Sent: Wednesday, May 02, 2018 8:31 AM To: profoxt...@leafe.com Subject: Re: AGETFILEVERSION Fail Maybe take a look at "_VFP.servername". That returns a character string of the .exe (including path) that is being executed. Example: my_exe_file = _vfp.servername I don't think this will work if you are running ".app" files - in that case it may always return the path to the VFP9.exe executable. But if you run that line of code within a compiled VFP .exe, you should always get the path/name of the .exe (assuming that is what you're after here). HTH, -Charlie On 5/1/2018 4:23 PM, Paul H. Tarver wrote: > The code I'm using now is how I determine the name of the compiled > application and once it returns the correct .EXE name, we then look for an ... >> The reason for this code is to identify the application .EXE. Perhaps [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/038301d3e231$208e7c00$61ab7400$@tpcqpc.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: AGETFILEVERSION Fail
Hi Paul! If the current directory ( curdir() ) changes to something like C:\Windows\System32 your array gets populated by many exe's but not the exe's you expect from your application directory, because in you code you load adir() with exe's from the "current" directory. > lnExeNumber = ADIR(laPrograms, '*.EXE') Gianni -Original Message- On Wed, 02 May 2018 02:47:00 +0200, Gianni Turriwrote: Hi Paul! I remember many years ago when printing to pdf using the Adobe Acrobat printer driver that at the return from "report form ..." the curdir() was changed to something like C:\Windows\System32. Are you sure it is not happening something similar? Gianni -Original Message- On Tue, 1 May 2018 15:23:55 -0500, "Paul H. Tarver" wrote: Thanks Ted. The code I'm using now is how I determine the name of the compiled application and once it returns the correct .EXE name, we then look for an .INI file with the same JUSTSTEM() where our settings are. The code works whether compiled or in the IDE and the only requirement is that I have at least one copy of the compiled .exe file in the development folder. I know I can hard code that easily enough, but because I have so many projects and they often have different compiled names, so the logic of looking in the app folder for an .EXE with 'MAIN PROGRAM' in the file version information makes the method to retrieve the JUSTSTEM('exe name') a simple prospect and has worked since version 6. First time I've ever had a problem with it and that's only after the second time I get a handle to the Oracle database via the Oracle ODBC driver. Weird stuff. Thanks for the suggestions though. I may end up refactoring this whole process anyway because of this weirdness. Paul H. Tarver -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Ted Roche Sent: Tuesday, May 01, 2018 2:38 PM To: profoxt...@leafe.com Subject: Re: AGETFILEVERSION Fail On Tue, May 1, 2018 at 3:23 PM, Paul H. Tarver wrote: > > The reason for this code is to identify the application .EXE. Perhaps there > is a better way to identify the application name that will eliminate the > need to use AGETFILEVERSION() to identify the main .exe file for the > application. > You might consider PROGRAM(), the venerable SYS(16) or the (new to VFP7) AStackInfo(). https://www.tedroche.com/hackfox7/s4g120.html ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/1dnjedpb3or5m712dm8lsehs3koag0v...@4ax.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: AGETFILEVERSION Fail
At 06:31 2018-05-02, Charlie-gmwrote: Maybe take a look at "_VFP.servername". That returns a character string of the .exe (including path) that is being executed. Example: my_exe_file = _vfp.servername I don't think this will work if you are running ".app" files - in that case it may always return the path to the VFP9.exe executable. But if you run that line of code within a compiled VFP .exe, you should always get the path/name of the .exe (assuming that is what you're after here). I need the name for using Adobe's print to PDF printer driver. My code: * What is the name of executable that CBS2 is running under? * This is needed by the PDF reporting code. local sys16name, apptype, underruntime, vfpexename sys16name=sys(16,1) apptype=upper(right(sys16name,4)) underruntime=version(2)=0 vfpexename=_vfp.fullname do case case apptype=".FXP" && .FXP under VFP development this.appexename=vfpexename case apptype=".EXE" and !underruntime && .EXE under VFP development this.appexename=vfpexename case apptype=".EXE" and underruntime && .EXE under VFP runtime this.appexename=sys16name otherwise && unknown this.appexename=vfpexename endcase [snip] Sincerely, Gene Wirchenko ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/0914d563483fe650d4ab6a4f237c2e0d@mtlp87 ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: Report Writer - New Discovery
Cool, didn't know that. Have a look at: https://docs.microsoft.com/en-us/previous-versions/visualstudio/foxpro/ms947595(v=msdn.10) https://docs.microsoft.com/en-us/previous-versions/visualstudio/foxpro/ms947597(v=msdn.10) -- Alan Bourke alanpbourke (at) fastmail (dot) fm ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/1525274414.152590.1358345808.25ecf...@webmail.messagingengine.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Report Writer - New Discovery
Gentlemen, Having spent time on many occasions hacking reports in their “VFP Table” state I came across an interesting discovery earlier. If you have the properties dialogue open for any item on the report and right click on it you are prompted with a quick sub menu with the following options: Event Inspector Object Memberdata -> Browse FRX Options Most useful… I never knew of its existence until today as I had never felt it necessary to right click on the form I wonder what other “hidden features” are available deep in VFP!. Dave Crozier Software Development Manager Flexipol Packaging Ltd. --- This communication and the information it contains is intended for the person or organisation to whom it is addressed. Its contents are confidential and may be protected in law. If you have received this e-mail in error you must not copy, distribute or take any action in reliance on it. Unauthorised use, copying or disclosure of any of it may be unlawful. If you have received this message in error, please notify us immediately by telephone or email. Flexipol Packaging Ltd. has taken every reasonable precaution to minimise the risk of virus transmission through email and therefore any files sent via e-mail will have been checked for known viruses. However, you are advised to run your own virus check before opening any attachments received as Flexipol Packaging Ltd will not in any event accept any liability whatsoever once an e-mail and/or any attachment is received. It is the responsibility of the recipient to ensure that they have adequate virus protection. Flexipol Packaging Ltd. Unit 14 Bentwood Road Carrs Industrial Estate Haslingden Rossendale Lancashire BB4 5HH Tel:01706-222792 Fax: 01706-224683 www.Flexipol.co.uk --- Terms & Conditions: Notwithstanding delivery and the passing of risk in the goods, the property in the goods shall not pass to the buyer until the seller Flexipol Packaging Ltd. ("The Company") has received in cash or cleared funds payment in full of the price of the goods and all other goods agreed to be sold by the seller to the buyer for which payment is then due. Until such time as the property in the goods passes to the buyer, the buyer shall hold the goods as the seller's fiduciary agent and bailee and keep the goods separate from those of the buyer and third parties and properly stored protected and insured and identified as the seller's property but shall be entitled to resell or use the goods in the ordinary course of its business. Until such time as the property in the goods passes to the buyer the seller shall be entitled at any time ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/18725b8cd2d5d247873a2baf401d4ab2bec89...@ex2010-a-fpl.fpl.LOCAL ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: AGETFILEVERSION Fail
Maybe take a look at "_VFP.servername". That returns a character string of the .exe (including path) that is being executed. Example: my_exe_file = _vfp.servername I don't think this will work if you are running ".app" files - in that case it may always return the path to the VFP9.exe executable. But if you run that line of code within a compiled VFP .exe, you should always get the path/name of the .exe (assuming that is what you're after here). HTH, -Charlie On 5/1/2018 4:23 PM, Paul H. Tarver wrote: The code I'm using now is how I determine the name of the compiled application and once it returns the correct .EXE name, we then look for an ... The reason for this code is to identify the application .EXE. Perhaps ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/083aca4a-8c54-2d34-52e0-c18b69f1e...@gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: AGETFILEVERSION Fail
Maybe you could break it up into a little test program to narrow it down and ensure it's the Oracle connection causing the problem. Cut out all your code and do something like this: AGETFILEVERSION("Your exe") * test that correct values returned * then connect to Oracle * check AGETFILEVERSION() * disconnect from Oracle * check AGETFILEVERSION() * then connect to Oracle * check AGETFILEVERSION() * disconnect from Oracle * check AGETFILEVERSION() FWIW I use NOT VERSION(2) = 0 to determine if I'm running in development mode (I almost never run the exe in development mode, just start from the main program or run the individual form). SYS(16,0) or PROGRAM(0) may also help you out as an alternative. Frank. Frank Cazabon On 01/05/2018 03:23 PM, Paul H. Tarver wrote: Frank, Sorry for the delay in responding. Here's the basic code I'm using: m.plFileDesc = "MAIN PROGRAM" lnExeNumber = ADIR(laPrograms, '*.EXE') =ASORT(laPrograms,3,-1,1) leRetVal = '' IF m.lnExeNumber > 0 FOR lnLoopCnt = 1 TO m.lnExeNumber lnElements = AGETFILEVERSION(laVersInfo, laPrograms[m.lnLoopCnt,1]) IF m.lnElements > 0 IF UPPER(ALLTRIM(laVersInfo(3))) == ALLTRIM(m.plFileDesc) leRetVal = ALLTRIM(laPrograms[m.lnLoopCnt,1]) EXIT ENDIF ENDIF ENDFOR ENDIF Here's the logical process: 1) Start Foxpro, run form, get connection handle to Oracle via ODBC and the code above works perfectly. 2) Exit form (without closing Foxpro) and restart form and though we get a valid array from ADIR() but AGETFILEVERSION() returns '' 3) Exit Foxpro, restart and GOTO back to step 1 The reason for this code is to identify the application .EXE. Perhaps there is a better way to identify the application name that will eliminate the need to use AGETFILEVERSION() to identify the main .exe file for the application. Paul -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Frank Cazabon Sent: Sunday, April 29, 2018 4:26 PM To: profoxt...@leafe.com Subject: Re: AGETFILEVERSION Fail Paul, what's the code you are using? Frank. Frank Cazabon On 28/04/2018 02:38 PM, Paul H. Tarver wrote: Has anyone ever had any problem with AGETFILEVERSION() failing to return values after an ODBC connection is made? I'm using the Oracle ODBC Driver and until the SQLCONNECT() command is issued AGETFILEVERSION() works perfectly. After I issue the SQLCONNECT() command and get a valid handle, AGETFILEVERSION() will not return any values. I have to exit VFP and restart it, then, AGETFILEVERSION() works again until I make another connection to Oracle via ODBC. I've used the Oracle's ODBC driver previously with no ill affect. But now.Grr! Paul --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/9e29f7f8-10c5-40f9-c8a4-c76df7360...@gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: Class Definition Not Found
1) Is it a version of Opera 3 that is checked out for Windows 10? 2) Do you have any bespoke? 3) On the Windows 10 machines to do the users have read/write access to c:\program files (x86)\pegasus\ and c:\programdata\pegasus\? -- Alan Bourke alanpbourke (at) fastmail (dot) fm On Tue, 1 May 2018, at 3:41 PM, Chris Davis wrote: > Either of you > > We are upgrading from Opera 2 to Opera 3, Server side no problem at all ... > > On the client side, we have 2 x Windows 7 Machines and 2 x Windows 10 > Machines ... > > The Windows 7 machines installed no problem at all, the Windows 10 > machines fail to create the icon on the desktop (despite no complaint > during clientsetup). Then when we log into Opera after the username and > password screen we get the error in the subject of this thread. > > ESET is the anti virus but the same version is on the Windows 7 PC's > > Permissions etc would be the same across both OS's. > > We have logged on and installed as Administrator but again no complaint > during install but not a working product. > > We suspect something isn't being installed purely based on the desktop > icon not appearing either. > > If we ignore the error we do get into the product and it does work. > > I know this isn't the Pegasus support forum so feel free to skip the question. > > What I think we might be looking for is a way for the installer to > either complain or log what it's failed to install and at least give us > somewhere to start! > > Thanks > > Chris. > > -Original Message- > From: ProfoxTechOn Behalf Of Paul Newton > Sent: Tuesday, 01 May 2018 13:17 > To: profoxt...@leafe.com > Subject: RE: Class Definition Not Found > > Or Alan Bourke > > -Original Message- > From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of Dave Crozier > Sent: 01 May 2018 12:50 > To: ProFox Email List > Subject: RE: Class Definition Not Found > > Chris, > Paul Newton from Pegasus is your man... > > Dave Crozier > Software Development Manager > Flexipol Packaging Ltd. > > > > --- > This communication and the information it contains is intended for the > person or organisation to whom it is addressed. Its contents are > confidential and may be protected in law. If you have received this e- > mail in error you must not copy, distribute or take any action in > reliance on it. Unauthorised use, copying or disclosure of any of it may > be unlawful. If you have received this message in error, please notify > us immediately by telephone or email. > > Flexipol Packaging Ltd. has taken every reasonable precaution to > minimise the risk of virus transmission through email and therefore any > files sent via e-mail will have been checked for known viruses. However, > you are advised to run your own virus check before opening any > attachments received as Flexipol Packaging Ltd will not in any event > accept any liability whatsoever once an e-mail and/or any attachment is > received. > > It is the responsibility of the recipient to ensure that they have > adequate virus protection. > > Flexipol Packaging Ltd. > Unit 14 Bentwood Road > Carrs > Industrial Estate > Haslingden > Rossendale > Lancashire > BB4 5HH > > Tel:01706-222792 > Fax: 01706-224683 > www.Flexipol.co.uk > --- > > Terms & Conditions: > > Notwithstanding delivery and the passing of risk in the goods, the > property in the goods shall not pass to the buyer until the seller > Flexipol Packaging Ltd. ("The Company") has received in cash or cleared > funds payment in full of the price of the goods and all other goods > agreed to be sold by the seller to the buyer for which payment is then > due. Until such time as the property in the goods passes to the buyer, > the buyer shall hold the goods as the seller's fiduciary agent and > bailee and keep the goods separate from those of the buyer and third > parties and properly stored protected and insured and identified as the > seller's property but shall be entitled to resell or use the goods in > the ordinary course of its business. Until such time as the property in > the goods passes to the buyer the seller shall be entitled at any time > > -Original Message- > From: ProFox On Behalf Of Chris Davis > Sent: 30 April 2018 16:34 > To: profox@leafe.com > Subject: RE: Class Definition Not Found > > The app in question Alan is Opera 3 > > -Original Message- > From: ProfoxTech On Behalf Of Alan Bourke > Sent: Monday, 30 April 2018 16:21 > To: profoxt...@leafe.com > Subject: Re: Class Definition Not Found > > On Mon, 30 Apr 2018, at 4:00 PM, Chris Davis wrote: > > So possibly if a VFP9 app was installed, and then a VFP7 app was > > installed after it some older files might get replaced
RE: Class Definition Not Found
True -Original Message- From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of Peter Cushing Sent: 02 May 2018 09:49 To: profox@leafe.com; profoxt...@leafe.com Subject: Re: Class Definition Not Found We also have Opera 3 and for support we initially go to our reseller, which is how I have always understood it to work. Usually if they cannot solve the problem they go to Pegasus, but I didn't think you could go directly to Pegasus. HTH Peter On 02/05/2018 08:51, Paul Newton wrote: > Chris > > I suggest you raise a ticket with the Pegasus Support team. They may at > least know if other people have encountered similar issues. > > Paul Newton > > -Original Message- > From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of Chris > Davis > Sent: 01 May 2018 15:42 > To: profox@leafe.com > Subject: RE: Class Definition Not Found > > Either of you > > We are upgrading from Opera 2 to Opera 3, Server side no problem at all ... > > On the client side, we have 2 x Windows 7 Machines and 2 x Windows 10 > Machines ... > > The Windows 7 machines installed no problem at all, the Windows 10 machines > fail to create the icon on the desktop (despite no complaint during > clientsetup). Then when we log into Opera after the username and password > screen we get the error in the subject of this thread. > > ESET is the anti virus but the same version is on the Windows 7 PC's > > Permissions etc would be the same across both OS's. > > We have logged on and installed as Administrator but again no complaint > during install but not a working product. > > We suspect something isn't being installed purely based on the desktop icon > not appearing either. > > If we ignore the error we do get into the product and it does work. > > I know this isn't the Pegasus support forum so feel free to skip the question. > > What I think we might be looking for is a way for the installer to either > complain or log what it's failed to install and at least give us somewhere to > start! > > Thanks > > Chris. > > -Original Message- > From: ProfoxTechOn Behalf Of Paul > Newton > Sent: Tuesday, 01 May 2018 13:17 > To: profoxt...@leafe.com > Subject: RE: Class Definition Not Found > > Or Alan Bourke > > -Original Message- > From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of Dave > Crozier > Sent: 01 May 2018 12:50 > To: ProFox Email List > Subject: RE: Class Definition Not Found > > Chris, > Paul Newton from Pegasus is your man... > > Dave Crozier > Software Development Manager > Flexipol Packaging Ltd. > > > > --- > This communication and the information it contains is intended for the person > or organisation to whom it is addressed. Its contents are confidential and > may be protected in law. If you have received this e-mail in error you must > not copy, distribute or take any action in reliance on it. Unauthorised use, > copying or disclosure of any of it may be unlawful. If you have received this > message in error, please notify us immediately by telephone or email. > > Flexipol Packaging Ltd. has taken every reasonable precaution to minimise the > risk of virus transmission through email and therefore any files sent via > e-mail will have been checked for known viruses. However, you are advised to > run your own virus check before opening any attachments received as Flexipol > Packaging Ltd will not in any event accept any liability whatsoever once an > e-mail and/or any attachment is received. > > It is the responsibility of the recipient to ensure that they have adequate > virus protection. > > Flexipol Packaging Ltd. > Unit 14 Bentwood Road > Carrs > Industrial Estate > Haslingden > Rossendale > Lancashire > BB4 5HH > > Tel:01706-222792 > Fax: 01706-224683 > www.Flexipol.co.uk > --- > > Terms & Conditions: > > Notwithstanding delivery and the passing of risk in the goods, the > property in the goods shall not pass to the buyer until the seller > Flexipol Packaging Ltd. ("The Company") has received in cash or > cleared funds payment in full of the price of the goods and all other > goods agreed to be sold by the seller to the buyer for which payment > is then due. Until such time as the property in the goods passes to > the buyer, the buyer shall hold the goods as the seller's fiduciary > agent and bailee and keep the goods separate from those of the buyer > and third parties and properly stored protected and insured and > identified as the seller's property but shall be entitled to resell or > use the goods in the ordinary course of its business. Until such time > as the property in the goods passes to the buyer the seller shall be > entitled at any time > > -Original Message- > From: ProFox On Behalf Of Chris Davis > Sent: 30 April 2018 16:34
Re: Class Definition Not Found
We also have Opera 3 and for support we initially go to our reseller, which is how I have always understood it to work. Usually if they cannot solve the problem they go to Pegasus, but I didn't think you could go directly to Pegasus. HTH Peter On 02/05/2018 08:51, Paul Newton wrote: Chris I suggest you raise a ticket with the Pegasus Support team. They may at least know if other people have encountered similar issues. Paul Newton -Original Message- From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of Chris Davis Sent: 01 May 2018 15:42 To: profox@leafe.com Subject: RE: Class Definition Not Found Either of you We are upgrading from Opera 2 to Opera 3, Server side no problem at all ... On the client side, we have 2 x Windows 7 Machines and 2 x Windows 10 Machines ... The Windows 7 machines installed no problem at all, the Windows 10 machines fail to create the icon on the desktop (despite no complaint during clientsetup). Then when we log into Opera after the username and password screen we get the error in the subject of this thread. ESET is the anti virus but the same version is on the Windows 7 PC's Permissions etc would be the same across both OS's. We have logged on and installed as Administrator but again no complaint during install but not a working product. We suspect something isn't being installed purely based on the desktop icon not appearing either. If we ignore the error we do get into the product and it does work. I know this isn't the Pegasus support forum so feel free to skip the question. What I think we might be looking for is a way for the installer to either complain or log what it's failed to install and at least give us somewhere to start! Thanks Chris. -Original Message- From: ProfoxTechOn Behalf Of Paul Newton Sent: Tuesday, 01 May 2018 13:17 To: profoxt...@leafe.com Subject: RE: Class Definition Not Found Or Alan Bourke -Original Message- From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of Dave Crozier Sent: 01 May 2018 12:50 To: ProFox Email List Subject: RE: Class Definition Not Found Chris, Paul Newton from Pegasus is your man... Dave Crozier Software Development Manager Flexipol Packaging Ltd. --- This communication and the information it contains is intended for the person or organisation to whom it is addressed. Its contents are confidential and may be protected in law. If you have received this e-mail in error you must not copy, distribute or take any action in reliance on it. Unauthorised use, copying or disclosure of any of it may be unlawful. If you have received this message in error, please notify us immediately by telephone or email. Flexipol Packaging Ltd. has taken every reasonable precaution to minimise the risk of virus transmission through email and therefore any files sent via e-mail will have been checked for known viruses. However, you are advised to run your own virus check before opening any attachments received as Flexipol Packaging Ltd will not in any event accept any liability whatsoever once an e-mail and/or any attachment is received. It is the responsibility of the recipient to ensure that they have adequate virus protection. Flexipol Packaging Ltd. Unit 14 Bentwood Road Carrs Industrial Estate Haslingden Rossendale Lancashire BB4 5HH Tel:01706-222792 Fax: 01706-224683 www.Flexipol.co.uk --- Terms & Conditions: Notwithstanding delivery and the passing of risk in the goods, the property in the goods shall not pass to the buyer until the seller Flexipol Packaging Ltd. ("The Company") has received in cash or cleared funds payment in full of the price of the goods and all other goods agreed to be sold by the seller to the buyer for which payment is then due. Until such time as the property in the goods passes to the buyer, the buyer shall hold the goods as the seller's fiduciary agent and bailee and keep the goods separate from those of the buyer and third parties and properly stored protected and insured and identified as the seller's property but shall be entitled to resell or use the goods in the ordinary course of its business. Until such time as the property in the goods passes to the buyer the seller shall be entitled at any time -Original Message- From: ProFox On Behalf Of Chris Davis Sent: 30 April 2018 16:34 To: profox@leafe.com Subject: RE: Class Definition Not Found The app in question Alan is Opera 3 -Original Message- From: ProfoxTech On Behalf Of Alan Bourke Sent: Monday, 30 April 2018 16:21 To: profoxt...@leafe.com Subject: Re: Class Definition Not Found On Mon, 30 Apr 2018, at 4:00 PM, Chris Davis wrote: So possibly if a VFP9 app was installed, and then a VFP7 app was installed after it
RE: Class Definition Not Found
Chris I suggest you raise a ticket with the Pegasus Support team. They may at least know if other people have encountered similar issues. Paul Newton -Original Message- From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of Chris Davis Sent: 01 May 2018 15:42 To: profox@leafe.com Subject: RE: Class Definition Not Found Either of you We are upgrading from Opera 2 to Opera 3, Server side no problem at all ... On the client side, we have 2 x Windows 7 Machines and 2 x Windows 10 Machines ... The Windows 7 machines installed no problem at all, the Windows 10 machines fail to create the icon on the desktop (despite no complaint during clientsetup). Then when we log into Opera after the username and password screen we get the error in the subject of this thread. ESET is the anti virus but the same version is on the Windows 7 PC's Permissions etc would be the same across both OS's. We have logged on and installed as Administrator but again no complaint during install but not a working product. We suspect something isn't being installed purely based on the desktop icon not appearing either. If we ignore the error we do get into the product and it does work. I know this isn't the Pegasus support forum so feel free to skip the question. What I think we might be looking for is a way for the installer to either complain or log what it's failed to install and at least give us somewhere to start! Thanks Chris. -Original Message- From: ProfoxTechOn Behalf Of Paul Newton Sent: Tuesday, 01 May 2018 13:17 To: profoxt...@leafe.com Subject: RE: Class Definition Not Found Or Alan Bourke -Original Message- From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of Dave Crozier Sent: 01 May 2018 12:50 To: ProFox Email List Subject: RE: Class Definition Not Found Chris, Paul Newton from Pegasus is your man... Dave Crozier Software Development Manager Flexipol Packaging Ltd. --- This communication and the information it contains is intended for the person or organisation to whom it is addressed. Its contents are confidential and may be protected in law. If you have received this e-mail in error you must not copy, distribute or take any action in reliance on it. Unauthorised use, copying or disclosure of any of it may be unlawful. If you have received this message in error, please notify us immediately by telephone or email. Flexipol Packaging Ltd. has taken every reasonable precaution to minimise the risk of virus transmission through email and therefore any files sent via e-mail will have been checked for known viruses. However, you are advised to run your own virus check before opening any attachments received as Flexipol Packaging Ltd will not in any event accept any liability whatsoever once an e-mail and/or any attachment is received. It is the responsibility of the recipient to ensure that they have adequate virus protection. Flexipol Packaging Ltd. Unit 14 Bentwood Road Carrs Industrial Estate Haslingden Rossendale Lancashire BB4 5HH Tel:01706-222792 Fax: 01706-224683 www.Flexipol.co.uk --- Terms & Conditions: Notwithstanding delivery and the passing of risk in the goods, the property in the goods shall not pass to the buyer until the seller Flexipol Packaging Ltd. ("The Company") has received in cash or cleared funds payment in full of the price of the goods and all other goods agreed to be sold by the seller to the buyer for which payment is then due. Until such time as the property in the goods passes to the buyer, the buyer shall hold the goods as the seller's fiduciary agent and bailee and keep the goods separate from those of the buyer and third parties and properly stored protected and insured and identified as the seller's property but shall be entitled to resell or use the goods in the ordinary course of its business. Until such time as the property in the goods passes to the buyer the seller shall be entitled at any time -Original Message- From: ProFox On Behalf Of Chris Davis Sent: 30 April 2018 16:34 To: profox@leafe.com Subject: RE: Class Definition Not Found The app in question Alan is Opera 3 -Original Message- From: ProfoxTech On Behalf Of Alan Bourke Sent: Monday, 30 April 2018 16:21 To: profoxt...@leafe.com Subject: Re: Class Definition Not Found On Mon, 30 Apr 2018, at 4:00 PM, Chris Davis wrote: > So possibly if a VFP9 app was installed, and then a VFP7 app was > installed after it some older files might get replaced which could > generate a class not found in the VFP9 app ? Sound reasonable? Don't think so because the VFP runtimes have different names - VFP9R.DLL, VFP8R.DLL and so on. More likely an EXE or APP built with VFP9 that you are trying to execute