Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^4: One Question about DBF

by padawan_linuxero (Scribe)
on Oct 18, 2007 at 19:02 UTC ( [id://645817]=note: print w/replies, xml ) Need Help??


in reply to Re^3: One Question about DBF
in thread One Question about DBF

Hi jZed!
I added the line as you told me but it gave me these error
Can't locate object method "catalog" via package "DBI::db" at testdbf.pl line 5.
This is the code
use DBI; my $dbhX = DBI->connect("DBI:XBase:/proyecto"); my $dbhA = DBI->connect( 'dbi:AnyData:' ); $dbhA->catalog('etstx','CSV','etstx.csv'); my $sth = $dbhX->prepare("SELECT * FROM reg501"); $sth->execute(); $dbhA->do("CREATE TABLE etstx AS SELECT * FROM ?",{}, $sth);

Replies are listed 'Best First'.
Re^5: One Question about DBF
by jZed (Prior) on Oct 18, 2007 at 19:04 UTC
    Sorry again, not enough coffee this morning - should be $dbh->ad_catalog().
      Hi jZed!!!
      this is the code :
      use DBI; my $dbhX = DBI->connect("DBI:XBase:/proyecto"); my $dbhA = DBI->connect( 'dbi:AnyData:' ); $dbhA->ad_catalog('etstx','CSV','etstx.csv'); my $sth = $dbhX->prepare("SELECT * FROM reg501"); $sth->execute(); $dbhA->do("CREATE TABLE etstx AS SELECT * FROM ?",{}, $sth);
      So my cuestion is where do I put the $dbh->ad_catalog()
        It's in the right place, I just meant that you should replace $dbhA->catalog(...) with $dbhA->ad_catalog().

        you should probably also set $dbhA->{RaiseError} to 1 or trap errors on each call.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://645817]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2026-04-20 11:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.