Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLEXEC returning -1 when creating cursor
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
SQLEXEC returning -1 when creating cursor
Divers
Thread ID:
00792371
Message ID:
00792371
Vues:
44
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform