Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Enum. ODBCs available
Message
De
13/06/2007 11:40:40
 
 
À
13/06/2007 10:15:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
MySQL
Divers
Thread ID:
01232563
Message ID:
01232636
Vues:
15
>this should do the trick ..
>
>DECLARE SHORT SQLDrivers IN odbc32;
>    INTEGER   EnvironmentHandle,;
>    INTEGER   Direction,;
>    STRING  @ DriverDescription,;
>    INTEGER   BufferLength1,;
>    INTEGER @ DescriptionLengthPtr,;
>    INTEGER   DriverAttributes,;
>    INTEGER   BufferLength2,;
>    INTEGER   AttributesLengthPtr
>
>
>LOCAL lnRet, lnEnvHandle, lcDriver, lnBufferLen, lnCount, laDrivers[1]
>lnEnvHandle = VAL(SYS(3053))
>lnBufferLen = 1024
>lcDriver = REPLICATE(CHR(0),lnBufferLen)
>lnRet = SQLDrivers(lnEnvHandle, 2, @lcDriver, lnBufferLen, @lnBufferLen, 0, 0, 0)
>
>lnCount = 1
>DO WHILE lnRet = 0
>	DIMENSION laDrivers[lnCount]
>	laDrivers[lnCount] = LEFT(lcDriver,lnBufferLen)
>	lnCount = lnCount + 1
>	lnBufferLen = 1024
>	lcDriver = REPLICATE(CHR(0),lnBufferLen)
>	lnRet = SQLDrivers(lnEnvHandle, 1, @lcDriver, lnBufferLen, @lnBufferLen, 0, 0, 0)
>ENDDO
>
>?'MySql ODBC driver is ' + IIF(ASCAN(laDrivers,'MySQL',1,-1,1,1+4+8) > 0,'installed','not installed')
>
Hi Christian..

wow, seems great that solution.. Here at my PC (with XP) works fine.. What about in dif. systems (as Vista), did you already tried ?

thanks..

Claudio
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform