RE: [dbi] ODBC and tables 'v' views



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
.



Relevant Pages

  • Re: One App license on TS
    ... I think Martin is also wondering about metering the application, ... >> we have some graphics software, that only has one license, is it possible ... >> to restrict TS to only let one instance of the software run at once? ...
    (microsoft.public.windows.terminal_services)
  • Re: Another article about Latvian migration
    ... take note and press for the UK and Ireland to restrict entry..." ... Cute, Martin. ... I would say "fuck yourself up the ass with a broken ...
    (soc.culture.baltics)
  • Re: Another article about Latvian migration
    ... Peteris Cedrin? ... > take note and press for the UK and Ireland to restrict entry..." ... > Cute, Martin. ...
    (soc.culture.baltics)
  • Re: Alan Turings Halting Problem is Incorrect (FINAL PART)
    ... >> Notice that limits are not relative to other entities. ... >Try limited and limitation, they are closer in my dictionary. ... To confine or restrict within a boundary or bounds. ... Martin ...
    (sci.logic)