Link to home
Start Free TrialLog in
Avatar of AJDeveloper
AJDeveloper

asked on

Data unreadable after importing DBF into acess 2003

DBF database imported into access 2003 is done successfully ,but the data are rubbish ,any idea
Avatar of Haris Dulic
Haris Dulic
Flag of Austria image

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




Avatar of AJDeveloper
AJDeveloper

ASKER

Actually ,yes i need the importing ,but if use the query ,then i must refer to the location of the DB ?
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...
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
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

thanks for the code but why Im receiving the error that MS jet enginer can not find object (DataBaseName0
can you paste you code and path to your dbf file...
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?
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
>> 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.
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
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
and more interesting ,is that i can import the file to excel with no issue ,please help
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) '
anybody please help on the above
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.
The table is not linked and i dont know how i can the columns if I cant import it
My last post was before 2 weeks and still didnt get any feedback ,is there a problem with the site
ASKER CERTIFIED SOLUTION
Avatar of Jim P.
Jim P.
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Perfect ,it works ,thanks alot
Glad to be of assistance. May all your days get brighter and brighter.