473,408 Members | 2,025 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

importing .dbf or opening with ado

I need to get data from a table in .dbf format. I try importing it,
but get "external table not in expected format".

So I tried this VB code to see if I could get at my records with ADO
(which I am very new to)

"
With cnn1
..Provider = "microsoft.jet.oledb.4.0"
..Open "dBase
IV;HDR=NO;IMEX=2;DATABASE=C:\projects\leshrc\urs;T ABLE=needlx#dbf"
End With

With rst1
..ActiveConnection = cnn1
..CursorType = adOpenDynamic
..CursorLocation = adUseClient
..LockType = adLockOptimistic
..Open strSQL
End With

"
and I got the same "external table not in expected format"

so I poked around the internet, and it said this is probably because
the table is in a higher version of foxpro. I learned I should
download and install the MS foxpro data provider, which I did. I
tried the same thing with the same Error.

Then I tried changing provider to

"
With cnn1
..Provider = "Provider=VFPOLEDB.dll"
..Open _
"dBaseIV;HDR=NO;IMEX=2;DATABASE=C:\projects\leshrc \urs;TABLE=needlx#dbf"
End With
etc
"

This time I got "Provider cannot be found. It may be improperly
installed"

Are there steps I am missing? How do I get at the data in that table?
May 15 '06 #1
3 6209
Hi Donald,

You can create an ODBC DSN in Control Panel/Administrative
Tools/DataSources (ODBC). Make sure to select the System tab. You want
to create a System DSN. This will support the DBF format. When you
click Add and get the list of ODBC drivers, Microsoft has one for Dbase
tables (DBF). Then you can connect to your table through ODBC.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
May 15 '06 #2
Still having no luck.Still getting "external table not in expected
format" I also downloaded and installed the visual foxpro ODBC driver
but that doesn't change it.

When I create the connection, what should I call the Provider?


On Mon, 15 May 2006 23:31:24 GMT, Rich P <rp*****@aol.com> wrote:
Hi Donald,

You can create an ODBC DSN in Control Panel/Administrative
Tools/DataSources (ODBC). Make sure to select the System tab. You want
to create a System DSN. This will support the DBF format. When you
click Add and get the list of ODBC drivers, Microsoft has one for Dbase
tables (DBF). Then you can connect to your table through ODBC.

Rich

*** Sent via Developersdex http://www.developersdex.com ***

May 16 '06 #3
It may be possible that you don't have a good file. Try opening your
file with Excel. I have never had a problem opening a DBF table in
Access. One other thing you could try is just linking directly to the
DBF file from Access like you would any other Access DB from the table
window -- r-click in the database window (Table Tab), select "Link
Tables". In the drop down you have like 4 different DBF format types
you can choose from. Try any of those. If that doesn't get it, and you
can't open the file in Excel, then the file may not be a good fie.
Lastly, if you have access to the original native environment where this
file was created you should be able to open it there for sure - if not,
then the file is corrupt.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
May 16 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Skc | last post by:
I have a .txt which has been exported as a .csv from an external source. What i need to do is to import this into SQL2000 (into a table) but I need to do special things on the data: 1. I need to...
3
by: patcho | last post by:
Hello, I have a problem that I was hoping to get some assistance with. I have built a split database (back end with all the tables and a password to protect the information & a front end to link...
3
by: Phil | last post by:
Hi, I am a novice user so please be gentle.;-) I am trying to import a very large CSV file with an extension of .DRF Access wont let me import it because DRF is not one of the extensions...
1
by: ANSWER | last post by:
Hi, Is there any way I could disable someone to create a new database and import all of my tables into his database. I make .mde, disable shift+Enter, make logon module but still my tables are...
11
by: David Lozzi | last post by:
Hello, I need to automate importation of a excel file into a table. Here's my scenario: I'm writing an ASP.NET application where users can pull reports on imported data. The imported data is...
0
by: Syvman | last post by:
Is there a parameter to set to allow opening Excel file read only while it is already open by another user? I've tried the .mode setting in my connection string to adModeRead, but it still won't...
1
by: hedgracer | last post by:
I have set up the following vba code: DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "Sheet1", _ "Z:\Accounting\DataArchive\Monthly_Database_Data\Copy of NIGHTFILLS JUL...
11
by: kaisersose1995 | last post by:
Hi, I've got an import procedure working, using a standard import specification to import a .csv file into a temporary table. The problem i'm having is that i have 4 different sets of borrower...
2
by: Alun Jones | last post by:
I'm getting the above error in a dialog box from Visual Studio 2005 when trying to sign an assembly using a PFX file, and would like to know how to resolve the problem. Background: The PFX...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.