Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Handle DBlib errorby tcheungcm (Novice) |
on Dec 10, 2014 at 03:21 UTC ( [id://1109842]=perlquestion: print w/replies, xml ) | Need Help?? |
tcheungcm has asked for the wisdom of the Perl Monks concerning the following question: I used Sybase DBlib to connect to a sybase erver and then use dbuse to change database. However, it displayed STDERR on the command prompt. Instead, I would like to capture the error and suppress them. Could you advise how to do?
Output Debug Before dbuse Msg 10351, Level 14, State 1 Server 'MUTRDP3', Line 1 Server user id 2038 is not a valid user in database 'TestDB1' DB-Library error: General SQL Server error: Check messages from the SQL Server. Debug this db cannot use I noticed there is dberrhandle or dbmsghandle that can be used for error handle but i don't know how to use it. please advice. do you have any example?
Back to
Seekers of Perl Wisdom
|
|