Re: Possible to get field names and types in a table without executing a query?



On 6/27/06, Jordan Sissel <psionic@xxxxxxxxx> wrote:


iirc, you can use $dbh->table_info() or tables() or type_info() functions to
pull that information without having to do a hack where you select 0 rows
just to poll for column names.

Right?

Yes. Unless you want the information for a particular query you are
executing. Then use the hack method.

But I've jsut done some tests and discovered that $sth->{TYPE} returns
numbers which then have to be applied to $dbh->type_info(). And that
function will return multiple entries for many types, which may not be
useful...

For accuracy on single tables, use the functions. For queries, use the hack.



-Jordan




--
Matthew O. Persico
.



Relevant Pages

  • RE: Access 07 Use multiselect listbox to filter report
    ... Based on the error you are receiving, it sounds as if the hack is executing ... "Select ItemNumber & ItemColor As ItemNumberColor, ItemNumber, ItemColor ... You no longer need the hack. ...
    (microsoft.public.access.formscoding)
  • Using Integrated Security
    ... I have a Login.asp page to authenticate the users to my Web ... Is it possible for someone to hack into the Login.asp page ... sExternalUserName = objSecurity ... What will the value of the REMOTE_USER variable be after executing the ...
    (microsoft.public.inetserver.iis.security)
  • How to determine which CPU a thread is executing on?
    ... Does anyone know of a programatic method (or hack) ... to determine which CPU a thread is currently executing on? ...
    (comp.os.linux.misc)