473,396 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Visual Basic.Net & DBF files

I have been given the task of converting a program from VFP (visual
foxpro) to Visual Basic.net. My question is "Is it possible to
generate a DBF file Dynamically(at runtime) using Visual Basic.Net?"
With all the field properties, such as, field length and type. I'm not
sure if this is a stupid quesiton or If I am just over looking
something, but I have not found solid information on the internet about
this topic.

Any useful information would greatly be appreciated.

Further Information:
1. The program I am coding, opens up various types of data (.txt,
..xls, .dbf) and processes the data files and then exports as a .dbf
file.

2. The program also opens existing dbf files, searches for companies,
and the then alters the dbf file and also creates a new dbf with just
company names.

Since the primary postal software that we use only supports dbf files,
I need to generate dbf files. (note: all the data files I am working
with do not have the same pattern, they come in different structures
(different data columns))

I have been pondering on a few things about this topic but am seeking
professional advise before I start programming.

Sep 4 '06 #1
6 11548
Hello JimmyKoolPantz,

Check out System.Data.OleDb, and connectionstrings.com

Enjoy
-Boo
I have been given the task of converting a program from VFP (visual
foxpro) to Visual Basic.net. My question is "Is it possible to
generate a DBF file Dynamically(at runtime) using Visual Basic.Net?"
With all the field properties, such as, field length and type. I'm not
sure if this is a stupid quesiton or If I am just over looking
something, but I have not found solid information on the internet
about this topic.

Any useful information would greatly be appreciated.

Further Information:
1. The program I am coding, opens up various types of data (.txt,
.xls, .dbf) and processes the data files and then exports as a .dbf
file.
2. The program also opens existing dbf files, searches for companies,
and the then alters the dbf file and also creates a new dbf with just
company names.

Since the primary postal software that we use only supports dbf files,
I need to generate dbf files. (note: all the data files I am working
with do not have the same pattern, they come in different structures
(different data columns))

I have been pondering on a few things about this topic but am seeking
professional advise before I start programming.

Sep 4 '06 #2
Hi Jimmy,

Assuming that your DBFs are FoxPro files you can use the latest FoxPro and
Visual FoxPro OLE DB data provider, downloadable from
msdn.microsoft.com/vfoxpro/downloads/updates . You can create tables using
the CREATE TABLE statement; you can read about it in the VFP section of the
MSDN Library.

--
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
ci***@cindywinegarden.com
"JimmyKoolPantz" <ko*******@gmail.comwrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
>..... "Is it possible to
generate a DBF file Dynamically(at runtime) using Visual Basic.Net?"
With all the field properties, such as, field length and type. ......

Sep 5 '06 #3
Hi Jimmy,

Another thing that you should consider is how index files associated
with the .DBF's will be updated.

Ayon kay JimmyKoolPantz:
I have been given the task of converting a program from VFP (visual
foxpro) to Visual Basic.net. My question is "Is it possible to
generate a DBF file Dynamically(at runtime) using Visual Basic.Net?"
With all the field properties, such as, field length and type. I'm not
sure if this is a stupid quesiton or If I am just over looking
something, but I have not found solid information on the internet about
this topic.

Any useful information would greatly be appreciated.

Further Information:
1. The program I am coding, opens up various types of data (.txt,
.xls, .dbf) and processes the data files and then exports as a .dbf
file.

2. The program also opens existing dbf files, searches for companies,
and the then alters the dbf file and also creates a new dbf with just
company names.

Since the primary postal software that we use only supports dbf files,
I need to generate dbf files. (note: all the data files I am working
with do not have the same pattern, they come in different structures
(different data columns))

I have been pondering on a few things about this topic but am seeking
professional advise before I start programming.
Sep 5 '06 #4
Cindy,

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".

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.

a few program details:
The program I am creating imports various data types into
datasets/tables, then processes ithe nformation 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.

Cindy Winegarden wrote:
Hi Jimmy,

Assuming that your DBFs are FoxPro files you can use the latest FoxPro and
Visual FoxPro OLE DB data provider, downloadable from
msdn.microsoft.com/vfoxpro/downloads/updates . You can create tables using
the CREATE TABLE statement; you can read about it in the VFP section of the
MSDN Library.

--
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
ci***@cindywinegarden.com
"JimmyKoolPantz" <ko*******@gmail.comwrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
..... "Is it possible to
generate a DBF file Dynamically(at runtime) using Visual Basic.Net?"
With all the field properties, such as, field length and type. ......
Sep 5 '06 #5
JimmyKookPanz,

Give this group a try. I know there are some people in here that have
..Net providers for DBF files.

http://groups.google.com/group/comp....-objects?hl=en

Rob

JimmyKoolPantz wrote:
I have been given the task of converting a program from VFP (visual
foxpro) to Visual Basic.net. My question is "Is it possible to
generate a DBF file Dynamically(at runtime) using Visual Basic.Net?"
With all the field properties, such as, field length and type. I'm not
sure if this is a stupid quesiton or If I am just over looking
something, but I have not found solid information on the internet about
this topic.

Any useful information would greatly be appreciated.

Further Information:
1. The program I am coding, opens up various types of data (.txt,
.xls, .dbf) and processes the data files and then exports as a .dbf
file.

2. The program also opens existing dbf files, searches for companies,
and the then alters the dbf file and also creates a new dbf with just
company names.

Since the primary postal software that we use only supports dbf files,
I need to generate dbf files. (note: all the data files I am working
with do not have the same pattern, they come in different structures
(different data columns))

I have been pondering on a few things about this topic but am seeking
professional advise before I start programming.
Sep 5 '06 #6
"JimmyKoolPantz" <ko*******@gmail.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...

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
ci***@cindywinegarden.com
Sep 5 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Alex | last post by:
Hi, I have a problem with the VB.NET compiler: When I open my solution I recive the message : "Visual Basic .Net compiler is unable to recover from the following error : System Error...
1
by: Craig Skrabacz | last post by:
I originally had VB.Net standard installed on my computer. I have subsequently installed Visual Studio .Net 2002 on my computer. I have not uninstalled VB.Net. When I look in my Add/Remove...
2
by: Ralph | last post by:
I used to have Visual Basic .net std. 2003 installed on WinXP SP1A. But I found it too hard to upgrade WinXP to SP2. Now, I do have WinXP SP2 installed, but I am having problems installing...
26
by: Bruno Jouhier [MVP] | last post by:
I'm currently experiencing a strange phenomenon: At my Office, Visual Studio takes a very long time to compile our solution (more than 1 minute for the first project). At home, Visual Studio...
1
by: Runge Developer | last post by:
When compiling a VB.NET assembly we reguarly have the problem where it either hangs or produces the following error: ----- Visual Basic .NET compiler is unable to recover from the following error:...
4
by: LCAdeveloper | last post by:
I have had to move to Visual Studio.NET Pro. from Visual Basic 4.0 and am now starting to re-write our code. I was a bit surprised to find that Visual Basic.NET no longer supports fixed length...
5
by: Microsoft | last post by:
Hi, I have Visual Basic .net 2003 (Standard Edition) & SQL Server 2000 Developer Edition. When trying to create a connection in the server explorer from the .net IDE I get a number of problems;...
0
by: guxu | last post by:
I have a visual basic 6.0 application that references a strong named C# DLLs. I have been getting the error "The located assembly's manifest definition with name <XXXdoes not match the assembly...
6
by: Salman | last post by:
I would like to know how I can distribute the application that I create with Visual C++ express edition. I checked the menu options to find a deploy option similar to the one found on the Visual...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.