in reply to Re^2: Perl Interpreter Stopped Working . kernelbase.dll error
in thread Perl Interpreter Stopped Working . kernelbase.dll error

SELECT column FROM is invalid because column is a reserved word in Oracle. Your code lacks:

use strict; use warnings;

You should get in the habit of adding this and defining your variables.

try: $dbh = DBI->connect($dsn, "uname", "pwd"); #prepare and execute the SQL statement $sth = $dbh->prepare("SELECT column FROM table WHERE TP_ID='X'"); $sth->execute; $sth->finish(); except:

It looks like you're mixing Python code (try:, except:) with your perl here. See DBI -> RaiseError, Try::Tiny.

Replies are listed 'Best First'.
Re^4: Perl Interpreter Stopped Working . kernelbase.dll error
by Anonymous Monk on Mar 07, 2019 at 12:47 UTC

    Thanks for the suggestion

    The below code worked fine for me !

    #!/usr/bin/perl use strict; use warnings; use DBI; #use DBD::ODBC; my @row; my $user = 'XXXX'; my $password = 'XXX'; my $dbh = DBI->connect("dbi:Oracle:host=XXX;sid=XXX", $user, $password +);
    Thanks :)