Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2001-06-13
4
Medium Priority
?
191 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 400 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
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…
Suggested Courses

670 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