Thanks Serg, but it's not an error. The same code run through a class-less PRG runs fine. It's not an error, but an alert from VFP that data is comming. I'm sure it's a legacy from the PII 233 days.
__Stephen
>Try to supress ODBC error dialog also and use AERROR() to retrieve the error info.
= (SQLSETPROP(0,'DispWarnings',.F.)
>
>
>>VFP7, XP Pro or Server2003.
>>Code below with GUI bug:
>
>>define class myclass as custom OLEPUBLIC
>>
>>FUNCTION INIT
>>
>>
>> SET RESOURCE OFF
>>*--and all other "sets" here
>>SET REPROCESS TO 2 SECONDS
>>SYS(2335,0)
>>SQLSetProp(0,"DispLogin",3)
>>
>>ENDFUNC
>>
>>
>>Function MakeData
>> Parameters tcmake
>> Local lcmake
>>
>> If PCOUNT( ) >0
>> lcmake = tcmake
>> lcmake = Alltrim(lcmake)
>> Else
>> lcmake =''
>> Endif
>> Set Safety Off
>> Close Data
>> Clear
>>
>> lcConStr = "DRIVER=SQL Server;SERVER=(local);TrustedConnection=Yes "
>>
>> lhX = Sqlstringconnect( lcConStr )
>> str1=" SELECT * from YOUR_TABLE"
>> lnRet = SQLEXEC( lhX, str1,'lcret' )
>>
>> Close Databases
>> Close Data
>>ENDFUNC
>>ENDDEFINE
>
>>
>>lnRet = SQLEXEC( lhX, str1,'lcret' ) gets a GUI error! Sorry but I can't seem to see a switch via SqlSetProp() to disable it!
>>
>>Anybody confirm this please?
>>
>>If you know of a workaround, even better :)
>>
>>This is called from ASPNET to make VFP data for another company. Yes ASPNET has rights on the server in the directory that this is CD'ed to.
>>
>>TIA
>>
>>__Stephen