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
Title:
BUG in SQLExecute() in a COM
Miscellaneous
Thread ID:
00814269
Message ID:
00814269
Views:
42
VFP7, XP Pro or Server2003.
Code below with GUI bug:
>> code starts here
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
>> Code ends here

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
Next
Reply
Map
View

Click here to load this message in the networking platform