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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DBase problem... 2

Status
Not open for further replies.

asiandoll

Programmer
Apr 24, 2002
19
0
0
BB
Hi All,

I am not good with DBase program at all, but my company has a problem with one of the dbase program we have. The dbase database is not working in DBASE program but when we run with the Visual DBase it works but when the reports are printed, they are not printing properly... How can I get my database working again in DBase not in Visual DBase...

Any help would be appreciated... :)
 
Although I have not used Visual DB, I can however offer this suggestion:

> Save the database as a text <
> file with comma delimiters <

Then open the old DB app and then IMPORT it to create the proper DBF file (with appropriate headers, of course).

Unfortunately, I'm most familiar with DB3+ than with VDB. But hopefully, you can discern a procedure that will work, with this suggestion. --MiggyD

Never be afraid to try something new. Remember that amateurs built the Ark. Professionals built the Titanic.
 
Hi,

MiggyD your suggestion was helpful but I have another question for you..

The DBase program we have is DBase 4. Is there a way to recreate the structures for the database without changing alot of stuff?

The real problem is that the structures or tables are not working in Dbase 4 but works in Visual Dbase but the data are not in their proper place, that is why I would like to have the database working again DBase 4.
 
In DB3+ there is a COPY STRU command...This creates an empty database WITH the structure of the active database. The following is a snapshot of the Help file therewith:

[tt]

COPY


COPY
----


Syntax : COPY TO <new file> [<scope>] [FIELDS <field list>] [FOR <cond>]
[WHILE <cond>] [[TYPE] <file type>] /
[DELIMITED [WITH BLANK/<delimiter>]]
[red]COPY STRUCTURE[/red] [EXTENDED] [red]TO <new file>[/red] [FIELDS <field list>]

Description : Duplicates all or part of the active database file to
a specified database file or, if you use the TYPE or DELIMITED
options, to a foreign or text file respectively. [red]COPY
STRUCTURE creates a duplicate of the structure of the database
file in USE.[/red] COPY STRUCTURE EXTENDED creates a new database
with 4 fields: field name, type, length and number of decimals,
the contents of which are field names, etc... of the old file.
[/tt]


[THE FOLLOWING IS JUST AN EXAMPLE]

USE ThisData.dbf
[red]COPY STRU TO[/red] NewData.dbf
CLOSE DATABASE ThisData.dbf
USE NewData.dbf
BROWSE

[/EXAMPL]

In the past I've been told that DB4 and DB3+ are very similar (a few modifications like larger number of records, etc.) but very similar.

Try using the Help files in DB4 and search for &quot;COPY&quot; as indicated above. --MiggyD

Never be afraid to try something new. Remember that amateurs built the Ark. Professionals built the Titanic.
 
I suspect you may have a version problem with your data handling, If you open an older version(DBIV or DBIII)table in VdB and use the copy command you run the risk of re-creating the table in the new version. When you try to open the table in the older version of dBase you run into an error. Does this sound about right? If you copy the file to a SDF or Text file and re-import the data into the table created in the old dBase version command window then the table should work. If the table structure has changed look for a DBK file in the application directory. This is the back up file. Open the dbk file and use the copy command to create a new dbf. You may need to recreate the index files if they are not present.
 
Here is the issue related to Dbase II and Dbase III:

I have source code developed using Ashton Tate Dbase II/86 Version 2.43 and on opening this file in Dbase III 3 version software it is prompting for error saying &quot; NOT A DBASE DATABASE&quot;. So I kindly request you to send me suggestions on this issue as soon as possible.

Awaiting for your favourable reply.

Regards,
Sreeram Sailendra
 
There are many changes from db2 code and db3. Click on the following link to see differences between them.


You may want to get a hardcopy after you d/l the page.
NOTE: site will be removed after June 15, 2002.

You should check out the help files for proper syntax of db3 funcs/cmds/etc.

As for the source code...you'll most likely have to revamp it (quite a bit). Let me know if this has helped at all. --MiggyD

Never be afraid to try something new. Remember that amateurs built the Ark. Professionals built the Titanic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top