Solved

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

Posted on 2001-06-13
4
175 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

911 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

21 Experts available now in Live!

Get 1:1 Help Now