Hi,
> I would love if someone helped me with this DBIx::Recordset problem:
> My CGI/DBI program shall
> 1) Connect to a db and list the 'temp_' tables there.
> 2) If user wants to upload new data, the data will be created in a new
> 'temp_' table.
> 3) Operations will be performed on the new and old 'temp_' tables
together.
>
> Somehow  DBIx::Recordset::AllNames() doesn't recognise the newly created
> table, even though I re-create the $db connection.

DBIx::Recordset caches the metadata of your database. There is no API to
make it reread the list of tables. (You can force a reread of the table
metainformations with $db -> MetaData('table', undef, 1) )

A workaround is to add the following line before the new (yes you need the
new in this case):

# take the !DataSource parameter and add //- as key for the Metadata hash
delete $DBIx::Recordset::Metadata{"dbi:Pg:dbname=$database//-"} ;

> $db = DBIx::Database->new({'!DataSource' => 'dbi:Pg:dbname=$database',
>                                            '!Username'=> $user,
>                                            '!KeepOpen' => 1}) or die
> "Couldn't connect to database";

Gerald



-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     [EMAIL PROTECTED]         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------

Reply via email to