>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
Boy is my face red! All I needed was the "=" before AERROR(laerror). Defining laerror before doesn't matter. The array is re-dimensioned with the AERROR() function.
Thanks for your help. Sometimes I just miss the obvious!
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only