Trying to do the SQL Select command - the fields in the where-clause cause VFP to pop up a window for me to identify a new database but I'm strictly trying to use the QuickBooks database that I've already made connection to. If I don't use a where clause I can connect, select, and loop/browse on the data successfully. So I think I just need help on the syntax of how to reference data fields from the QuickBooks file in the where-clause. Here are the details.
So first I connect to the QuickBooks database...no problem
STORE SQLCONNECT('QBdatabase','account','pass') TO xyz
Now, if I just say "get all records from table InvoiceLinkedTxn" I have no problem - and can Scan through the records or review them through a browseable table.
"select * from InvoiceLinkedTxn" works just fine
I can also order the records
"select * from InvoiceLinkedTxn ORDER BY Salesrepreffullname, Txndate" works!
My problem is that when I want to do a "where clause" it is thinking that the fields I've referenced are from another VFP database and so VFP & Windows opens up a window for me to identify a VFP dbf file.
"select * from InvoiceLinkedTxn where Salesrepreffullname = 'PS' ORDER BY Refnumber"
This will cause the "find the .dbf file" window to open up.
I'm guessing that I have to more fully qualify Salesrepreffullname in the where-clause ....something like xyz.Salesrepreffullname or m.xyz.Salesrepreffullname or InvoiceLInked.Salesrepreffullname so that it knows the where clause fields apply to the QuickBooks database as it does for the mentioned Order By fields.
|