Neil Toulouse
Programmer
Hi there!
I have hit a snag! This could quite easily be my misunderstanding of how the command works, but I will run it by you.
Basically you run a T-SQL command, eg:
If all has gone OK lnError has a value of 1 and MyCursor will be created.
On the other hand, if there is an issue with the SQL command, lnError returns -1 and MyCursor does not get created.
As a -1 error is somewhat meaningless, to get a more meaningful error message, you submit the command:
...before issuing the SQLEXEC() statement. To swith off this error messaging you simply then issue the command:
Have I understood this process correctly?
My problem is I CANNOT switch off the error messaging!! I have trawled the code for the DispWarnings being .T. but to no avail. Thinking it may be just stuck on in the session I was in I rebooted my machine and restarted SQL Server, but still the error messages are being displayed.
Is there another way that may have been used but I have over looked?
BTW, Running VFP8 to SQL Server 2005 Express via Native Client ODBC.
TIA
Neil
I like work. It fascinates me. I can sit and look at it for hours...
I have hit a snag! This could quite easily be my misunderstanding of how the command works, but I will run it by you.
Basically you run a T-SQL command, eg:
Code:
lnError = SQLEXEC( lnHandle, "SELECT * FROM MyTable WHERE 0=1", "MyCursor")
If all has gone OK lnError has a value of 1 and MyCursor will be created.
On the other hand, if there is an issue with the SQL command, lnError returns -1 and MyCursor does not get created.
As a -1 error is somewhat meaningless, to get a more meaningful error message, you submit the command:
Code:
=SQLSETPROP(lnHandle, "DispWarnings", .T.)
...before issuing the SQLEXEC() statement. To swith off this error messaging you simply then issue the command:
Code:
=SQLSETPROP(lnHandle, "DispWarnings", .F.)
Have I understood this process correctly?
My problem is I CANNOT switch off the error messaging!! I have trawled the code for the DispWarnings being .T. but to no avail. Thinking it may be just stuck on in the session I was in I rebooted my machine and restarted SQL Server, but still the error messages are being displayed.
Is there another way that may have been used but I have over looked?
BTW, Running VFP8 to SQL Server 2005 Express via Native Client ODBC.
TIA
Neil
I like work. It fascinates me. I can sit and look at it for hours...