VB.NET

Moderators: seancampbell
Number of threads: 4022
Number of posts: 10035

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
How To Select Data from *.DBF files Posted by jitendra_kate on 5 Nov 2008 at 12:49 AM

I am very new to foxpro file extraction programming using vb.net
plz help for following scenario.

I have a foxpro files of file extension

1) FOXUSER.DBF: which contains fields such as Type,Id,Name,Readonly,CkVal,
Data,Updated.

2) FOXUSER.FPT:fields same as above

3) Data_Needed.DBF :Contains fields such as
EmployeeID,EmployeeName,EmpolyeeAddress

I have created a function for selecting data from the foxpro file Data_Needed.DBF

But it gives error

"The Microsoft Jet database engine could not find the object 'Data_Needed'. Make sure the object exists and that you spell its name and the path name correctly."

I have troubleshooted a lot but no use although the files are present there in the location

my function is as below

==========================================
connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=D:\DATA Needed\Data_Needed;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 Data_Needed", dBaseConnection)

Dim dBaseDataReader As System.Data.OleDb.OleDbDataReader = dBaseCommand.ExecuteReader(CommandBehavior.SequentialAccess)

While dBaseDataReader.Read

ComboBox1.Items.Add("" & dBaseDataReader("EmployeeName") & "")

End While

dBaseConnection.Close()


==========================================================


Please Help me finding a solution

Thanks in Advance for all
Jiendra






Report
Re: How To Select Data from *.DBF files Posted by seancampbell on 5 Nov 2008 at 7:11 AM
I have never dealt with a DBF file, but you might try this:
connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=D:\DATA Needed\Data_Needed.DBF;Extended Properties=dBase III"

:
: I am very new to foxpro file extraction programming using vb.net
: plz help for following scenario.
:
: I have a foxpro files of file extension
:
: 1) FOXUSER.DBF: which contains fields such as
: Type,Id,Name,Readonly,CkVal,
: Data,Updated.
:
: 2) FOXUSER.FPT:fields same as above
:
: 3) Data_Needed.DBF :Contains fields such as
: EmployeeID,EmployeeName,EmpolyeeAddress
:
: I have created a function for selecting data from the foxpro file
: Data_Needed.DBF
:
: But it gives error
:
: "The Microsoft Jet database engine could not find the object
: 'Data_Needed'. Make sure the object exists and that you spell its
: name and the path name correctly."
:
: I have troubleshooted a lot but no use although the files are
: present there in the location
:
: my function is as below
:
: ==========================================
: connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
: "Data Source=D:\DATA Needed\Data_Needed;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 Data_Needed",
: dBaseConnection)
:
: Dim dBaseDataReader As System.Data.OleDb.OleDbDataReader =
: dBaseCommand.ExecuteReader(CommandBehavior.SequentialAccess)
:
: While dBaseDataReader.Read
:
: ComboBox1.Items.Add("" & dBaseDataReader("EmployeeName")
: & "")
:
: End While
:
: dBaseConnection.Close()
:
:
: ==========================================================
:
:
: Please Help me finding a solution
:
: Thanks in Advance for all
: Jiendra
:
:
:
:
:
:
:



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.