Hello All,
When i run these lines of codes
CLOSE ALL
CLEAR ALL
SQLDISCONNECT(0)
gcOdbcConnect="cOdbc"
STORE SQLCONNECT(gcOdbcConnect) TO gnOdbcHandle
SQLEXEC(gnOdbcHandle,"Select * from kpnawgrp where ISNULL(opzegdatum) or EMPTY(opzegdatum) or opzegdatum > DATE()","vLedenTotaalStatistiek")
*
SELECT * FROM vLedenTotaalStatistiek WHERE GROEPSCODE = "TEST" INTO CURSOR AANTALNIETOPZEGGERS
STORE RECCOUNT("AANTALNIETOPZEGGERS") TO nRecords
If I Run this program 25 times I get 5 different results
I think it's because the first cursor is created with a sqlexec (odbc) command... I know that this is just a test because I can put the "GROEPSCODE = "TEST"" in the first
select statement but It still is a verry strange thing because when I replace the sqlexec with native vfp it works like a dream
So to cut it short : When you do a Select statement on a cursor wich is created with sqlexec you get varying results.
BTW : I runs on a standalone database so no other users And it's in Foxpro 7.0
When i run these lines of codes
CLOSE ALL
CLEAR ALL
SQLDISCONNECT(0)
gcOdbcConnect="cOdbc"
STORE SQLCONNECT(gcOdbcConnect) TO gnOdbcHandle
SQLEXEC(gnOdbcHandle,"Select * from kpnawgrp where ISNULL(opzegdatum) or EMPTY(opzegdatum) or opzegdatum > DATE()","vLedenTotaalStatistiek")
*
SELECT * FROM vLedenTotaalStatistiek WHERE GROEPSCODE = "TEST" INTO CURSOR AANTALNIETOPZEGGERS
STORE RECCOUNT("AANTALNIETOPZEGGERS") TO nRecords
If I Run this program 25 times I get 5 different results
I think it's because the first cursor is created with a sqlexec (odbc) command... I know that this is just a test because I can put the "GROEPSCODE = "TEST"" in the first
select statement but It still is a verry strange thing because when I replace the sqlexec with native vfp it works like a dream
So to cut it short : When you do a Select statement on a cursor wich is created with sqlexec you get varying results.
BTW : I runs on a standalone database so no other users And it's in Foxpro 7.0