Re: No line number with RaiseError in DBD::Sybase



Douglas Wilson wrote:
On Thu, Jun 19, 2008 at 1:53 PM, Tim Bunce <Tim.Bunce@xxxxxxxxx> wrote:
On Wed, Jun 18, 2008 at 02:14:06PM -0700, Douglas Wilson wrote:
With RaiseError or PrintError set, if DBD::Sybase throws an error, the
error message does not indicate what line number of the program that the
error was on ... or what program/module that the error was in.
I'd guess that that's because sybase error messages tend to end with a
newline character.

Hopefully that's a simple fix for Michael to get into the next release.
You could always send a patch to help out...

Once I found the magic spot, this is the simplest thing I can think of (there
is a lot of conditional concatenating in that function, and some of the
concatenations include newlines):

*** ../DBD-Sybase-1.08/dbdimp.c Thu Apr 19 11:31:19 2007
--- dbdimp.c Thu Jun 19 14:09:45 2008
***************
*** 545,550 ****
--- 545,551 ----
else
retcode = CS_SUCCEED;

+ sv_catpv(DBIc_ERRSTR(imp_dbh), " ");
return retcode;
} else {
if(srvmsg->msgnumber) {



Thanks - I'll get that into the next release.

Michael
--
Michael Peppler - Peppler Consulting SaRL
mpeppler@xxxxxxxxxxx - http://www.peppler.org
Sybase DBA/Developer - TeamSybase: http://www.teamsybase.com
Sybase on Linux FAQ - http://www.peppler.org/FAQ/linux.html
.



Relevant Pages

  • Return a single value from a Sybase stored procedure using ADO
    ... I need to return a number from a Sybase SQLAnywherestored procedure ... The error message appears at the "While Not" line ... Dim objConn As Object ... Dim objRs As Object ...
    (microsoft.public.vb.database.ado)
  • Re: Return a single value from a Sybase stored procedure using ADO
    ... I need to return a number from a Sybase SQLAnywherestored procedure ... proper value but I get error on the ADO call. ... The error message appears at the "While Not" line ... Dim objRs As Object ...
    (microsoft.public.vb.database.ado)
  • Re: No line number with RaiseError in DBD::Sybase
    ... error message does not indicate what line number of the program that the ... newline character. ... is a lot of conditional concatenating in that function, ... retcode = CS_SUCCEED; ...
    (perl.dbi.users)
  • RE: ct_connect errors in xp_cmdshell
    ... "Mike Epprecht (SQL MVP)" wrote: ... > path settings written by the Sybase setup. ... >> It is giving the following error message. ...
    (microsoft.public.sqlserver.server)
  • Re: Specify owner.objectname or use sp_helpdb
    ... I am sorry but there is no other error message. ... have tested several applications with the ODBC Driver(Original Sybase) on ... different Computers, the error is always the same, somtimes the ODBC driver ... Specify owner.objectname or use sp_help to check whether the object exists ...
    (comp.databases.sybase)