Re: Visual Basic.Net & DBF files

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"JimmyKoolPantz" <kohl.mike@xxxxxxxxx> wrote in message
news:1157450604.709372.140740@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Hi Jimmy,

The DBF file's will not be FoxPro files, Basically what I will be doing
is converting text file, excel files, CSV files, to DBF files, such as,
What microsoft does when you export a table/query from microsoft
access, and save as a "DBF".

Using the VFP OLE DB data provider, you can't create Dbase III/IV compatible
files, which is what Excel creates. If the other apps that will consume your
DBFs can access Visual FoxPro tables then you can use the FoxPro OLE DB data
provider. Otherwise you'll have to find something to work with Dbase III/IV
DBFs.

I don't have a problem connecting to a dbf file and creating a dataset
with the file information, but, I do forsee a problem (which I have not
yet began to code) updating or creating a new dbf file. If this is as
easy as generating a xml, txt, excel from visual studio, than this
should not be a problem. One thing I do question is the .cdx file that
is associated with the dbf file. Is this .cdx file required or is this
.cdx file something that vfp has generated. Please keep in mind the
program that I am writing in visual studio will be replacing vfp
program.

Since you're referring to CDX indexes, your DBF tables are FoxPro tables.
Early versions of FoxPro Tables were DBase III/IV compatible. Fox tables
come in 3 parts, the DBF which is the table itself, the FPT (optional) which
contains any data that is in Memo fields, and the CDX (optional) which is an
index file. Other DBF versions have IDX and MDX files (I'm not very familiar
with MDX files). The Fox data engine takes care of keeping CDX indexes
updated if they exist.

a few program details:
The program I am creating imports various data types into
datasets/tables, then processes ithe information within the
dataset/tables, then exports as a dbf file. Such as, the way microsoft
access does when you import various file types, and then export as a
dbf file. The only difference is my program has data intelligence that
will determine the length and data type for each column then add a few
columns if needed. This should reduce mistakes, and reduce processing
time.

Another task, is opening a dbf file (an existing dbf file), filter
through each record and seperate residents from companies. Some of our
clients do not want to mail information to companies, so I set up an
xml file with various key words which will be used as filters, I want
to alter the existing dbf file (pull out company names or if needed
create a new dbf file) and I also want to create a new dbf file with
just company names.

It's really a shame that you're trying to replace a Fox app of this type
with a VB app. Since FoxPro has a built in data engine, the kinds of data
handling that you describe are about 10 times easier in FoxPro than they are
any non-data centric language like VB. Also, Even the latest versions of
FoxPro (Visual FoxPro 9) can export data in the Dbase III/IV compatible
format.

Don't get me wrong - I like VB, but for data manipulation (Visual) FoxPro is
so much easier.

--
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
cindy@xxxxxxxxxxxxxxxxxxx


.



Relevant Pages

  • Converting WP merges that use macros to mailmerge/VBA
    ... which is a simplified version of WP's macro language. ... User selects record and then from inside the FoxPro front end ... FoxPro creates the .dbf file and then initiates the process with a macro to ... information into a second bookmark by inserting a line referring to the ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Converting WP merges that use macros to mailmerge/VBA
    ... from the .dbf file and the user being given the opportunity to add other ... which is a simplified version of WP's macro language. ... The database program is FoxPro, ... information into a second bookmark by inserting a line referring to the ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Accessing xBase files - help needed.
    ... if you have foxpro -- why not just use foxpro to manipulate it? ... it back to the dbf file - using SQL in VBA. ...
    (comp.databases.xbase.fox)
  • Re: Restoring a FoxPro database backup?
    ... FoxPro is a file server database, so a "backup" is just an XCopy of the ... Fox tables come in three pieces: the DBF file is the table itself, ... Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP ...
    (microsoft.public.fox.vfp.dbc)
  • Accessing xBase files - help needed.
    ... exact structure of the db files, although they won't import into MS ... My problem is that the user interface on this application makes ... it back to the dbf file - using SQL in VBA. ... We currently have foxpro and microsoft office apps at work. ...
    (comp.databases.xbase.fox)