dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: How can I open Dbase IV file in VB?

  1. #1
    Join Date
    Sep 1999
    Location
    China
    Posts
    3

    How can I open Dbase IV file in VB?

    I want to use a DBase IV file in VB, PLS teach me how to write it?


  2. #2
    Join Date
    Aug 1999
    Location
    India-Delhi
    Posts
    106

    Re: How can I open Dbase IV file in VB?

    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

  3. #3
    Join Date
    Sep 1999
    Location
    China
    Posts
    3

    I want to use it not only for control,but also as a recordset.

    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?


  4. #4
    Join Date
    Aug 1999
    Location
    India-Delhi
    Posts
    106

    Re: I want to use it not only for control,but also as a recordset.

    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

  5. #5
    Join Date
    Aug 1999
    Location
    Srilanka
    Posts
    25

    connect at run time

    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


  6. #6
    Join Date
    Sep 1999
    Location
    China
    Posts
    3

    I am sorry, would you please tell me that in detail?

    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?


  7. #7
    Join Date
    Jul 2000
    Posts
    110

    Re: How can I open Dbase IV file in VB?

    Try this high performance DBF engine: (VB source code include)
    http://www.banasoft.com/DownLoad/BNxBase.exe


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)