Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ODBC error and AERROR()
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00052673
Message ID:
00052747
Vues:
37
Sorry about that hit the wrong key


STORE SQLCONNECT('DSNNAME','','') TO gnConnHandle
IF gnConnHandle <= 0
= MESSAGEBOX('Cannot make connection', 16, 'SQL Connect Error')
ELSE
= MESSAGEBOX('Connection made', 48, 'SQL Connect Message')
ck=SQLEXEC(gnConnHandle,mysqlstatement,"myquery")
if ck=-1
= AERROR(aErrorArray) && Data from most recent error
? 'The error provided the following information' && Display message
FOR n = 1 TO 7 && Display all elements of the array
? aErrorArray(n)
ENDFOR
else
process data
endif
ENDIF
=SQLDISCONNECT(gnConnHandle)

Of course you can put the error returned in a message box but this works for us.
could it be because you have already defined the laerror size

It's Time to get a gun.

That's what I've been thinkin.

I think I can afford one, If I do a little less Drinkin.

www.TrueGeeks.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform