CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: DBI:
Execute Procedure in Perl


New User

Mar 15, 2003, 3:20 PM

Post #1 of 2 (5227 views)
Execute Procedure in Perl Can't Post


I am very new to this perl script and I need to solve this problem with in 2 days.

So Can any one let me know the syntax's of perl to execute a procedure.

The procedure does updating the values into table.

proedure name: update_lang_iso_char_set.sql

In perl I have written the code to initialize the database connection.

use DBI;

$dbh = undef;
$dbh = DBI->connect(
"dbi:Sybase" .
":interfaces=" . $ENV{'SYBASE'} . '/interfaces' .
";server=" . $ENV{'BV_DB_SERVER'} .
";database=" . $ENV{'BV_DB_DATABASE'} .
";hostname=" . $ENV{'HOSTNAME'} .
";" ,
{ PrintError => 1, AutoCommit => 1 } );

if (!$dbh) {
die "Connection to DBMS could not be established";
exit 1;

@sql = update_lang_iso_char_set.sql;


It is giving error and the sql file is stored under same path.

Thanks in advance,


Administrator / Moderator

Mar 26, 2003, 7:57 AM

Post #2 of 2 (5218 views)
Re: [sreedhargudur] Execute Procedure in Perl [In reply to] Can't Post

Looks like the problem's here:

@sql = update_lang_iso_char_set.sql;

You need to open the update_lang_iso_char_set.sql file , put its contents into a variable and then execute it.


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives