473,395 Members | 2,423 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,395 software developers and data experts.

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 17910
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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...

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.