Rick,
As I mentioned it works fine!!! So syntax not a problem. Problem is that somehow / sometime it generates SET FMTONLY On EXEC MySP SET FMTONLY OFF
I had this situation today but it was nothing to do with a stored procedure.
Do you ever deal with different databases within the same application? In my case I think it was related to switching the db owner at a not cool point. The driver was not happy and threw an error âobject not foundâ type of error back. Looking at the sql profiler I saw the exact same FMTONLY thing just after it attempted my SELECT statement.
I fixed the code to not switch the db owner and everyone is happy again.
I have checked different scenarios and realized that Clarion (?? Or sql) generate this surrounding statements only if slq object doesnât exist . So in my case somehow MySP stored procedure looks like doesnât exist.
I am looking for the reason why⌠Because logic in the clarion code is very difficult and probably we have some issue like closing tables or disconnection etcâŚ
Maybe the reason it seems to not exist is a permissions issue.
Also, what DataType is the first field in the table MyTable ? Is it numeric so that no CW type conversion is happening as you are returning -1
What is the definition of myTable ?
In my case I was using s non-threaded variable for the Driver/Owner string. Changing these to be threaded, as per the documentation, caused my problem to go away.