Ask a Question related to ASP Database, Design and Development.
-
Dave Navarro #1
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
-
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... -
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... -
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... -
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... -
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! ... -
Ray at #2
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



Reply With Quote

