Solved

Access data files of type 2000 05 13 0000 (Wide).dbf in VB 5.0 Application

Posted on 2001-06-13
4
172 Views
Last Modified: 2010-05-02
How to Access data files of type
2000 05 13 0000 (Wide).dbf in VB 5.0 Application ? How to access & import data from a No. of dbf files of type 2000 05 13 0000 (Wide).dbf stored in a directory
ie.
d:\datalog to MS Access (MDB) Database in Visual Basic 5.0 ?

0
Comment
Question by:Mahesh
4 Comments
 
LVL 9

Expert Comment

by:Valliappan AN
ID: 6189770
It appears to be a foxpro/dbase file. You could attach the table, by clicking link tables from MS Access, on Tables tab.

Select "Files of type": dbase III, dbase IV, dbase 5 or Microsoft Foxpro, as the case may be. Yours could work atleast in either one of these.

Try doing like this to work with. Or else, you could also import data to Access table, and work upon.
0
 
LVL 43

Accepted Solution

by:
TimCottee earned 100 total points
ID: 6189986
Alternatively you could use an ADO or DAO connection to the dbf file without going through access. Using ADO is extremely easy as you only need to set a connection string such as cnnADOConnection.ConnectionString = "Provider=MSDASQL.1;Extended Properties=Driver={Microsoft Visual FoxPro Driver};UID=;PWD=;SourceDB=\\ServerName\Sharename\FolderName;SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;"

Set the SourceDB parameter to the path of the required file, you can then treat the dbf file as a table in the normal way:

Dim cnnADOConnection As ADODB.Connection
Dim rstDBF As ADODB.Recordset
Set cnnADOConnection = New ADODB.Connection
Set rstDBF = New ADODB.Recordset
cnnADOConnection.ConnectionString = "Provider=MSDASQL.1;Extended Properties=Driver={Microsoft Visual FoxPro Driver};UID=;PWD=;SourceDB=\\ServerName\Sharename\FolderName;SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;"
cnnADOConnection.Open
rstDBF.Open "Select * From '2000 05 13 0000 (Wide).dbf'",cnnADOConnection,adOpenStatic,adLockOptimistic
With rstDBF
 'Manipulate the recordset
End With
rstDBF.Close
cnnADOConnection.Close
Set rstDBF = Nothing
Set cnnADOConnection = Nothing
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7136086
Hi Mahesh@devx,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will suggest to:

    Accept TimCottee's comment(s) as an answer.

Mahesh@devx, if you think your question was not answered at all or if you need help, you can simply post a new comment here.  Community Support moderators will follow up.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Expert Comment

by:Computer101
ID: 7168366
Comment from expert accepted as answer

Computer101
E-E Moderator
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now