Solved

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

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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

820 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