Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

ADO.NET provider seems to be scrambling parameters to stored proc

4 posts in General Discussion Last posting was on 2008-09-15 12:51:19.0Z
Josh Korn Posted on 2008-09-10 15:00:51.0Z
Sender: 24c5.48c7d335.1804289383@sybase.com
From: Josh Korn
Newsgroups: ianywhere.public.general
Subject: ADO.NET provider seems to be scrambling parameters to stored proc
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <48c7e123.267b.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 10 Sep 2008 08:00:51 -0700
X-Trace: forums-1-dub 1221058851 10.22.241.41 (10 Sep 2008 08:00:51 -0700)
X-Original-Trace: 10 Sep 2008 08:00:51 -0700, 10.22.241.41
Lines: 24
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7074
Article PK: 5296

We're running into the following problem.

As evidenced by the contents of a request-level log, a call
to a stored proc that inserts a row in a table sometimes
fails due to a Right Truncation error.

That error, in turn, is due to the order of parameters to
the stored proc being scrambled, and a field of 30
characters mapped to a parameter of size char(1).

On other occasions, the log shows that it formulates the
correct sequence of parameters, but the new row is not
inserted into the table. There's no indication of error.

We're running what I think is the latest managed provider
(build 3750).

This looks like a definite bug, but I'm at a loss for what
to try next.

Some practical help would be most appreciated.

Thanks
Josh


David Fishburn Posted on 2008-09-12 14:42:56.0Z
Newsgroups: ianywhere.public.general
Subject: Re: ADO.NET provider seems to be scrambling parameters to stored proc
From: David Fishburn <fishburn_spam_off@ianywhere.com>
References: <48c7e123.267b.1681692777@sybase.com>
Organization: iAnywhere Solutions
Message-ID: <Xns9B176D00F6C72fishburnsybasecom@10.22.241.106>
User-Agent: Xnews/2005.10.18
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 12 Sep 2008 07:42:56 -0700
X-Trace: forums-1-dub 1221230576 10.22.241.152 (12 Sep 2008 07:42:56 -0700)
X-Original-Trace: 12 Sep 2008 07:42:56 -0700, vip152.sybase.com
Lines: 38
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7082
Article PK: 5303

Josh Korn wrote in news:48c7e123.267b.1681692777@sybase.com
of ianywhere.public.general:

JK> As evidenced by the contents of a request-level log, a call
JK> to a stored proc that inserts a row in a table sometimes
JK> fails due to a Right Truncation error.
JK>
JK> That error, in turn, is due to the order of parameters to
JK> the stored proc being scrambled, and a field of 30
JK> characters mapped to a parameter of size char(1).

Is there any chance that it is your application that is sending the
call to this procedure with different parameters?

How did you determine this was happening? Did you use request logging
or the stored procedure debugger or ...

--
David Fishburn
Certified ASA Developer Version 8
iAnywhere Solutions - Sybase
Professional Services
Please only post to the newsgroup
Please ALWAYS include version and MORE importantly BUILD number with
EACH post (dbeng10 -v).

EBFs and Maintenance Releases
http://downloads.sybase.com/

Developer Community / Whitepapers
http://www.ianywhere.com/developer

Case-Express - to report bugs
http://case-express.sybase.com

CodeXchange - Free samples
http://ianywhere.codexchange.sybase.com/servlets/ProjectDocumentList


Josh Posted on 2008-09-12 17:19:30.0Z
Sender: c04.48caa24d.1804289383@sybase.com
From: Josh
Newsgroups: ianywhere.public.general
Subject: Re: ADO.NET provider seems to be scrambling parameters to stored proc
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <48caa4a2.c8e.1681692777@sybase.com>
References: <Xns9B176D00F6C72fishburnsybasecom@10.22.241.106>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 12 Sep 2008 10:19:30 -0700
X-Trace: forums-1-dub 1221239970 10.22.241.41 (12 Sep 2008 10:19:30 -0700)
X-Original-Trace: 12 Sep 2008 10:19:30 -0700, 10.22.241.41
Lines: 34
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7083
Article PK: 5304

David

> Is there any chance that it is your application that is
> sending the call to this procedure with different
> parameters?

No. The software has only one code path to do this.

> How did you determine this was happening? Did you use
> request logging or the stored procedure debugger or ...

Both. The request log showed that the parameter order was
being mangled, while the stored proc debugger showed they
were spot-on every time. I suspect that the request log is
sometimes misleading.

The problem turned out to be a uniqueness-constraint
violation on a non-primary-key field (a null SSN).

More specifically, the problem was that there was no
exception thrown in response to the constraint violation.

The request log (sometimes) showed the full conjugation of
INSERT statements and left no clue that anything had gone
wrong.

We removed the constraint because it would cause unsolvable
problems in the field, and hence worked around the problem.

But we didn't actually solve the problem because we don't
understand why no exception was thrown.

As far as I can tell, this looks like a bug in the Managed
.NET Provider.


David Fishburn Posted on 2008-09-15 12:51:19.0Z
Newsgroups: ianywhere.public.general
Subject: Re: ADO.NET provider seems to be scrambling parameters to stored proc
From: David Fishburn <fishburn_spam_off@ianywhere.com>
References: <Xns9B176D00F6C72fishburnsybasecom@10.22.241.106> <48caa4a2.c8e.1681692777@sybase.com>
Organization: iAnywhere Solutions
Message-ID: <Xns9B1A5A13A4656fishburnsybasecom@192.138.151.106>
User-Agent: Xnews/2005.10.18
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 15 Sep 2008 05:51:19 -0700
X-Trace: forums-1-dub 1221483079 10.22.241.152 (15 Sep 2008 05:51:19 -0700)
X-Original-Trace: 15 Sep 2008 05:51:19 -0700, vip152.sybase.com
Lines: 34
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:7087
Article PK: 5308

Josh wrote in news:48caa4a2.c8e.1681692777@sybase.com
of ianywhere.public.general:

...
J> As far as I can tell, this looks like a bug in the Managed
J> NET Provider.

Agreed.

If you can, opening a case with a reproducible will allow us to get to
the bottom of it.


--
David Fishburn
Certified ASA Developer Version 8
iAnywhere Solutions - Sybase
Professional Services
Please only post to the newsgroup
Please ALWAYS include version and MORE importantly BUILD number with
EACH post (dbeng10 -v).

EBFs and Maintenance Releases
http://downloads.sybase.com/

Developer Community / Whitepapers
http://www.ianywhere.com/developer

Case-Express - to report bugs
http://case-express.sybase.com

CodeXchange - Free samples
http://ianywhere.codexchange.sybase.com/servlets/ProjectDocumentList