473,763 Members | 4,808 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 11608
Hello JimmyKoolPantz,

Check out System.Data.Ole Db, and connectionstrin gs.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***@cindywine garden.com
"JimmyKoolPantz " <ko*******@gmai l.comwrote in message
news:11******** **************@ p79g2000cwp.goo glegroups.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***@cindywine garden.com
"JimmyKoolPantz " <ko*******@gmai l.comwrote in message
news:11******** **************@ p79g2000cwp.goo glegroups.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*******@gmai l.comwrote in message
news:11******** **************@ i3g2000cwc.goog legroups.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***@cindywine garden.com
Sep 5 '06 #7

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

Similar topics

0
5018
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 &Hc0000005& (Visual Basic internal compiler error) Save your work and restart Visual Studio .Net."
1
1759
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 programs - there are two entries - one for VB.Net and the other for Visual Studio .Net. Both entries are over 1 GB in size. My question is whether the VB.Net is redundant information
2
3602
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 Visual Basic .net standard 2003. Not installing Visual Basic at the WinXP SP1A level - was the only way I found that I could install WinXPSP2. My computer was purchased with WinXP SP1 Professional. I also have Norton Internet Security and Norton...
26
10881
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 compiles the same solution much faster (about 10 seconds for the first project). My home computer is only marginally faster than the one I have at the office (P4 2.53 vs. P4 2.4, same amount of RAM). On the slow machine, the CPU usage is very low,...
1
2788
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: System Error &Hc0000005& (Visual Basic internal compiler error) Save your work and restart Visual Studio .NET. ---- On the same codebase it will sometimes work and sometimes not. Very Bizarre.
4
1949
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 strings, which is a pain as we use our own database format with specific, user-defined data types and random access files. An example module content would be Option Explici Type Record Operation As String * 4 unit As String * 2 Marker1 As String *...
5
3812
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; a.. Under the "Connection" tab, under "1. Select or enter a server name:" when I either select the drop down box or click the refresh button I get an error dialog saying "Error enumerating data servers. Enumerator reports Unspecified error'". The...
0
1242
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 reference". I checked the references in the VB project file and they are pointing to the correct tlb file (full path). I do not compile the C# DLLs, but I did create the tlb files and register them in the GAC. The VB app used to be working just...
6
2533
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 Basic Express Edition but could not find one. I have even searched the help files and could not find anything useful for me. I want to simply package my application so that I may install it on another computer.
0
9563
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9386
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9997
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9937
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9822
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.