Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG in SQLExecute() in a COM
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00814269
Message ID:
00814278
Views:
9
Try to supress ODBC error dialog also and use AERROR() to retrieve the error info.
= (SQLSETPROP(0,'DispWarnings',.F.)  && No error dialog
>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
>	&& CD\Your_Dir
>	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' )      && BUG HERE GUI presence
>	
>	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
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform