Discussion:
Excel 2007 database connection to Visual Foxpro 9
(too old to reply)
Hii Sing Chung
2008-12-16 12:52:49 UTC
Permalink
Hi,
I was trying to use Excel 2007 to retrieve data from Foxpro table. Most of
the table have no problem providing the data, there is one database called
invoice.dbc, and only 2 of its tables called invoice.dbf and
invoice_item.dbf I couldn't retrieve any data. I used the "From data
connection wizard" in Excel 2007 to create the connection. The resulting
error is:

"Data could not be retrieved from the database. Check the database server or
contact your database administrator. Make sure the external database is
available, and then try the operation again."

Any idea why only these tables refused to let me read from Excel?
Dan Freeman
2008-12-16 16:18:50 UTC
Permalink
There are many things that could go wrong here.

How are you connecting? ODBC? OLEDB?

If ODBC, the driver has not been updated since VFP6 and the database may be
using features that did not exist then. Likewise if you have an outdated
OLEDB provider.

If someone has any of those files open exclusively in VFP you'll be locked
out either way.

Without knowing more about exactly what choices you made in that Wizard,
nobody can help you definitively.

Dan
Post by Hii Sing Chung
Hi,
I was trying to use Excel 2007 to retrieve data from Foxpro table.
Most of the table have no problem providing the data, there is one
database called invoice.dbc, and only 2 of its tables called
invoice.dbf and invoice_item.dbf I couldn't retrieve any data. I used
the "From data connection wizard" in Excel 2007 to create the
"Data could not be retrieved from the database. Check the database
server or contact your database administrator. Make sure the external
database is available, and then try the operation again."
Any idea why only these tables refused to let me read from Excel?
Hii Sing Chung
2008-12-16 23:13:40 UTC
Permalink
In Excel 2007, Data > From other sources > In the "Data Connection Wizard"
choose "Other/Advanced" > choose "Microsoft OLE DB provider for Foxpro",
after that select the database name, then it will prompt the list of tables
to let you select. In the invoice.dbc database, other tables I selected are
OK, only the invoice.dbf and invoice_item.dbf gave the error. In term of
choice to make in the wizard, that is the only one for Visual Foxpro.
Post by Dan Freeman
There are many things that could go wrong here.
How are you connecting? ODBC? OLEDB?
If ODBC, the driver has not been updated since VFP6 and the database may
be using features that did not exist then. Likewise if you have an
outdated OLEDB provider.
If someone has any of those files open exclusively in VFP you'll be locked
out either way.
Without knowing more about exactly what choices you made in that Wizard,
nobody can help you definitively.
Dan
Post by Hii Sing Chung
Hi,
I was trying to use Excel 2007 to retrieve data from Foxpro table.
Most of the table have no problem providing the data, there is one
database called invoice.dbc, and only 2 of its tables called
invoice.dbf and invoice_item.dbf I couldn't retrieve any data. I used
the "From data connection wizard" in Excel 2007 to create the
"Data could not be retrieved from the database. Check the database
server or contact your database administrator. Make sure the external
database is available, and then try the operation again."
Any idea why only these tables refused to let me read from Excel?
Hii Sing Chung
2008-12-18 14:06:01 UTC
Permalink
I googled, it is quite clear that this type of error is very common with
file-based databases, but sadlly I have not seen anybody providing any
solution, no clue even.
Post by Dan Freeman
There are many things that could go wrong here.
How are you connecting? ODBC? OLEDB?
If ODBC, the driver has not been updated since VFP6 and the database may
be using features that did not exist then. Likewise if you have an
outdated OLEDB provider.
If someone has any of those files open exclusively in VFP you'll be locked
out either way.
Without knowing more about exactly what choices you made in that Wizard,
nobody can help you definitively.
Dan
Post by Hii Sing Chung
Hi,
I was trying to use Excel 2007 to retrieve data from Foxpro table.
Most of the table have no problem providing the data, there is one
database called invoice.dbc, and only 2 of its tables called
invoice.dbf and invoice_item.dbf I couldn't retrieve any data. I used
the "From data connection wizard" in Excel 2007 to create the
"Data could not be retrieved from the database. Check the database
server or contact your database administrator. Make sure the external
database is available, and then try the operation again."
Any idea why only these tables refused to let me read from Excel?
swdev2
2008-12-26 22:32:37 UTC
Permalink
copy your invoice tables to type fox2x , then excel can read them either via
odbc or natively (using file | open) ..

--
===================
William Sanders / EFG VFP / mySql / MS-SQL
www.efgroup.net/vfpwebhosting
www.terrafox.net www.viasqlserver.net
Post by Hii Sing Chung
Hi,
I was trying to use Excel 2007 to retrieve data from Foxpro table. Most of
the table have no problem providing the data, there is one database called
invoice.dbc, and only 2 of its tables called invoice.dbf and
invoice_item.dbf I couldn't retrieve any data. I used the "From data
connection wizard" in Excel 2007 to create the connection. The resulting
"Data could not be retrieved from the database. Check the database server or
contact your database administrator. Make sure the external database is
available, and then try the operation again."
Any idea why only these tables refused to let me read from Excel?
Mark
2008-12-30 14:31:02 UTC
Permalink
Hi Hii,
Have a look at COPY TO ...
hth
Mark
Post by Hii Sing Chung
Hi,
I was trying to use Excel 2007 to retrieve data from Foxpro table. Most of
the table have no problem providing the data, there is one database called
invoice.dbc, and only 2 of its tables called invoice.dbf and
invoice_item.dbf I couldn't retrieve any data. I used the "From data
connection wizard" in Excel 2007 to create the connection. The resulting
"Data could not be retrieved from the database. Check the database server or
contact your database administrator. Make sure the external database is
available, and then try the operation again."
Any idea why only these tables refused to let me read from Excel?
Loading...