Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connection handle error
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01519893
Message ID:
01519923
Vues:
31
>>>>>Check WHY you get error with AERROR():
>>>>>
>>>>>TEXT TO lcConnectioString NOSHOW PRETEXT 15
>>>>>     DSN=dpsal;UID=Josephine;APP=Microsoft Visual FoxPro;WSID=HP6PQ8;DATABASE=RemoteAccess;
>>>>>     Network=DBMSLPCN;Address=HP6PQ8\SQLEXPRESS,1433;
>>>>>     Trusted_Connection=Yes;Regional=Yes;UseProcForPrepare=0
>>>>>ENDTEXT
>>>>>
>>>>>Handle = SQLSTRINGCONNECT(lcConnectioString)
>>>>>IF Handle < 0
>>>>>   AERROR(laError)
>>>>>   MessageBox(laError[1,2])
>>>>>ENDIF
>>>>>
>>>>
>>>>when i click the button nothing happens...ill figure something out thanks
>>>
>>>If you didn't get any error message than your connectiot is OK.
>>
>>You can add ELSE case with this code
>>
>>IF Handle < 0 
>>  ...
>>
>>ELSE
>>   =messagebox('The connection handle is valid and = ' + transform(Handle))
>>ENDIF
>
>
>Why?
>If the connection is valid I'll continue with the code :o)

I know, but for debugging purpose it may help. Sure, we want this code removed later on.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform