DBD ERROR

2003-12-05 Thread Anton Arhipov
Hi!

With this piece of code

foreach $gif (@files){
 @gif_parts = split(/_/,$gif);
 print "Inserting into id=$gif_parts[0], name=$gif: ";
 # Read file into scalar
 open(IN, $gif ) or die $!;
 binmode(IN);
 my $doc_len = read IN, $doc, $max_len;
 close(IN);
 print qq{$doc_len bytes\n};
 my $tmp=; #just to make it one by one...
 # Insert document into the database.
 # Prepare the insert statement.
 #my $sth=$dbh->prepare(qq{INSERT INTO PELRER_TEST(id,name,data) VALUES 
(SEQ_PERLER_TEST.nextval,?,?) });
 $sth=$dbh->prepare(qq{UPDATE dla15_download_content set 
web_sample_file1=? where id=?});

 # Bind variables to columns.
 print "$gif_parts[0]\n";
 $sth->bind_param(1, $doc, {ora_type => ORA_BLOB} );
 $sth->bind_param(2, $gif_parts[0] );
 # Insert/Update
 my $rv = $sth->execute();
}
I get :
DBD::Oracle::st execute failed:  (DBD ERROR: Need bind_param(..., { 
ora_field=>... }) attribute to identify table LOB field names) at 
dbi2.pl line 45,  chunk 1.
DBD::Oracle::st execute failed:  (DBD ERROR: Need bind_param(..., { 
ora_field=>... }) attribute to identify table LOB field names) at 
dbi2.pl line 45,  chunk 1.
Issuing rollback() for database handle being DESTROY'd without explicit 
disconnect(),  chunk 1.

Can anyone suggest?

Ant.





--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



Re: Oracle DBI

2003-11-12 Thread Anton Arhipov
No panic anymore. I was given a wrong database schema. Everything works 
fine now.

Ant.

Dan Anderson wrote:

I'm struggling with the DBI too, one of the things that my book says is
that you can create config files the DBI will use.  Is it possible that
you have an Oracle config file (perhaps stored by your sysadmin) that is
giving the DBI the wrong ideas?
-Dan

On Tue, 2003-11-11 at 05:14, Anton Arhipov wrote:
 

Hi!

I'm a starter with this subject.

my script is:
use strict;
use DBI;
my $dbh = DBI->connect( 'dbi:Oracle:orcl', 'blah', 'blah',)|| die 
"Database connection not made: $DBI::errst
r";
$dbh->disconnect();

when trying to run this i get an error:
DBI->connect(APPS1) failed: ORA-01017: invalid username/password; logon 
denied (DBD ERROR: OCISessionBegin) at dbi.pl line 4

But my user name/password are correct, i've checked that.

Is it something to do with shell variables or stuff?

Ant.



   



 





--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Oracle DBI

2003-11-11 Thread Anton Arhipov
Hi!

I'm a starter with this subject.

my script is:
use strict;
use DBI;
my $dbh = DBI->connect( 'dbi:Oracle:orcl', 'blah', 'blah',)|| die 
"Database connection not made: $DBI::errst
r";
$dbh->disconnect();

when trying to run this i get an error:
DBI->connect(APPS1) failed: ORA-01017: invalid username/password; logon 
denied (DBD ERROR: OCISessionBegin) at dbi.pl line 4

But my user name/password are correct, i've checked that.

Is it something to do with shell variables or stuff?

Ant.



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


regexp

2003-08-26 Thread Anton Arhipov
Hi,

i've a string like "BLAH" (guotes included).
i need to control if the BLAH is in uppercase and then if it is in 
uppercase truncate the quotes ("), so "BLAH" becomes BLAH.

any solutions?

Thx



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Directory scan

2001-09-15 Thread Anton Arhipov

Hello,
I need to scan a directory and generate a list of its files...
(preferably a txt with all the filenames)


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




DBD::ODBC module install

2001-09-09 Thread Anton Arhipov

Hello!

i need to install ODBC module on a machine... i've DBI installed and
i'm using the PPM ... on the installation requset i get:

PPM> install ODBC
Install package 'ODBC?' (y/N): y
Retrieving package 'ODBC'...
Error installing package 'ODBC': Could not locate a PPD file for package ODBC


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




MLDBM [hash of hashes]

2001-09-07 Thread Anton Arhipov

Hello,
  I need to use a hash of hashes with a DMB file...
  Where can I get the MLDBM module and how to install it?


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]