RE: First time DBI user crashing perl

Jon <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.general
Message-ID <CAL40zrSJqOqpDv_y16QCdQqrxHx9OnJL4haOmG_mNt3vg_Ke7g@mail.gmail.com>
Hello Peter,

How are you invoking the script? Do you have a perl script that you double
click?

If so, can you try opening a command/powershell window and running your
program? You'll likely have to specify the full path to the perl binary
then pass your script as the first parameter.

E.g.: \strawberry\perl\bin\perl.exe my_script.pl

I have not encountered this particular problem with db2 but this is my
first step when trying to get one of my scripts to run in Windows (I'm a
Linux enginner by the Windows engineers steal a lot of my applications),
perhaps someone has more specific experience than myself.

Best Regards,
Jon A
On Oct 29, 2014 5:50 PM, "Peter Shabino" <[email protected]> wrote:

> Try this again I apparently found a keyboard shortcut to send the message
> in hotmail......
>
> Trying to set up a connection to a remote DB2 server in perl to query some
> data.
>
> Followed the directions here:
> http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21297335
>
> Then searching the web I came up with this chunk of code:
>
> use warnings;
> use strict;
> use DBI;
> use DBD::DB2;
>
> print("Operating System = ",$^O,"\n");
> print("Perl Binary = ",$^X,"\n");
> print("Perl Version = ",$],"\n");
> print("DBI Version = ",$DBI::VERSION,"\n");
> print("DBD::DB2 Version = ",$DBD::DB2::VERSION,"\n\n");
> print("env = ",$ENV{ DB2INSTANCE},"\n");
>
> my @driver_names = DBI->available_drivers;
> print(join("\n",@driver_names),"\n");
>
> print("I am here\n");
>
> my @dataSources  =  DBI->data_sources('DB2');
> print(@dataSources,"\n");
>
> print("I am there\n");
>
> exit(0);
>
> When I run this I get a popup that says the "Perl interpreter has stopped
> working" and a button to close the program.
>
> on the console I get:
> Operating System = MSWin32
> Perl Binary = c:\strawberry\perl\bin\perl.exe
> Perl Version = 5.018001
> DBI Version = 1.631
> DBD::DB2 Version = 1.85
>
> env = DB2
> ADO
> DB2
> DBM
> ExampleP
> File
> Gofer
> ODBC
> Pg
> Proxy
> SQLite
> Sponge
> mysql
> I am here
>
> So the failure is when I try and get the DB2 data sources...
>
> Just have no idea even where to start looking for the issue since there is
> no error message. Is there a log file with more information on what might
> have died?
>
> Thanks,
> Peter
>
>
> My projects:
> http://www.wire2wire.org/
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.