Discussion:
dBase 5.7 tables in dbc
(too old to reply)
mb
2004-08-12 15:23:21 UTC
Permalink
I can create a BDE alias for Foxpro tables without conversion but I am
having trouble using dBase 5 tables in a Foxpro dbc. Is this possible? I
am starting to convert a large dBase 5.7 app to Foxpro 9 but can only do it
gradually as my Foxpro expertise increases. I need to use the live dBase
data so it needs not to be converted to Foxpro for the time being.

Any advice please?

Malcolm Brown
Lee Mitchell
2004-08-12 18:02:09 UTC
Permalink
Hi Malcolm:

I don not have any dBase 5.7 tables to test this question. However, when
VFP adds a legacy style table to a DBC, it must alter the table header.
Therefore, adding these tables to a DBC entails converting them to VFP
format and thus altering the header record. Once VFP alters the table
structure, I doubt dBase 5 can still open the tables. However, you can
issue a COPY YO TYPE FOX2x to convert any VFP table back into FoxPro 2.x
format.

I hope this helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

*-- VFP9 Public Beta Now Available!! --*
Download the VFP9 beta here: http://msdn.microsoft.com/vfoxpro/

*-- VFP8 HAS ARRIVED!! --*
Read about all the new features of VFP8 here:
http://www.universalthread.com/VisualFoxPro/News/VFP8Release.asp
Purchase VFP8 here:
http://shop.microsoft.com/Referral/Productinfo.asp?siteID=11518

Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/default.aspx?id=fh;[ln];lifeprodv
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retired Sept. 30th, 2003
Post by mb
I can create a BDE alias for Foxpro tables without conversion but I am
having trouble using dBase 5 tables in a Foxpro dbc. Is this possible? I
am starting to convert a large dBase 5.7 app to Foxpro 9 but can only do it
gradually as my Foxpro expertise increases. I need to use the live dBase
data so it needs not to be converted to Foxpro for the time being.
Any advice please?
Malcolm Brown
mb
2004-08-13 14:14:35 UTC
Permalink
Post by Lee Mitchell
I don not have any dBase 5.7 tables to test this question. However, when
VFP adds a legacy style table to a DBC, it must alter the table header.
Therefore, adding these tables to a DBC entails converting them to VFP
format and thus altering the header record. Once VFP alters the table
structure, I doubt dBase 5 can still open the tables. However, you can
issue a COPY YO TYPE FOX2x to convert any VFP table back into FoxPro 2.x
format.
Right, let's try from another angle. This is what I am trying to emulate:-

Aliases can be set up for any database format for which the BDE/ODBC has a
driver set up. So I can have alias "accounts" which is dbase, alias "local"
which is Foxpro, alias "shop" which is MSSQL etc. Then in a prg, form,
report etc I can have:

open database accounts
open database shop
select 1
use :accounts:customer
select 2
use :shop:invoices
etc

Once the alias is set up it is available universally by name. Can something
like this be done in Foxpro?

Is this as clear as mud?

Thanks in advance.

Malcolm Brown
Dan Freeman
2004-08-13 20:45:26 UTC
Permalink
Post by mb
Is this as clear as mud?
Yes.

Your first question was about sharing a dbf with dbase when it's in a FoxPro
DBC. That won't work. Ever.

Your second question was about aliases. VFP uses the same alias idea that
originated with dBase:

Use shop!Inovices alias Fred

(Now you can refer to the alias Fred any time you want to point to that
workarea.)

What are you really asking?

Dan
mb
2004-08-14 09:03:47 UTC
Permalink
"Dan Freeman" wrote in message

I am not trying to be awkward. It is jiust that the nearly familiar can be
more difficult to understand than the completely different.
.
Post by Dan Freeman
Your first question was about sharing a dbf with dbase when it's in a FoxPro
DBC. That won't work. Ever.
I realised that I was completely on the wrong tack with that question.
Post by Dan Freeman
Your second question was about aliases. VFP uses the same alias idea that
Use shop!Inovices alias Fred
(Now you can refer to the alias Fred any time you want to point to that
workarea.)
What are you really asking?
Dan
There are two types of alias in dBase; table and database. Giving the table
"Invoices" the alias "Fred" is certainly one thing I will use. In a BDE
alias (shop) the database properties are set e.g. driver (dBase, Foxpro,
MSAccess, Interbase, MySQL etc,), database name (which gives the full path)
and any other properties necessary for that driver. Thus when you enter
"open database shop" dBase knows all the how to handle it.

I am not trying to find fault with VFP, I like it very much and will be
buying VFP9 when it becomes available, but I am trying to translate as much
of the familiar dBase code which I have used for 15 years into the similar
VFP code.

Thanks again

Malcolm Brown
Andy Rice
2004-08-21 00:42:56 UTC
Permalink
Post by mb
"Dan Freeman" wrote in message
I am not trying to be awkward. It is jiust that the nearly familiar can be
more difficult to understand than the completely different.
.
Post by Dan Freeman
Your first question was about sharing a dbf with dbase when it's in a
FoxPro
Post by Dan Freeman
DBC. That won't work. Ever.
I realised that I was completely on the wrong tack with that question.
Post by Dan Freeman
Your second question was about aliases. VFP uses the same alias idea that
Use shop!Inovices alias Fred
(Now you can refer to the alias Fred any time you want to point to that
workarea.)
What are you really asking?
Dan
There are two types of alias in dBase; table and database. Giving the table
"Invoices" the alias "Fred" is certainly one thing I will use. In a BDE
alias (shop) the database properties are set e.g. driver (dBase, Foxpro,
MSAccess, Interbase, MySQL etc,), database name (which gives the full path)
and any other properties necessary for that driver. Thus when you enter
"open database shop" dBase knows all the how to handle it.
I am not trying to find fault with VFP, I like it very much and will be
buying VFP9 when it becomes available, but I am trying to translate as much
of the familiar dBase code which I have used for 15 years into the similar
VFP code.
Thanks again
Malcolm Brown
I worked with Paradox for DOS, and a little with the Windows version.
FoxPro does not have the BDE alias concept, if I understand the latter.

But you have two good choices in FoxPro to connect to a dBase tables.
CursorAdapters and Remote Views.
You will create each one to point to a particular dBase table.
A CursorAdapter is outside of any FoxPro DBC.
A Remote Views is within a DBC.

The CursorAdapter is probably harder to setup, and fewer people have used
it.
But it has the advantage of being a class.
You could create one class with generic code for dBase tables.
Then subclass that for each table.

You can get a great CursorAdapter builder at: http://www.mctweedle.com/

Andy Rice
San Diego, CA
mb
2004-08-27 13:27:47 UTC
Permalink
Belated thanks for your reply - I have only just spotted it.

Malcolm Brown
Andy Rice
2004-08-27 20:56:46 UTC
Permalink
I'll try to help you if you decide to use Remote Views or CursorAdaptors.
I have a good, but not great, knowledge of both.

- Andy Rice
Post by mb
Belated thanks for your reply - I have only just spotted it.
Malcolm Brown
mb
2004-08-29 16:04:07 UTC
Permalink
Post by Andy Rice
I'll try to help you if you decide to use Remote Views or CursorAdaptors.
I have a good, but not great, knowledge of both.
Thanks for your offer - I suspect I will need it. There may be a delay as I
have "volunteered" to administer a client's new Linux server, so there's
another learning curve. It's database is Interbase/Firebird which will need
client interfaces building - Foxpro.

Thanks again.

Malcolm Brown

Cindy Winegarden
2004-08-15 20:08:19 UTC
Permalink
Hi MB,

You haven't said which version of VFP you are using, also, is there an ODBC
driver or OLE DB data provider for dBase 5.7? If so, you can create a
connection to the files and access them via views in the VFP DBC.
--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
Post by mb
I can create a BDE alias for Foxpro tables without conversion but I am
having trouble using dBase 5 tables in a Foxpro dbc. Is this possible? I
am starting to convert a large dBase 5.7 app to Foxpro 9 but can only do it
gradually as my Foxpro expertise increases. I need to use the live dBase
data so it needs not to be converted to Foxpro for the time being.
Any advice please?
Malcolm Brown
mb
2004-08-16 08:47:53 UTC
Permalink
Post by Cindy Winegarden
You haven't said which version of VFP you are using, also, is there an ODBC
driver or OLE DB data provider for dBase 5.7? If so, you can create a
connection to the files and access them via views in the VFP DBC.
It's VFP 9.0 Beta and I will buy the full version when it becomes available.

As I said in another post dBase 5.x and VFP are so similar in many respects
that it is difficult to see what to do differently sometimes. I think views
are the thing. It is the "set up once and use anywhere" aspect of BDE
aliases which I am after.

Thanks again.

Malcolm Brown
Loading...