Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

received data are not indexing

Status
Not open for further replies.

falconsight

Programmer
Apr 18, 2007
24
SV
I'm receiving data from another application, made with VB6. The records are written in free DBF tables (created with foxpro 26), thru ODBC.
But, when we made the report queries -using another VFP-made app - not all the new data, show. If we reindex the CDX are updated, and the data displays.
Is there any known issue with the dbase ODBC or the VFP ODBC?
What do you recommend: use the (default) dbase ODBC driver o install VFP ODBC driver on the equipments that run the reporting app?

THanks in advance
 
dbase ODBC might not index as expected, if the main app is a VFP one, then use the VFP ODBC driver.

If your indexes are rather IDX files than CDX this is not an ODBC problem, neither or dbase or VFP ODBC, but by design: Even within native VFP DBF + IDX usage, you'll need to open IDX index files manually to add to them while adding or updating data in the DBF file, if these files are not opened manuelly they don't get any changes.

I'd recommend using VFP ODBC even on FP26 generated dbase compatible DBFs. It's VB and VFP accessing that file, not dbase, is it? Then VFP ODBC seems the better choice, doesn't it?

Bye, Olaf.
 
Luckyly, I'm using free tables with CDX.
I tried the dbase driver approach just because it is the dafualt in a Windows installation.
Thanks for clearing my doubts... I'd recommend a VFP ODBC driver to the client.

Thanks
 
I´m throughly testing the app, and rewriten all the dbase or DAO commands to VFP commands to send thru ODBC. I'm using this conection string:

Code:
Driver={Microsoft Visual FoxPro Driver};SourceType=DBF;SourceDB=f:\data\basexport ;Exclusive=No

Is there something wrong?
The data is inserted from VB, but is only available in some reports after a reindexing.
 
The Driver name is okay, but does not tell which version you're using.

Are you sure the indexes used by the reports aren't IDX indexe files? Because these could have that behavior. They are only updated when explicitly opened additional to opening the DBF files by a SET INDEX. If not the IDX stays as is, while new data is written to the DBF.

Also a CDX might not be the main CDX of a DBF, only if it has the same name, eg table.dbf and table.cdx are opened in sync, any.cdx would not be opened with table.dbf but could contain additional indexes for table.dbf.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top