Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select statement with ODBC connection not behaving...
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Select statement with ODBC connection not behaving...
Divers
Thread ID:
00622789
Message ID:
00622789
Vues:
62
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
Fil
Voir

Click here to load this message in the networking platform