473,473 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Read a DBASE III file in VB.NET

Hi,

how can I open and read a DbaseIII file in .NET?
--
Met vriendelijke groet / With regards / Saludos,
Moviat Automatisering
Maurice Mertens
mauricem@moviat_KillSpamWordForEMail.nl

tel: +31 162 470 534
fax: +31 162 470 502
Jul 21 '05 #1
6 17929
This might wor

In Server Explorer
New Add Connectio
Select as Provider Microsoft OLEDB provider for ODBC Driver
Select dBASE files as DataSource Nam
Enter as Initial the directory which holds your table(s). Not the tables itsel
Test Connectio

Now you can the table to your form
I'll write a next message with the code exampl

Marinus Holkem

Jul 21 '05 #2
On Wed, 19 May 2004 00:34:05 -0700, Maurice Mertens <mauricem@moviat_KillSpamWordForEMail.nl> wrote:

¤ Hi,
¤
¤ how can I open and read a DbaseIII file in .NET?

You can use Jet OLEDB and the ISAM driver as in ADO:

Private Sub ConnectTodBaseDataReader()

Dim ConnectionString As String

ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=e:\My Documents\dBase;Extended Properties=dBase III"
Dim dBaseConnection As New System.Data.OleDb.OleDbConnection(ConnectionString )
dBaseConnection.Open()

Dim dBaseCommand As New System.Data.OleDb.OleDbCommand("SELECT * FROM MyDBase",
dBaseConnection)
Dim dBaseDataReader As System.Data.OleDb.OleDbDataReader =
dBaseCommand.ExecuteReader(CommandBehavior.Sequent ialAccess)

While dBaseDataReader.Read
Console.WriteLine(dBaseDataReader("Column1").ToStr ing)
Console.WriteLine(dBaseDataReader("Column2").ToStr ing)
Console.WriteLine(dBaseDataReader("Column3").ToStr ing)
End While

dBaseConnection.Close()

End Sub
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Jul 21 '05 #3

Thanks Paul, I will try this code !!!

--
Met vriendelijke groet / With regards / Saludos,
Moviat Automatisering
Maurice Mertens
mauricem@moviat_KillSpamWordForEMail.nl

tel: +31 162 470 534
fax: +31 162 470 502
Jul 21 '05 #4
This might wor

In Server Explorer
New Add Connectio
Select as Provider Microsoft OLEDB provider for ODBC Driver
Select dBASE files as DataSource Nam
Enter as Initial the directory which holds your table(s). Not the tables itsel
Test Connectio

Now you can the table to your form
I'll write a next message with the code exampl

Marinus Holkem

Nov 22 '05 #5
On Wed, 19 May 2004 00:34:05 -0700, Maurice Mertens <mauricem@moviat_KillSpamWordForEMail.nl> wrote:

¤ Hi,
¤
¤ how can I open and read a DbaseIII file in .NET?

You can use Jet OLEDB and the ISAM driver as in ADO:

Private Sub ConnectTodBaseDataReader()

Dim ConnectionString As String

ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=e:\My Documents\dBase;Extended Properties=dBase III"
Dim dBaseConnection As New System.Data.OleDb.OleDbConnection(ConnectionString )
dBaseConnection.Open()

Dim dBaseCommand As New System.Data.OleDb.OleDbCommand("SELECT * FROM MyDBase",
dBaseConnection)
Dim dBaseDataReader As System.Data.OleDb.OleDbDataReader =
dBaseCommand.ExecuteReader(CommandBehavior.Sequent ialAccess)

While dBaseDataReader.Read
Console.WriteLine(dBaseDataReader("Column1").ToStr ing)
Console.WriteLine(dBaseDataReader("Column2").ToStr ing)
Console.WriteLine(dBaseDataReader("Column3").ToStr ing)
End While

dBaseConnection.Close()

End Sub
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 22 '05 #6

Thanks Paul, I will try this code !!!

--
Met vriendelijke groet / With regards / Saludos,
Moviat Automatisering
Maurice Mertens
mauricem@moviat_KillSpamWordForEMail.nl

tel: +31 162 470 534
fax: +31 162 470 502
Nov 22 '05 #7

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

Similar topics

10
by: level8 | last post by:
I would like to see a Clipper/dbase DBF file as a table in SQL Server 7.0. How can I SELECT rows from DBF file? Should I use OLE DB Provider or ODBC, and how?
8
by: chippy | last post by:
Hi, I've a VB script that creates a Access object in a word doc. Here is the full script. It works for all but the Export. Which always fails with a 3011 error. If I do the same in Access as a...
3
by: Frank | last post by:
Hi, the problem I have is that an older dos program is using dbase 3 or 4 database files and I wish to add a little utility that scanns this database, and if specific record has a certain entry...
6
by: Tomek | last post by:
Hi, Please help me with Data Connections into dBase files. I have catalog with lot of files like *.dbf and *.mdx . Every file contains one table (I can see it in MS Access). How can I make...
2
by: chiefsitebuilder | last post by:
I have a question about saving an MS Access program to CD and verifyng that the program works after being saved. Here is my situation, I have a person who developed an application for me using...
0
by: j.np.12 | last post by:
I have an Access XP database which links to dBase III format tables and updates them. The app used to work fine until recently when the dBase index tables keep getting corrupted and need to be...
6
by: Aleyna[] | last post by:
Hi all, I wanted to connect an old DBASE file (I don't know the exact version) but I could not make it at all. I couldn't find a way to execute sql statements on db file using c#. The...
1
by: manontheedge | last post by:
I'm importing some .dbf files into Access, but getting "can't recognize format errors" on some of them I realised that the ones that transfer okay are "dBASE III/IV/Clipper" file format, and the...
2
by: bcbrock | last post by:
I am trying to figure out how to query some data out of a dbase IV (.dbf) file sitting on a remote server from my MySQL/PHP/Web Server. Both servers are Windows Server 2003 SP2. My...
0
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,...
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...
1
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.