To connect ms access database without alias

  • How can I connect to MS ACCESS database without using alias (CBuilder, BDE).

    I write:

    db->DriverName="MSACCESS";

    db->Params->Add("DATABASE NAME=c:\mybase.mdb");

    Got a failure.

    When I did so with MS SQL Server base, I had success.

  • This was removed by the editor as SPAM

  • I believe you can tell Access that the default driver is Access by putting a semicolon in front of the connect string.

        Dim tdfLinked As TableDef        

        Set tdfLinked = dbsTemp.CreateTableDef("Table")

        tdfLinked.Connect = ";Database=c:\mybase.mdb"

        tdfLinked.SourceTableName = "TableName"

        CurrentDb.TableDefs.Append tdfLinked

    Richard

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply