General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
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!!
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only