Create Linked Table in MS-Access DB on web server

BarclayVision

getting error when trying to create linked table in access DB on web server - error is on the ADOX.Catalog not sure if I need to inherit ADOX or how?

error is:

Compiler Error Message: BC30002: Type 'ADODB.Catalog' is not defined.

Protected Sub Page_Load(ByVal sender As Object, _
                        ByVal e As System.EventArgs) Handles Me.Load

            ''''''''''''''''''''''''''''''''''''''''''''''''''''
            Dim A As String = "e:\web\Training.mdb"
            Dim B As String = "e:\web\LeaveDB.mdb"
            Dim C As String = "UsersDataTbl"
            Dim D As String = "NewUsers"

            CreateLinkedAccessTable(A,B,C,D)
            End Sub             


            Sub CreateLinkedAccessTable(strDBLinkFrom As String, strDBLinkTo As String, strLinkTbl As String, strLinkTblAs As String)

                Dim catDB As ADOX.Catalog
                Dim tblLink As ADOX.Table

                Set catDB = New ADOX.Catalog
                    ' Open a Catalog on the database in which to create the link.
                catDB.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
                "Data Source=" & strDBLinkFrom

                Set tblLink = New ADOX.Table
                With tblLink
                    ' Name the new Table and set its ParentCatalog property to the
                    ' open Catalog to allow access to the Properties collection.
                .Name = strLinkTblAs
                Set .ParentCatalog = catDB

                    ' Set the properties to create the link.
                .Properties("Jet OLEDB:Create Link") = True
                .Properties("Jet OLEDB:Link Datasource") = strDBLinkTo
                .Properties("Jet OLEDB:Remote Table Name") = strLinkTbl
                End With

                    ' Append the table to the Tables collection.
                catDB.Tables.Append tblLink

                Set catDB = Nothing
            End Sub
Gord Thompson

In order to use ADOX you need to open your ASP.NET project and add the following COM reference:

Microsoft ADO Ext. 2.8 for DDL and Security

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Create Linked Table in MS-Access DB on web server

From Dev

Customizing the table linked to SQL Server in MS Access

From Dev

In MS Access SQL Server Linked Table pass through query

From Dev

Not able to create MS SQL Server Linked server

From Dev

Access linked server table collation

From Dev

MS Access, update query will not update a linked table

From Dev

MS Access Linked Table Not Updating New Fields

From Dev

MS Access Linked Tables to SQL Server

From Dev

Table Query from an Access MS DB

From Dev

MS Access ?: How to pull information into a table from another linked table

From Dev

MS Access Create Table is Truncating Memo Field

From Dev

Create choicebox for MS Access 2013 Table cell

From Dev

Syntax Error in CREATE TABLE Statement in MS Access

From Dev

Syntax error in Create Table Statement MS Access

From Dev

How to add row to MS Access table which linked to another tables?

From Dev

MS Access: read-only linked tables from SQL Server?

From Dev

MS SQL: What is the easiest/nicest way to create a linked server with SSMS?

From Dev

MS SQL: What is the easiest/nicest way to create a linked server with SSMS?

From Dev

Linked Table in MS Word

From Dev

MS 2010 Access Primary Key changes upon DB publication to the web?

From Dev

MS Access SQL Server DB - Query Syntax for CAST Function

From Dev

MS Access SQL Server DB - Query Syntax for CAST Function

From Dev

MS Access DB Instance getting corrupted when put on shared server

From Dev

MS Access db error

From Dev

MS SQL Server, Create and update a table based on another table

From Dev

Access 97 Frontend - SQL Server 2005 Backend Linked Table Error

From Dev

Linked Table from SQL Server to Access has trailing spaces

From Dev

Translate SQL Server CREATE TABLE into Access

From Dev

Create multiple records in a table using 1 form in MS Access 2013

Related Related

  1. 1

    Create Linked Table in MS-Access DB on web server

  2. 2

    Customizing the table linked to SQL Server in MS Access

  3. 3

    In MS Access SQL Server Linked Table pass through query

  4. 4

    Not able to create MS SQL Server Linked server

  5. 5

    Access linked server table collation

  6. 6

    MS Access, update query will not update a linked table

  7. 7

    MS Access Linked Table Not Updating New Fields

  8. 8

    MS Access Linked Tables to SQL Server

  9. 9

    Table Query from an Access MS DB

  10. 10

    MS Access ?: How to pull information into a table from another linked table

  11. 11

    MS Access Create Table is Truncating Memo Field

  12. 12

    Create choicebox for MS Access 2013 Table cell

  13. 13

    Syntax Error in CREATE TABLE Statement in MS Access

  14. 14

    Syntax error in Create Table Statement MS Access

  15. 15

    How to add row to MS Access table which linked to another tables?

  16. 16

    MS Access: read-only linked tables from SQL Server?

  17. 17

    MS SQL: What is the easiest/nicest way to create a linked server with SSMS?

  18. 18

    MS SQL: What is the easiest/nicest way to create a linked server with SSMS?

  19. 19

    Linked Table in MS Word

  20. 20

    MS 2010 Access Primary Key changes upon DB publication to the web?

  21. 21

    MS Access SQL Server DB - Query Syntax for CAST Function

  22. 22

    MS Access SQL Server DB - Query Syntax for CAST Function

  23. 23

    MS Access DB Instance getting corrupted when put on shared server

  24. 24

    MS Access db error

  25. 25

    MS SQL Server, Create and update a table based on another table

  26. 26

    Access 97 Frontend - SQL Server 2005 Backend Linked Table Error

  27. 27

    Linked Table from SQL Server to Access has trailing spaces

  28. 28

    Translate SQL Server CREATE TABLE into Access

  29. 29

    Create multiple records in a table using 1 form in MS Access 2013

HotTag

Archive