Wednesday, March 21, 2012

Extended Stored Procedure Problem

I am using the Open Data Services to program an extended stored procedure.
The extended stored procedure is called from a table trigger. The problem I
am having is the call to srv_paramlen(...) returns 30 for a varchar(255)
variable even when the data is longer than 30. Therefore when I retrieve the
data as follows,
memcpy(pszColumnValue, srv_paramdata(srvproc, iIndex), len);
the data is truncated to 30 when the actual data stored in the DB is longer
than 30. Thanks very much for any help in solving this problem.
Charles...See SQL Server Books Online and you will find that srv_paramlen should no
longer be used and you should use srv_paraminfo instead
http://msdn.microsoft.com/library/d.../>
06_2rhq.asp
Important This Open Data Services function or macro is only supported in
Microsoft SQL ServerT 2000 for backward compatibility. It has been
superseded by the srv_paraminfo function.
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"Charles Parker" <charles.parker@.whamtect.com> wrote in message
news:e01GoHtCFHA.1432@.tk2msftngp13.phx.gbl...
>I am using the Open Data Services to program an extended stored procedure.
> The extended stored procedure is called from a table trigger. The problem
> I
> am having is the call to srv_paramlen(...) returns 30 for a varchar(255)
> variable even when the data is longer than 30. Therefore when I retrieve
> the
> data as follows,
> memcpy(pszColumnValue, srv_paramdata(srvproc, iIndex), len);
> the data is truncated to 30 when the actual data stored in the DB is
> longer
> than 30. Thanks very much for any help in solving this problem.
> Charles...
>

No comments:

Post a Comment