Link to home
Start Free TrialLog in
Avatar of amannien
amannien

asked on

Create a dBase file with Visual Basic 6

I have to write code to randomly generate dBase3/4 files with various structures.
I need to do this in real code.

How to connect to an existing dBase file is known, i just cannot create a new one.

So Please help me with an example
Avatar of VoiceOfDissent
VoiceOfDissent

DoCmd.TransferDatabase acExport, "dBase IV", [FORMNAME].Pathname, acTable, strQryName, [FORMNAME].PathName & "OUTPUTNAME.dbf"

This code would require you to reference the Access 9.0 (8.0?) library.

Also, I have presented it in Microsoft Access format to you, but it easily remedied into Visual Basic.  Hopefully this can at least get you started.
Avatar of amannien

ASKER

Sorry i am fairly new ti visual basic.

I read your example but i dont quite understand it.

Could you please give me another hint?

The database is openend and is tranferred to antoher database, type dbase4, including the 'table' and written to 'outputname.dbf'.

The abbreveation 'ac' in actable and acexport. What do you mean with that?



ASKER CERTIFIED SOLUTION
Avatar of TimCottee
TimCottee
Flag of United Kingdom of Great Britain and Northern Ireland 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
THANKS!