RE: [dbi] ODBC and tables 'v' views
- From: martin.evans@xxxxxxxxxxxx (Martin J. Evans)
- Date: Thu, 23 Jun 2005 09:32:39 +0100 (BST)
The last two arguments to SQLTables can take a string containing the types you
want:
SQLTables(stmt_handle,
NULL, 0, /* no specific catalog */
NULL, 0, /* no specific schema */
NULL, 0, /* no specific table */
NULL, 0) /* no specific type - table or view */
To restrict the result-set to only tables (no views):
SQLTables(stmt_handle,
NULL, 0, /* no specific catalog */
NULL, 0, /* no specific schema */
NULL, 0, /* no specific table */
"TABLE", SQL_NTS) /* only tables, no views */
I think there is an equivalent in DBD::ODBC.
Martin
--
Martin J. Evans
Easysoft Ltd, UK
Development
On 23-Jun-2005 Ron Savage wrote:
> Hi Folks
>
> Sorry if you've seen this, but I did not receive a copy.
>
> (This is under WinXP, with a DSN pointing to an MS Access db).
>
> Is there an ODBC function call, or anything, which will distinguish between
> tables and views?
>
> I looked at DBI::Const::GetInfo::ODBC, and tried $dbh -> get_info(19) for
> SQL_ACCESSIBLE_TABLES and -> get_info(149) for SQL_INFO_SCHEMA_VIEWS
> but they returned 0 and 'Y' (I think - I'm at home now) respectively.
>
> --
> Cheers
> Ron Savage, ron@xxxxxxxxxxxxx on 23/06/2005
> http://savage.net.au/index.html
> Let the record show: Microsoft is not an Australian company
.
- References:
- ODBC and tables 'v' views
- From: Ron Savage
- ODBC and tables 'v' views
- Prev by Date: ODBC and tables 'v' views
- Next by Date: Re: DBD::Oracle make test fails, undefined symbol: ociepgoe, oracle client 8.0.5
- Previous by thread: ODBC and tables 'v' views
- Next by thread: Re: DBD::Oracle make test fails, undefined symbol: ociepgoe, oracle client 8.0.5
- Index(es):
Relevant Pages
|
|