Click to See Complete Forum and Search --> : How can I open Dbase IV file in VB?


wangwien
September 20th, 1999, 08:39 PM
I want to use a DBase IV file in VB, PLS teach me how to write it?

santulan
September 21st, 1999, 03:52 AM
hi...
Use DAO ( Data Access Object ). Data Control OCX. Rememeber following -
1. In Connect Property select Dbase IV. (This is a combo type selection)
2. In database name, select only that sub-directory where dbase files resides.
3. In recordsource property please use the actual dbf file.
4. After that you can access its fields by simply binding then to any text box, etc controls.



Santulan

wangwien
September 22nd, 1999, 03:38 AM
I want to use the Dbase IV file as Access a recordset, I can add, edit, Delete.Search and so on,Can I do it?

santulan
September 22nd, 1999, 03:53 AM
Yes! you can do it. Once it is recordset, you can apply any valid operation. Just do it. recordset.add
recordset.edit
all commands will work fine. Just give a try. :-)
Same time, find possibilities to convert the stuff into minimum Access... if possible.


Santulan

Amendra
September 22nd, 1999, 09:07 AM
Do you know the exact method of connecting to a dbase file's at runtime. I tried using the format given in the help, but this doesn't work.

Amendra

wangwien
September 22nd, 1999, 07:54 PM
I use this code to open a Access file:
Set Data_Merge = OpenDatabase("c:\merge\merge.mdb")
Set RS_Merge = Data_Merge.OpenRecordset("select * from merge")

It work very well. When I want to use a another Dbase IV file, I use code like follow:
Set Data_Merge = OpenDatabase("c:\merge\dbase4.dbf")
But at runtime return a wrong "Unrecongnized database format". PLS teach me how I change the code and let the programme run?

Un1
July 10th, 2001, 07:42 AM
Try this high performance DBF engine: (VB source code include)
http://www.banasoft.com/DownLoad/BNxBase.exe