ADOX catalog problem

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default ADOX catalog problem

    I am trying to display column information and I'm running into a
    problem.

    I can display

    column.properties("Autoincrement").name
    column.properties("Autoincrement").type
    column.properties("Autoincrement").attributes

    but when I attempt to display:

    column.properties("Autoincrement").value

    IIS (or SQL 2000) is giving me the following error:

    ADODB.Property error '800a0cb3'
    Object or provider is not capable of performing requested operation.

    I am using the following:

    cst = "provider=SQLOLEDB;network=DBMSSOCN;"
    cst = cst & "uid=" & username & ";pwd=" & password & ";"
    cst = cst & "server=" & servername & ",1433;database=" & database

    tablename = request.QueryString

    set adoxConn = Server.CreateObject("ADOX.Catalog")
    set adodbConn = Server.CreateObject("ADODB.Connection")
    adodbConn.open cst
    adoxConn.activeConnection = adodbConn
    set table = adoxConn.Tables(tablename)

    for each col in table.columns
    response.write col.name & ", "
    response.write col.properties("Autoincrement").value & "<br />"
    next

    set table = nothing
    adodbConn.close: set adodbConn = nothing
    set adoxConn = nothing

    The table has two columns in it for testing. One is an Integer which
    has the Autoincrement property set to YES and the other is an Integer
    with the Autoincrement property set to NO.

    Thanks for any help that anyone can provide.

    --Dave
    Dave Navarro Guest

  2. Similar Questions and Discussions

    1. adox asp ms access delete a column from a table
      Hi folx - Here is the code I'm trying (but it errors out with "Item cannot be found in the collection corresponding to the requested name or...
    2. ADOX - how do I select a table by name in order to read which fields it has?
      Hi - I'm finding tons of examples out there on how to create a table or enumerate thru tables and same with fields but what if I just want to...
    3. How to get the lenght of an Access database using ADOX
      I want to administer a remote Access database using ASP. I use the ADOX setup. I am able to list the tables, the fields in each table, the field...
    4. using Access queries using ADOX
      Hello, I have the following code in an asp 3.0 page: Dim dbConn As adodb.Connection Dim cat As ADOX.Catalog Dim view As ADOX.view Set dbConn...
    5. ADOX reference
      Can anyone point me to an online reference for ADOX? I am trying to get deep into the datatypes in a table from within my ASP page. Thanks! ...
  3. #2

    Default Re: ADOX catalog problem

    I suppose the provider is not able to return those values by design. (??)
    How about using SQL DMO? Something like:


    Set oDMO = Server.CreateObject("SQLDMO.SQLSErver")
    oDMO.Connect servername, username, password
    Set oDB = oDMO.Databases(database)
    Set oTable = oDB.Tables(tablename)

    for each col in oTable.Columns
    response.write col.Name & ", "
    response.write col.Properties("Identityincrement").value & "<br />"
    next

    Set oTable = Ntohing
    Set oDB = Nothing
    oDMO.Close
    Set oDMO = Nothing

    Ray at home

    --
    Will trade ASP help for SQL Server help


    "Dave Navarro" <dave@dave.dave> wrote in message
    news:MPG.19a36359ed12b3bc989749@news-east.giganews.com...
    > I am trying to display column information and I'm running into a
    > problem.
    >
    > I can display
    >
    > column.properties("Autoincrement").name
    > column.properties("Autoincrement").type
    > column.properties("Autoincrement").attributes
    >
    > but when I attempt to display:
    >
    > column.properties("Autoincrement").value
    >
    > IIS (or SQL 2000) is giving me the following error:
    >
    > ADODB.Property error '800a0cb3'
    > Object or provider is not capable of performing requested operation.
    >
    > I am using the following:
    >
    > cst = "provider=SQLOLEDB;network=DBMSSOCN;"
    > cst = cst & "uid=" & username & ";pwd=" & password & ";"
    > cst = cst & "server=" & servername & ",1433;database=" & database
    >
    > tablename = request.QueryString
    >
    > set adoxConn = Server.CreateObject("ADOX.Catalog")
    > set adodbConn = Server.CreateObject("ADODB.Connection")
    > adodbConn.open cst
    > adoxConn.activeConnection = adodbConn
    > set table = adoxConn.Tables(tablename)
    >
    > for each col in table.columns
    > response.write col.name & ", "
    > response.write col.properties("Autoincrement").value & "<br />"
    > next
    >
    > set table = nothing
    > adodbConn.close: set adodbConn = nothing
    > set adoxConn = nothing
    >
    > The table has two columns in it for testing. One is an Integer which
    > has the Autoincrement property set to YES and the other is an Integer
    > with the Autoincrement property set to NO.
    >
    > Thanks for any help that anyone can provide.
    >
    > --Dave

    Ray at Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139