>>>If I create a remote view visually, it will allways run fine. When trying to use SQL pass-through in a program, it runs whenever it feels like. After running the program a few times for testing different queries, it stops retrieving data. It has to be one of those beginner caveats.
>>>
>>>Thanks for any help.
>>
>>What do you mean by "...stops retrieving data"?
>>
>>What is the value returned by SQLEXEC(). If you're getting an error (SQLEXEC() returns -1) what is the error?
>>
>>Is there data for the non-working query to return?
>>
>>-Mike
>
>Mike,
>
>I already straightened this up, and the problem solving approach that had to be used is the one you are suggesting. I started checking the return from sqlexec() and found out that there was a problem with my sql sentence. Like I suspected, it was a begginer's trap. Thanks anyway.
>
>Juan
Try sending SQLSETPROP(nConnHandle,"DispWarnings",.T.) prior to your SPT SQLEXEC line. This will enable the error messaging.
Bob Tracy
Never engage in a battle of wits if you're only half armed.