Re: [Fwd: DBD::AnyData & dbish]

Re: [Fwd: DBD::AnyData & dbish]

am 06.01.2006 19:17:02 von jeff

Scott T. Hildreth wrote:

>I am missing something here (probably a few brain cells),
>how do I set up the dsn for DBD::AnyData (fixed format)
>when using dbish?
>
>
Well, it's rather messy because dbish's execution of perl is a bit
messy. But it works fine. Try this:

1) start dbish like this:

dbish dbi:AnyData:f_dir=./mydb

2) within dbish, issue a perl command to set the catalog for a table:

$sh->{dbh}->ad_catalog('foo','Fixed','foo.db',{pattern=>'A1
A7'}) /perl

Then you should be able to access "foo.db" as a Fixed file as the table
"foo" with the specified pattern. $sh is the DBI::Shell object that
holds the current $dbh in an attribute. dbish does a string eval on
everything in the command buffer preceding "/perl".

Let me know if this works for you.

--
Jeff