STORE SQLCONNECT('vitalscan', 'sa', 'Wilson123') TO gnConnHandle IF gnConnHandle <= 0 = MESSAGEBOX('Cannot make connection', 16, 'SQL Connect Error') ELSE = MESSAGEBOX('Connection made', 48, 'SQL Connect Message') * lnRetVal = SQLEXEC(gnConnHandle, [EXEC FindInvoice '03/12/2007', '03/12/2007']) lnRetVal = SQLEXEC(gnConnHandle, [EXEC FindInvoice '03/12/2007', '03/12/2007'],"ret_cursor") if lnRetVal>=1 && a SP can return more than one recordset relying on how many Select statements without Into.The returned result -cursor names will be Ret_cursor,Ret_cursor1,Ret_cursor2,...,Ret_cursorN select Ret_cursor brow endif =SQLCANCEL(gnConnHandle) = SQLDISCONNECT(gnConnHandle) ENDIF