Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ODBC error and AERROR()
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00052673
Message ID:
00052747
Views:
32
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform