Hi Greg if SQLEXEC returns -1 that means that sql server has return an error you can then use AERROR to get that error information.
>I'm sure that this question has been asked before:
>
>How do I return an error number and/or message from SQL Server when a command fails in a SQLEXEC command issued in VFP6?
>
>Thanks for any info.
Alexandre Palma
Senior Application Architect