Perl: "or die $dbh->errstr" never returns error string

Asked by:
emacdo / 8 Points
Time:
2013-07-17 11:11 pm EST
Category:
How To
Hits:
393
I am unable to generate &/or retrieve any error message or other error data using 'or die' syntax -- only a blank screen.

Example of usage:

my($qh) = $dbh->prepare($commandText)
or die $dbh->errstr;

$qh->execute()
or die $qh->errstr;

To ask this user for more information, please first login.

To submit an answer, please login.

ANSWERS

0

arnelc
Staff
17,314 Points
2013-07-18 12:38 am EST
Hello Emacdo,

Apologies for the problems you're having with your PERL code. Please understand that we typically do NOT provide programming support. However, we will at least look at it and see if it's something we can answer or point you in the correct direction. In this case, it appears that you're not defining the error message, so you're getting a blank screen. Check out this tutorial on setting up the error string in PERL.

I hope this helps to provide the answer to your problem. Let us know if you have any further questions or comments.

Regards,
Arnel C.

To submit a comment on this answer, please first login.

Thanks for the prompt response. This seems to be a problem with DBI -- I will continue researching it.

Thanks,
emacdo
emacdo
8 Points

2013-07-18 8:44 pm EST
Want to share this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Need More Help?

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 757-416-6627 Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.
}