Hey there,

I am new at this here,

I was just wondering did anyone have any pointers on what to look for or how
best to implement Blobs using ODBC...this is how I currently use it with
Pg...but I need to port this to ODBC...

any help pointers would be appriciated!

Cliff.

Pg Blob Export

   # get the SQL statement
    $statement = $self->{SQL}->get("GET_LOBJ_ID",
                                   { id   => $self->{ID} });
    my $lobj_id = 0;
    # run the query
    ($sth, $error) = $self->{DB_CONNECTION}->query($statement,
                                                   \$lobj_id);
    unless ($sth->fetch) {
        $self->{LOG}->write("cannot export blob ".$self->{ID}.
                            ". no such blob", 4);
        $self->{DB_TRANSACTION}->rollback();
        return undef; # failure
    }
    my $ret;
    # if we got large object id, we try to lo_export the file to the path
    if ($lobj_id) {
        $ret =
            $self->{DB_CONNECTION}->dbh()->func($lobj_id, $path, 'lo_export');
    }

Reply via email to