| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Help! IN VB6 I'm trying to open a FoxPro .dbf with a memo field (.fpt file). I've tried every driver I can find... I always get the error "External table isn't in the expected format" when the database I open has an associated .fpt file. If the dbf has no memo file I'm fine. I've installed the lastest FoxPro ODBC drivers from VFPODBC.msi What am I missing? Thank you in advance, Tim |
|
#2
| |||
| |||
| "TCS" <TCS@discussions.microsoft.com> wrote in message news:2C7E14E0-D62C-45D1-AF60-70BB00ABB57D@microsoft.com... > Help! IN VB6 I'm trying to open a FoxPro .dbf with a memo field (.fpt file). > I've tried every driver I can find... I always get the error "External table > isn't in the expected format" when the database I open has an associated ..fpt > file. If the dbf has no memo file I'm fine. > > I've installed the lastest FoxPro ODBC drivers from VFPODBC.msi > > What am I missing? > > Thank you in advance, > > Tim > Not sure if this will help, as I stopped using ODBC/DAO with newer versions of FoxPro. I recommend using ADO/OLEDB: OLEDB http://www.microsoft.com/downloads/d...displaylang=en (Never use an ODBC with ADO, unless under duress. <g>) What version of FoxPro are you using? I'm sure you have covered all this, but ... <g> Make sure both files dbf and fpt are in the same folder. That they have the same name except for extension. Most of the dbf is in ascii format. So you can open the file read the memo field and then take a peek inside the fpt to make sure there is a descriptor for the one given. Have you tried packing the memo file? (This is pure supersition, but it worked for me once, so I always do if I get any problems. <g>) |
|
#3
| |||
| |||
| Ralph, Thank you for posting! I have tried the vfpoledb.exe with no success. To make sure that I wasn't dealing with a corrupt file, I created a simple two record, two field test DB in FoxPro with a memo field. All great ideas and we obviouly think alike in that regard! I can't even find an example piece of code anywhere on the net that deals with creating a connection to a FoxPro dbf that has an fpt file. Currently I use a product from successware to read the data and load a table. I'd love to have a bound table! Best, Tim "Ralph" wrote: > > "TCS" <TCS@discussions.microsoft.com> wrote in message > news:2C7E14E0-D62C-45D1-AF60-70BB00ABB57D@microsoft.com... > > Help! IN VB6 I'm trying to open a FoxPro .dbf with a memo field (.fpt > file). > > I've tried every driver I can find... I always get the error "External > table > > isn't in the expected format" when the database I open has an associated > ..fpt > > file. If the dbf has no memo file I'm fine. > > > > I've installed the lastest FoxPro ODBC drivers from VFPODBC.msi > > > > What am I missing? > > > > Thank you in advance, > > > > Tim > > > > Not sure if this will help, as I stopped using ODBC/DAO with newer versions > of FoxPro. I recommend using ADO/OLEDB: > OLEDB > http://www.microsoft.com/downloads/d...displaylang=en > (Never use an ODBC with ADO, unless under duress. <g>) > > What version of FoxPro are you using? > > I'm sure you have covered all this, but ... <g> > Make sure both files dbf and fpt are in the same folder. > That they have the same name except for extension. > Most of the dbf is in ascii format. So you can open the file read the memo > field and then take a peek inside the fpt to make sure there is a descriptor > for the one given. > Have you tried packing the memo file? (This is pure supersition, but it > worked for me once, so I always do if I get any problems. <g>) > > > |
|
#4
| |||
| |||
| "TCS" <TCS@discussions.microsoft.com> wrote in message news:0D280803-D5DB-4586-835B-0630F093E9B5@microsoft.com... > Ralph, > > Thank you for posting! I have tried the vfpoledb.exe with no success. > > To make sure that I wasn't dealing with a corrupt file, I created a simple > two record, two field test DB in FoxPro with a memo field. All great ideas > and we obviouly think alike in that regard! > > I can't even find an example piece of code anywhere on the net that deals > with creating a connection to a FoxPro dbf that has an fpt file. > > Currently I use a product from successware to read the data and load a > table. I'd love to have a bound table! > > Best, > > Tim > <snipped> Wish I could be of more help. I have had trouble with FoxPro Memo fields as well. A major problem has always been the specific version combination of the data access library and provider/driver used - it either magically works, or it magically fails. There isn't any real 'tinkering' you can do beyond mixing 'n matching. I have noticed that most 'official' documentation and articles usually suggest converting the dbf and memo file to something else for exporting to products like Excel or MSAccess. This suggest to me that even the 'experts' have issues with them outside of FoxPro. For working with FoxPro files (or any XBase files) from other environments or platforms, especially for any critical applications, I use CodeBase. http://www.codebase.com/products/ Unfortunately it is not cheap. -ralph |
|
#5
| |||
| |||
| "TCS" <TCS@discussions.microsoft.com> wrote in message news:0D280803-D5DB-4586-835B-0630F093E9B5@microsoft.com... > Ralph, > > Thank you for posting! I have tried the vfpoledb.exe with no success. > > To make sure that I wasn't dealing with a corrupt file, I created a simple > two record, two field test DB in FoxPro with a memo field. All great ideas > and we obviouly think alike in that regard! > > I can't even find an example piece of code anywhere on the net that deals > with creating a connection to a FoxPro dbf that has an fpt file. > > Currently I use a product from successware to read the data and load a > table. I'd love to have a bound table! > > Best, > Forgot to mention... I don't know what 'successware' is doing, But you might take a look at "Data Aware Classes". This is a method where you create a class that acts like a datasource for any OLEDB (ado) control. Thus you could move your 3rd party code into the class and then bound to any control just as if you were using ADO. -ralph |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.