Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Select statement with ODBC connection not behaving...
I am having problems with an odbc connection and the results that come back from my select statement.
**Here is the code I call from the CLICK event of a button on a form.
cWhereClause= ' WHERE (UPPER(ALLTRIM(LEFT(client_lname,'+ ;
ALLTRIM(STR(nLength))+'))) = '+ "'"+cConsumerName+"'" +' AND !DELETED())'
oDataConnection.SelectLastName(cWhereClause) && Call the method in my class
*** Code in my visual class
PARAM cWhereClause
nConnectionHandle = THIS.CONNECT('ConnectionName',' ',' ')
theResultofTheQuery = THIS.execute(nConnectionHandle, ;
'SELECT client_lname,client_fname,client_mname,client_ssn,pkconsumer ' + ;
' FROM CONSUMER ORDER BY client_lname,client_fname,client_mname ' +cWhereClause,'TMPCursor')
MY PROBLEM is that any record that is deleted, still shows up in my TMPCursor.
ALSO, anytime I add a new record, it does not show up.
Both of the above problems are solved by quitting the program and coming right back in.
I populate a grid with the data retrieved and I set the recordsource of the grid to the TMPCursor each time the select statement is executed.
Any ideas??
Thanks!!
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement