🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.multi-tier
Article #1109

Copying *.DBF files

#1109
From: Brian Phillips
Date: Wed, 26 Apr 2000 00:00
30 lines
1937 bytes
------------------------------------------------------------
Hi *;
         I'm using a *.DBF and *.CDX files to start with. Every time I
run my program I need to create a new database file by a click of a
mouse button and populate it. Within my program I've been trying to
create a new database file.  My best attempt has been to copy a blank
*.DBF and *.CDX, using a system command, in order to create a new *.DBF
and *.CDX with a new name.  Then I make the "Ttable Active" property
"false", rename the "Ttable TableName" property, and finally I make the
"Ttable Active" property "true". This does not seem to work because as
far as builder is concerned new database files seems to be corrupt.  I
need to create the file by getting the system command working or by
another whole new method.  I am open to new methods of creating this
file.  For anyone who could put me on a track that would lead to the
creation of this file I thank!
                                             Brian


Here is an example of what I'm trying now.
This is not working. 
I get corrupt files.

String  NewFileName;
NewFileName  =  UserEntered->Text;
system("copy C:\\BlankFile.dbf  C:\\NewFileName.dbf");
system("copy C:\\BlankFile.cdx  C:\\NewFileName.cdx");
ATable->Active = false;
ATable->TableName = "NewFileName.dbf";
ATable->Active = true;
------------------------------------------------------------
Technical Details
Message-ID: <39075851.6092@csc.sctboces.org>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fcd2b,e196898ec15db7fc
X-Google-Attributes: gidfcd2b,public
From: Brian Phillips <bphillip@csc.sctboces.org>
Subject: Copying *.DBF files
Date: 2000/04/26
Message-ID: <39075851.6092@csc.sctboces.org>
X-Deja-AN: 616000569
Content-Transfer-Encoding: 7bit
X-Trace: 26 Apr 2000 10:51:41 -0800, 216.42.90.71
Organization: SCT BOCES
Content-Type: text/plain; charset=us-ascii
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.database.multi-tier