----- Forwarded message from Joe McTigue <[EMAIL PROTECTED]> ----- Subject: Just a quick question on the DBI perl mod Date: Wed, 17 May 2006 14:22:38 -0400 From: Joe McTigue <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] X-Virus-Checked: Checked
Hi Tim, I am currently getting the following error message and was wondering if you could help? If you can, here's the scenario: The code below is what I'm trying to accomplish reading a file consisting of insert, update and delete statements. But I've been getting the following error now for the past several days now and can't seem to figure it out: ######### ERROR FOLLOWS: starting file: DELETE.sql DBI connect('databasename','username',...) failed: ORA-24315: illegal attribute type (DBD ERROR: OCIAttrGet OCI_ATTR_ENV_CHARSET_ID) at perlscript.pl line 463 Can't connect to database:ORA-24315: illegal attribute type (DBD ERROR: OCIAttrGet OCI_ATTR_ENV_CHARSET_ID) at perlscript.pl line 463. ######### END OF ERROR ########### ######### CODE SEGMENT FOLLOWS ######### my $INPUT_SQL = FileHandle->new("cat ${working_file} |") or die ("Can not open ${working_file}: $!\n"); next line is line : 463 my $dbc = DBI->connect( "dbi:Oracle:$nameofdb", "$username", "$password" ) || die "Can't connect to database:" . DBI->errstr(); while ( my $line = $INPUT_SQL->getline() ) { chomp( $line ); my $sth = $dbc->prepare( $line ) or die "Can't prepare SQL statement.\n"; $sth->execute() or die "Can't execute SQL statement.\n"; } $INPUT_SQL->close(); $dbc->disconnect() or warn "Error disconnecting: \n"; ######### END CODE SEGMENT ################## Any help would be incredibly wonderful at this point. Regards, Joseph P. McTigue CBC Innovis, QA Department [EMAIL PROTECTED] (614) 538-6032 References Visible links 1. mailto:[EMAIL PROTECTED] ----- End forwarded message -----