Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select statement with ODBC connection not behaving...
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Select statement with ODBC connection not behaving...
Miscellaneous
Thread ID:
00622789
Message ID:
00622789
Views:
65
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
Map
View

Click here to load this message in the networking platform