Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export MDB to DBF using visual basic 6 2

Status
Not open for further replies.

Paulvtis

MIS
Aug 1, 2002
36
PH
hi everyone! im new in programming vb. can anyone help me how to export mdb to dbf. thanks!
 

Open an mdb file goto a module (create one if none) and search for Access automation. Look for OpenCurrentDatabase method, in order to use DoCmd.TransferDatabase Method.
 
Another way of you don't have Access....

Use ADO to open connections to the Access database and the (FoxPro?) database (you can find examples of connection strings at Open a recordset to the Access table, open an updateable recordset to the DBF table.

Loop through the Access recordset, add each record to the DBF recordset.
 
<FoxPro?

The two Jet-supported ISAM databases that have .dbf files are Foxpro and dBase.
 
That's why I put the question mark, I wasn't sure if DBF=FoxPro.

 
sorry if i didnt make it clear..
DBF = Foxpro

what i do is i get data from our sql server and put it in the table of access database. then from that specific table of access database, i want to export or convert or save it to dbf(Foxpro) file.

iam using vb6.

thanks for the help guys!
 
Ok. You can either do what Jerry says to do or do what Joe says to do. Jerry's solution requires an Access license somewhere to work, whereas Joe's does not. Basically, Jerry is saying to use VB's Access Automation to automatically open up Access and use it to export the data into Foxpro, while Joe is saying to use VB and ADO to open up the Access table and the Foxpro table and use VB and ADO to transfer the data directly.

But, I really don't understand why you're doing that! If you get data from an SQL Server database to begin with, you can just pull the Foxpro table directly from there, using the same technique that Joe describes.

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top