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!

Open tables with Foxpro created with Clipper 5.0

Status
Not open for further replies.

horstibaby

Programmer
May 15, 2007
9
0
0
DE
Good afternoon,

has anybody an idea why Visual Foxpro 9.0 is not able to
open a table that has been created with Clipper 5.0 using the DBCREATE()-function ?

Many thanks in advance

Horstibaby
 
As far as I can tell VFP 9 can open tables created by Clipper - so long as they don't have memo fields, as these would not easily be recognised.

I just tried one and it worked ok, no indexes and memos and it's fine.

What is the structure of the table you are opening?

Regards

Griff
Keep [Smile]ing
 
Hello Griff,
thanks a lot but my problem has not been solved yet.
I should first like to inform you, that we create the dbf
with the dbcreate() function, such as dbcreate(filename,filstructure).
The clipper created tables do not have memo fields, but
they do have an index !! Could this be the problem ?

Or can it be, that I only need to specify any properties in VFP, such as dbase-compatibility, which can be achieved clicking a checkbox in VFP environment. ( which I did )

Thanks again for your help

Horstibaby
 
The index file may/will cause problems, it will depend on it's format (.ntx or .cdx [if you are using a driver for .cdx)

Another possible gotcha is whether the table is open already, and your VFP code is opening it exclusively...

I didn't need to do any tick boxes in VFP to enable compatibility.

Regards

Griff
Keep [Smile]ing
 
The Index-File is a MDX file. I do not have any idea how to change the index driver, I only installed VFP on my PC, so it should automatically install the idx or cdx index driver.

Tables generated with dbase 5.0 that have mdx indexes can easily be opened with VFP.
The table is not open, VFP simply reclaims 'this is not a table ' when I try to open it, even SQL-SELECT commands reclaim the same error.

Greetings
Horstibaby
 
I'm not familiar with MDX index files, it's the one that DBase IV / V would have created I guess.

Can you open the table with Clipper? or DBU?



Regards

Griff
Keep [Smile]ing
 
I wonder if in order to link the .MDX file to the .DBF, dBase used a byte in the table header - this would render the file 'not a table' to VFP?

VFP does something similar for .CDX files...

Regards

Griff
Keep [Smile]ing
 
Clipper has a RDD for DBase IV/V called DBFMDX, but it is not very much used, and I'm not sure about compatibility with other DBase IV/V aware apps.
Have used it in one special app that had to share data with DBase IV, but that was over 10 years ago...

Assuming Clipper 5.2 (or later), if you link in DBFMDX.LIB (also put REQUEST DBFMDX on a separate line somewhere in your source, not inside a function or procedure), you can use the syntax DBCREATE(filename,filstructure,"DBFMDX") where "DBFMDX" is the optional 'VIA' parameter for specifying the database driver to use.
It is properly documented in the Norton Guides that come with a normal Clipper installation.

HTH
TonHu
 
Hello Griff hello TonHU,

Griff, I also think the header of the clipper DBF contains information which VFP expects at another position in the header. VFP does so with VFP dbfs and its .cdxs.

TonHu, will try out your response as soon as possible, I also thought there are more parameters using the DBCREATE()-function than filename and structure but I am not familiar with those.

Nevertheless, thanx a lot to both of you

Horstibaby
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top