×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Are the longer field names in a dbc container accessible from the Repl/Dot Prompt?
3

Are the longer field names in a dbc container accessible from the Repl/Dot Prompt?

Are the longer field names in a dbc container accessible from the Repl/Dot Prompt?

(OP)
Hi,

I'm thinking about converting an Access database to foxpro, because I do a lot of ad hoc queries and manipulation when there are problems.

If I convert the .mdb (not .accdb) to a Foxpro database in a dbc, will I be able to access the longer field names from the repl?

RE: Are the longer field names in a dbc container accessible from the Repl/Dot Prompt?

What do you mean by the "REPL/Dot Prompt"?

Best Regards,
Scott
MSc ISM, MIET, MASHRAE, CDCAP, CDCP, CDCS, CDCE, CTDC, CTIA, ATS, ATD

"I try to be nice, but sometimes my mouth doesn't cooperate."

RE: Are the longer field names in a dbc container accessible from the Repl/Dot Prompt?

(OP)
The command tool that shows up when you run VFX. It's been there since the beginning, in fact way back with Dbase. Even the modern xbase compilers all have repls to type in queries on the fly.

In the Dbase days, it was called the Dot Prompt.

RE: Are the longer field names in a dbc container accessible from the Repl/Dot Prompt?

Don, the short answer to your question is Yes. The use of long field names is pretty well transparent. You don't really need to think about the issue.

(I have to say that you are showing your age here. The term "dot prompt" brings back memories of a time long gone by.)

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Are the longer field names in a dbc container accessible from the Repl/Dot Prompt?

I think dot prompt is the command window? Or what?

Anyway, long field names in a DBC are there to be visible anywhere. VFP sees long field names in any place, not just when specifically querying the DBC, that's automatic. So queries with long field names work, if that's what you're actually after. It would be a strange feature of DBCs to allow long field names, if using them would be complicated.

In the file structure of a DBF that belongs to a DBC, there is a pointer back to the DBC in that DBFs header, and they have a different identifier byte 0 in the DBF file. Otherwise, the DBF header itself still is compatible with free or legacy DBFs and contains short field names, by which you can't address the fields, though. They would become the names of the fields, if you use the FREE TABLE command. As long as you don't the names stored in the DBC are the field name, just like you could indeed also have a different table name than the file name stored in the DBC, but nobody does that since the file system already allows long names anyway.

Chriss

RE: Are the longer field names in a dbc container accessible from the Repl/Dot Prompt?

Yeah, if he had said dot prompt, I'd have understood, but I don't recall Repl/Dot...

Best Regards,
Scott
MSc ISM, MIET, MASHRAE, CDCAP, CDCP, CDCS, CDCE, CTDC, CTIA, ATS, ATD

"I try to be nice, but sometimes my mouth doesn't cooperate."

RE: Are the longer field names in a dbc container accessible from the Repl/Dot Prompt?

(OP)
Perfect, thanks Scott/Mike/Chris.

I play in Dosbox on my android tablet sometimes, and still use some of the original Dot Prompts. So the terminology is literally like yesterday.

RE: Are the longer field names in a dbc container accessible from the Repl/Dot Prompt?

I remember attending a demo of dBASE IV. This must have been around 1988 or 1989. They showed this wonderful new development environment, with all kinds of menus and toolbars, and something called the Control Centre. All very avant garde in those days - and quite overwhelming.

Towards the end of the demo, the person in charge navigated to some obscure part of the interface, and then, almost invisible at the bottom of the screen, a dot prompt appeared. A loud cheer went up from the audience.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Are the longer field names in a dbc container accessible from the Repl/Dot Prompt?

One more detail about how the level of transparency is achieved, even in cases you could expect problems:

You can open (USE) a dbf that's part of a DBC without first opening the DBC with OPEN DATABASE. Because of the reference to the DBC in the DBF header, the opening of the corresponding DBC happens automatically. That's also another thing making DBFs compatible with free DBFs, you can still use code that does not care about the existence of the DBC and just opens the DBFs directly.

So in the end the long field names become available at any time the DBF is opened, as the DBC always also will be opened. Quite as automatic as is the usage of the FPT file and the main CDX that's associated with a DBF without the need to specify it.

Chriss

RE: Are the longer field names in a dbc container accessible from the Repl/Dot Prompt?

There is one point you need to watch when dealing with long field names.

Normally, if you create an index in the table designer, the index name will default to the corresponding field name. But if the field name has more than ten characters, the index name will be truncated. This could cause problems if you are not aware of it, and you attempt to use the full name in your code. This only affects the index name (more properly called the tag name), not the index expression.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Are the longer field names in a dbc container accessible from the Repl/Dot Prompt?

(OP)
Mike - envious. Never attended any of the conferences. Dbase itself is still alive and kicking, they even sell Dbase V for Dos.

Chris - Never knew that, about the DBF containing an indicating of it's umbrella DBC. Very useful, I'm now more excited about playing with Foxpro.

Mike - Forwarned, thanks. I could definitely envision some frustration when typing an expected long index name. (Never got used to calling them tags).


RE: Are the longer field names in a dbc container accessible from the Repl/Dot Prompt?

Yes, true. I have too little knowledge about how Access databases name their indexes to understand the implications this would have on the conversion of an Acces db to a VFP DBC. The knowledge of Access I have is that you don't really address indexes in Access, but do your Access SQL queries which make use of the indexes in ways similar to Rushmore, maybe based on a totally different approach, but all in all, nothing you influence by a SET ORDER and SEEK or commands like that. Just like T-SQL doesn't have such xbase-like access to the tables and their indexes but the sql engine makes best use of them for a query.

One thing is for sure: The (tag) names of indexes are limited to 10 characters only, even with the extension of long field names DBCs allow. The question becomes: How will you convert the MDB to a DBC (and all the dbf etc files)? If you export all data that'll not export the indexing, obviously. Or foreign key relationships and other details. From the VFP point of view I don't know an access database conversion/migration tool, in my Access knowledge I don't know anything about that topic. And from my general knowledge and approaches of data migrations from VFP to MSSQL, MySQL, MySQL to MSSQL and some more, I never tried to simply mimic the same structures. Migrations were always done after a redesign of the database to profit the best from that migration. And in that redesign indexes got new names.

Chriss

RE: Are the longer field names in a dbc container accessible from the Repl/Dot Prompt?

(OP)
Chris,

I don't know how the software goes about doing the conversions of the index names, but I'm using DBConvert Access to Foxpro. I purchased a license in 2012, and am upgrading it today, for this new project. It worked fine the last time I used but, but I don't recall what happened with the tags.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close