Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLEXEC returning -1 when creating cursor
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
SQLEXEC returning -1 when creating cursor
Miscellaneous
Thread ID:
00792371
Message ID:
00792371
Views:
43
I am running the following statement to create a SPT cursor. The first 2 cursors are created fine, it when I get to third cursor (ITCCursor) I keep getting -1 on my lnRes:
UDFCursor = SYS(2015) && UDFields Cursor
IF USED(UDFCursor)
	TABLEREVERT(.t.,UDFCursor)
ENDIF
lnRes = SQLEXEC( thisform.nCon, lcSql, "UDFCursor" )
IF lnRes > 0
	q = RECCOUNT()
	IF q > 0 && record available
		SELECT UDFCursor
......
this one is ok
lcSql = " Select *" ;
+ "  FROM ITCRecordCount" ;
RCTCursor = SYS(2015) && UDFields Cursor
IF USED(RCTCursor)
	TABLEREVERT(.t.,RCTCursor)
ENDIF
lnRes = SQLEXEC( thisform.nCon, lcSql, "RCTCursor" )
IF lnRes > 0
This one is okay also, but next one:
lcSql = " Select * FROM ITCFields"
ITCCursor = SYS(2015)
IF USED(ITCCursor)
	TABLEREVERT(.t.,ITCCursor)
ENDIF
lnRes = SQLEXEC( thisform.nCon, lcSql, "ITCCursor" )
SELECT ITCCursor
This one is not ok. I'm not doing anything different here than the other cursor creations. I seem to return -1 on lnRes. thisform.nCon is okay also. Is their a limitation to creating cursors? The table name (ITCFields) is correct on backend. Any Ideas?

Thanks
Nick Patel
Next
Reply
Map
View

Click here to load this message in the networking platform