CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2001
    Posts
    1

    Creating DBF file with ADOX

    Has anyone out there had any success in creating a .DBF file through ADOX? My biggest need right now is to create additional records in an existing database. You're help is greatly appreciated

    Thanks in advance,

    Eric Howard
    Synergis Technologies


  2. #2
    Join Date
    Feb 2000
    Posts
    440

    Re: Creating DBF file with ADOX

    Dear Eric,

    What you need is a OLEDB Provider that have all ADOX interfaces implemented. Currently on the scene there are two of them that worth it.

    The first one is advantage oledb provider.

    "The Advantage OLE DB Provider creates a seamless interface between Advantage Database Server and any data access platform or development environment that can use Microsoft ActiveX Data Objects (ADO) or OLE DB directly..."

    here is url:

    http://www.advantagedatabase.com/ADS...ads.htm#client

    The other one you may want to try is Apollo provider from vista software:

    http://www.vistasoftware.com/apollo_asp.asp

    I personally prefer advantage as they have implemented sql engine, single as well as multiple order indexes etc.

    Also they have a killer uility named Advantage Database Architect. You can open dbf's with and manuipulate it in an interface similar to the access i.e. you can write sql quieries etc.

    I am not sure if they have done ADOX to the full yet but I am sure that you can create dbf's structures and index using sql statements "CREATE TABLE.." etc.

    If I can help you drop me a message.



    Valery Iskarov Nikolov
    http://listen.to/quark

  3. #3
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Creating DBF file with ADOX

    Connection for dbf
    example

    On Error GoTo ErrorHandler
    Dim sConn As String

    sConn = "Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=" & DBFPATH & ";"

    Set cnD = New ADODB.Connection
    cnD.ConnectionString = sConn
    cnD.Open sConn
    Exit Sub

    ErrorHandler:
    If Err.Number = -2147467259 Then
    MsgBox "Unspecified error"
    End
    Else
    MsgBox Err.Number & " " & Err.Description
    End If



    after thast I believe you canexecute SQL to CREATE TABLE on the connection object


    cnD.Execute sSQL


    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured