Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Strawberry Perl 64bit on Win7 crashes on DBI-function

by karlgoethebier (Abbot)
on Apr 17, 2014 at 16:18 UTC ( [id://1082661]=note: print w/replies, xml ) Need Help??


in reply to Strawberry Perl 64bit on Win7 crashes on DBI-function

Unfortunatly i don't know why this doesn't work.

But why don't you forget about it and use the "build in" error handling? From the manual:

Typically RaiseError is used in conjunction with eval { ... } to catch + the exception that's been thrown and followed by an if ($@) { ... } +block to handle the caught exception...

Regards, Karl

«The Crux of the Biscuit is the Apostrophe»

Replies are listed 'Best First'.
Re^2: Strawberry Perl 64bit on Win7 crashes on DBI-function
by theman824 (Novice) on Apr 22, 2014 at 11:47 UTC

    In the end the Script is supposed to be run by users, who want so submit a SQL-Query to a DB2-Database. These users don't know any perl. So i want to give a detailed error massage, if the desired DSN is actually not configured (not existing) on the given machine. Which is why i want to determine the known ODBC-datasources at some point. And it was working nicely on perl 5.8.

      Do DBI and DBD::ODBC work otherwise?

      If DBI and/or DBD::ODBC also fail with other function calls, my guess is that you somehow mixed 32-bit and 64-bit DLLs from the old and the new installation.

      Personally, I would look at avoiding ODBC datasources and instead use the appropriate connection string. Many of these connection strings can be found via http://connectionstrings.com.

        This bit my @driver_names = DBI->available_drivers; works for example.

        And the actual DB-connection and basically what the whole script is supposed to do works. Just this one function call from DBI-package crashes. And in such a strange way. Same thing happens on two different machines, although running basically the same software-setup.

        I'll have a look into that link.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1082661]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-25 17:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found