hi can n e 1 tell me if there's a way to get the column properties from a
table?
properties like caption, description etc

thank you

Re: Retrieving table field properties by Ray

Ray
Thu Jun 10 09:38:22 CDT 2004

What kind of database?

Ray at work

"hytga" <StopSpams@to.me> wrote in message
news:wpQxc.53959$_k3.1352154@bgtnsc05-news.ops.worldnet.att.net...
> hi can n e 1 tell me if there's a way to get the column properties from a
> table?
> properties like caption, description etc
>
> thank you
>
>



Re: Retrieving table field properties by Curt_C

Curt_C
Thu Jun 10 10:13:03 CDT 2004

look here perhaps for an idea
http://www.darkfalz.com/1065

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com


"hytga" <StopSpams@to.me> wrote in message
news:wpQxc.53959$_k3.1352154@bgtnsc05-news.ops.worldnet.att.net...
> hi can n e 1 tell me if there's a way to get the column properties from a
> table?
> properties like caption, description etc
>
> thank you
>
>



Re: Retrieving table field properties by hytga

hytga
Thu Jun 10 11:23:11 CDT 2004


> What kind of database?
MS Access



Re: Retrieving table field properties by hytga

hytga
Thu Jun 10 12:48:11 CDT 2004


> look here perhaps for an idea
> http://www.darkfalz.com/1065

well it comes close to what i need. here's what i've been trying to do
but the below code gives error

Error Type:
ADODB.Properties (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name
or ordinal.




<!-- connection is already open ud_conn-->

' retrieve fields
set rsMyAcct=Server.CreateObject("ADODB.Recordset")
strSQL="SELECT * FROM [Users] WHERE Usr_ID='" & UCASE(userid) & "'"
rsMyAcct.Open strSQL , ud_Conn

Set rsProp = Server.CreateObject("ADOX.Catalog")
rsProp.ActiveConnection = ud_conn

if not rsMyAcct.eof then
For each Field in rsMyAcct.Fields

THIS IS THE ERROR LINE>>>>>>> response.write
rsProp.Tables("Users").Columns(Field.Name).Properties("Description").Value
& "<br>"

next
end if


Set rsProp= nothing
rsMyAcct.Close
Set rsMyAcct = Nothing



-----------------
n e ideas?



Re: Retrieving table field properties by Bob

Bob
Thu Jun 10 12:57:06 CDT 2004

hytga wrote:
> hi can n e 1 tell me if there's a way to get the column properties
> from a table?
> properties like caption, description etc
>
> thank you

You will not be able to get at all of these properties via ADO. Caption and
Description are Access-defined properties. Description is exposed by the Jet
OLEDB provider; Caption is not. You need to keep in mind that Access is not
the database: Jet is the database. Access is a front-end tool for working
with Jet databases. One of the things Access to make it easier for users is
add properties to the database that Jet does not provide. Some of these
properties are exposed by the Jet OLEDB provider, and some are not.

Most of the other column properties can be read using ADOX, which is
installed with ADO. See here for a start:
http://www.aspfaq.com/show.asp?id=2244

See here for the Jet database properties that can be read using ADOX:
http://msdn.microsoft.com/library/en-us/ado270/htm/mdrefjetprovspec.asp

HTH,
Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.



Re: Retrieving table field properties by Curt_C

Curt_C
Thu Jun 10 14:49:13 CDT 2004

Saw your other post, It's for SQL, not Access.
Sorry.

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com


"hytga" <StopSpams@to.me> wrote in message
news:v91yc.40363$Gx4.9033@bgtnsc04-news.ops.worldnet.att.net...
>
> > look here perhaps for an idea
> > http://www.darkfalz.com/1065
>
> well it comes close to what i need. here's what i've been trying to do
> but the below code gives error
>
> Error Type:
> ADODB.Properties (0x800A0CC1)
> Item cannot be found in the collection corresponding to the requested name
> or ordinal.
>
>
>
>
> <!-- connection is already open ud_conn-->
>
> ' retrieve fields
> set rsMyAcct=Server.CreateObject("ADODB.Recordset")
> strSQL="SELECT * FROM [Users] WHERE Usr_ID='" & UCASE(userid) & "'"
> rsMyAcct.Open strSQL , ud_Conn
>
> Set rsProp = Server.CreateObject("ADOX.Catalog")
> rsProp.ActiveConnection = ud_conn
>
> if not rsMyAcct.eof then
> For each Field in rsMyAcct.Fields
>
> THIS IS THE ERROR LINE>>>>>>> response.write
> rsProp.Tables("Users").Columns(Field.Name).Properties("Description").Value
> & "<br>"
>
> next
> end if
>
>
> Set rsProp= nothing
> rsMyAcct.Close
> Set rsMyAcct = Nothing
>
>
>
> -----------------
> n e ideas?
>
>



Re: Retrieving table field properties by hytga

hytga
Fri Jun 11 00:12:06 CDT 2004


"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
news:OTfqZRxTEHA.3368@TK2MSFTNGP11.phx.gbl...
> hytga wrote:
> > hi can n e 1 tell me if there's a way to get the column properties
> > from a table?
> > properties like caption, description etc
> >
> > thank you
>
> You will not be able to get at all of these properties via ADO. Caption
and
> Description are Access-defined properties. Description is exposed by the
Jet
> OLEDB provider; Caption is not. You need to keep in mind that Access is
not
> the database: Jet is the database. Access is a front-end tool for working
> with Jet databases. One of the things Access to make it easier for users
is
> add properties to the database that Jet does not provide. Some of these
> properties are exposed by the Jet OLEDB provider, and some are not.
>
> Most of the other column properties can be read using ADOX, which is
> installed with ADO. See here for a start:
> http://www.aspfaq.com/show.asp?id=2244
>
> See here for the Jet database properties that can be read using ADOX:
> http://msdn.microsoft.com/library/en-us/ado270/htm/mdrefjetprovspec.asp
>
> HTH,
> Bob Barrows
>
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>



Re: Retrieving table field properties by hytga

hytga
Fri Jun 11 00:12:32 CDT 2004

Thank you i'll give it a try