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:[email protected]] On Behalf Of Frank
Cazabon
Sent: Sunday, April 29, 2018 4:26 PM
To: [email protected]
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.Grrrrrr!
>
>   
>
> Paul
>
>   
>
>
>
> --- StripMime Report -- processed MIME parts ---
> multipart/alternative
>    text/plain (text body -- kept)
>    text/html
> ---
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
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/[email protected]
** 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.

Reply via email to