Ask a Question related to ASP Database, Design and Development.
-
Scotter #1
ASP/Access 2002: how do I get column names from table (in order) using OLE DB?
When I use ADOX to get columns(fields) of a table, they are *auto-sorted
alphabetically by name*.
I need to get the list of field names as they appear when I open the MDB
file and view details of the table, *not* sorted by field name
alphabetically.
I tried using open schema with following code causing this error msg: "Item
cannot be found in the collection corresponding to the requested name or
ordinal"
Set rsSchema = conn.OpenSchema(4, Array(Empty, Empty, "config"))
rsSchema.Sort = "ORDINAL_POSITION"
Thanks!
--
Scotter
Scotter Guest
-
Pulling table column names
How can I pull table column names? I would like to put then in menu / cfselect statment. Thanks, Matthew -
querying field / column names in Access table
I got great info on my last post, so let's try this one and see if my luck is still good: I have an Access table with about 30+ columns / fields... -
ASP/Access2002: how do I get column names from table (in order) using OLE DB?
When I use ADOX to get columns(fields) of a table, they are auto-sorted alphabetically by name. I need to get the list of field names as they... -
Access table names
That depends on exactly what you are doing. But basically 'work' is a keyword, which is why the problem occurs. If you reference it as it... -
asp get Table Column ( Show Active Users Names Logged On )
Hello; I know how to get a "Database Table" with ASP. But what I am trying to get is the Table Column. This is what I am needing. ( Could... -
[MSFT] #2
RE: ASP/Access 2002: how do I get column names from table (in order) using OLE DB?
Hi Scotter,
Have you set the cursor's location to client side? I have tested following
code and it seems to work:
Dim rsSchema
Dim cnn
Set cnn = CreateObject("ADODB.connection")
cnn.CursorLocation = 3
cnn.Provider = "Microsoft.Jet.OLEDB.4.0;"
cnn.Open "Data Source=C:\db1.mdb;"
Set rsSchema = cnn.OpenSchema(4, Array(Empty, Empty, "table1"))
rsSchema.Sort = "ORDINAL_POSITION"
Luke
[MSFT] Guest
-
Aaron [SQL Server MVP] #3
Re: ASP/Access 2002: how do I get column names from table (in order) using OLE DB?
Why do you keep posting the same message multiple times? Hitting send once
is usually sufficient.
[url]http://www.aspfaq.com/search.asp?q=schema[/url]
--
[url]http://www.aspfaq.com/[/url]
(Reverse address to reply.)
"Scotter" <spam@spam.com> wrote in message
news:YF5Ec.33065$w3.6459@fe2.texas.rr.com..."Item> When I use ADOX to get columns(fields) of a table, they are *auto-sorted
> alphabetically by name*.
> I need to get the list of field names as they appear when I open the MDB
> file and view details of the table, *not* sorted by field name
> alphabetically.
> I tried using open schema with following code causing this error msg:> cannot be found in the collection corresponding to the requested name or
> ordinal"
> Set rsSchema = conn.OpenSchema(4, Array(Empty, Empty, "config"))
> rsSchema.Sort = "ORDINAL_POSITION"
> Thanks!
> --
> Scotter
>
>
Aaron [SQL Server MVP] Guest
-
Scotter #4
Re: ASP/Access 2002: how do I get column names from table (in order) using OLE DB?
Thanks! Yeah problem was I left out the cursorlocation=3
"[MSFT]" <lukezhan@online.microsoft.com> wrote in message
news:47kIARbXEHA.3788@cpmsftngxa10.phx.gbl...> Hi Scotter,
>
> Have you set the cursor's location to client side? I have tested following
> code and it seems to work:
>
> Dim rsSchema
> Dim cnn
>
> Set cnn = CreateObject("ADODB.connection")
>
> cnn.CursorLocation = 3
> cnn.Provider = "Microsoft.Jet.OLEDB.4.0;"
> cnn.Open "Data Source=C:\db1.mdb;"
>
> Set rsSchema = cnn.OpenSchema(4, Array(Empty, Empty, "table1"))
> rsSchema.Sort = "ORDINAL_POSITION"
>
>
> Luke
>
Scotter Guest



Reply With Quote

