
fadoua
Novice
Apr 29, 2009, 8:46 AM
Post #1 of 2
(1277 views)
|
|
perl- DBI Oracle connexion trouble
|
Can't Post
|
|
Hi all, I try to create a table in Oracle 10g XE R2 through this perl script(i use DBI1.607): #!/usr/bin/perl -w use DBI; use strict; my $dbh = DBI->connect( "dbi:oracle:XE", system/pwd, {RaiseError => 1, AutoCommit => 0}); or die "database connection not made:", $DBI::errstr, "\n"; print "Creation de la table Regions"; my $SQLCreationTablesRegions = <<"SQL"; CREATE TABLE Regions ( id_region INT NOT NULL , cheflieu INT NOT NULL , tncc INT NOT NULL , ncc VARCHAR( 250 ) NOT NULL , nccenr VARCHAR( 250 ) NOT NULL , PRIMARY KEY ( id_region ) ) COMMENT = 'Les régions 2008 en France'; SQL $dbh->do($SQLCreationTablesRegions) or die " Impossible de creer la table Regions\n\n "; $dbh->disconnect; but when i execute it i have this error: Search pattern not terminated at test1.pl line 5. Can someone help me please i am really stuck here and i don't now how to solve this error
|