[prev in list] [next in list] [prev in thread] [next in thread]
List: dbi-dev
Subject: Re: problems with data dictyonary functions
From: nicholas.winters () ubs ! com
Date: 1998-06-30 15:37:43
[Download RAW message or body]
*** From dbi-users -- To unsubscribe, see the end of this message. ***
["PUBLIC:" (text/plain)]
Hi,
Why haven't you read the DBI documentation?
@col = @{$cursor->{NAME}};
Nick
______________________________ Reply Separator _________________________________
Subject: PUBLIC: problems with data dictyonary functions
Author: isherlu at zhux/DD.RFC-822=isherlu@epsa.upv.es
Date: 29/06/98 10:56
*** From dbi-users -- To unsubscribe, see the end of this message. ***
hello;
i'm trying to get some information about the table in any database, by
that i'm using
the data dictionary functions like " info_col_names,info_col,...." , but
i recive this error:
Can't locate object method "info_col" via package "DBI::db"
here is my script:
require 5.004;
use DBI 0.90;
$dbh = DBI->connect('dbi:ODBC:acces', '', '', { RaiseError => 1 });
$cursor = $dbh->prepare("SELECT * FROM productos");
$cursor->execute;
while (@row = $cursor->fetchrow_array) {
print "$row[0]\t$row[1]\t$row[2]\n\n";
}
#$rv= $dbh->err;
#print $rv;
#@col = $dbh->info_col_names(productos);
#print @col;
%tip = $dbh->info_col(productos,nombre);
print %tip;
#@ary = $cursor->titles();
print @ary;
$cursor->finish();
$db1->disconnect();
i'm doing somethig wrong? can i use this functions?
is posible to know the columns names in a table, and the data type of
the column?
thank's
------------------------------------------------------------------------------
To unsubscribe from this list, please visit http://www.fugue.com/dbi
If you are without web access, or if you are having trouble with the web page,
please send mail to dbi-request@fugue.com. Please try to use the web
page first - it will take a long time for your request to be processed by hand.
------------------------------------------------------------------------------
------------------------------------------------------------------------------
To unsubscribe from this list, please visit http://www.fugue.com/dbi
If you are without web access, or if you are having trouble with the web page,
please send mail to dbi-request@fugue.com. Please try to use the web
page first - it will take a long time for your request to be processed by hand.
------------------------------------------------------------------------------
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic