• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 298
  • Last Modified:

Data unreadable after importing DBF into acess 2003

DBF database imported into access 2003 is done successfully ,but the data are rubbish ,any idea
0
AJDeveloper
Asked:
AJDeveloper
  • 12
  • 5
  • 4
1 Solution
 
Haris DjulicCommented:
do you need to import it as you can manipulate with it without importing...

http://www.motobit.com/tips/detpg_asp-dbf-database/

if you want it in your database can you create table and then

insert into New_table
select * from DBF




0
 
AJDeveloperAuthor Commented:
Actually ,yes i need the importing ,but if use the query ,then i must refer to the location of the DB ?
0
 
Haris DjulicCommented:
yes if you are going to query it you need to refer to the location ...

since the access import is giving you trouble than maybe this could be workaround...
0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
AJDeveloperAuthor Commented:
Can you please list the steps to do that ,i now try to open the DBF file ,it gives me back error ,that MS Jet engine is not finding the object
0
 
Haris DjulicCommented:
here is the snipplet how to open and get count from the dbf..

could you try it... just to check is it working with your dbf
Private Sub Command0_Click()
Dim Conn: Set Conn = CreateObject("ADODB.Connection")
Dim rst As Recordset
Set rst = New ADODB.Recordset
 
  Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
                   "Data Source=C:\dbf\;" & _
                   "Extended Properties=""DBASE IV;"";"
  Set OpenDBFConn = Conn
 
 rst.Open "select count(*)as x from [test#DBF]", Conn
 
  MsgBox rst!x
  
End Sub

Open in new window

0
 
AJDeveloperAuthor Commented:
thanks for the code but why Im receiving the error that MS jet enginer can not find object (DataBaseName0
0
 
Haris DjulicCommented:
can you paste you code and path to your dbf file...
0
 
Jim P.Commented:
In Access 2000 and above they locked out a lot of direct linking to DBase/Foxpro databases.

Have you tried creating an ODBC connection to the DBF file(s) and then linking them via the ODBC?
0
 
AJDeveloperAuthor Commented:
No ,actully what im doing i have the db on my desktop and then I open the access and create a new db and them from import from external source ,then I get the error
0
 
Jim P.Commented:
>> No ,actully what im doing i have the db on my desktop ....

It is stupid, but TPTB at M$ decreed it needed to be done this way. Create an ODBC connection to the dBase files using the Microsoft dBase Driver or  Microsoft dBase VFP Driver and then link using the ODBC call and you should be able to import fine.
0
 
AJDeveloperAuthor Commented:
I think there is nothing stupid about this ,it is simple ,a user is experiencing this issue ,and I want to know why this issue happens in the way ,and why the import process is generating that error,anyway i will try what you advised and let u know
0
 
AJDeveloperAuthor Commented:
hi again ,sorry for the delay ,I tired the code ,but it gives me error ,I really appreciate if someone could provide me with all the steps form A to Z to import the dbf programatically or at least me let me know what went wrong in the import

Cheers
0
 
AJDeveloperAuthor Commented:
and more interesting ,is that i can import the file to excel with no issue ,please help
0
 
AJDeveloperAuthor Commented:
The file name has space and I made it one word ,but im getting another '
External table is not in the expected format. (Error 3274) '
0
 
AJDeveloperAuthor Commented:
anybody please help on the above
0
 
Jim P.Commented:
Do you have the table linked in? If you change the columns or index order, you have to delete the link and then link it back in.
0
 
AJDeveloperAuthor Commented:
The table is not linked and i dont know how i can the columns if I cant import it
0
 
AJDeveloperAuthor Commented:
My last post was before 2 weeks and still didnt get any feedback ,is there a problem with the site
0
 
Jim P.Commented:
>> External table is not in the expected format. (Error 3274) '

Let's start from scratch: From the ODBC Administrator (Start--> Run --> ODBCAD32.exe) create a System DSN(s) for the Foxpro files you want to import.

Then after you create the ODBC, go into the Access DB and Right-Click in the database window and select Link Tables. Then in the files of type select ODBC databases. It will bring up the dialog and then select the link/tables you want.

From there you should be able to read them.
0
 
AJDeveloperAuthor Commented:
Perfect ,it works ,thanks alot
0
 
Jim P.Commented:
Glad to be of assistance. May all your days get brighter and brighter.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 12
  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now