Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
forzajavaman
Starting Member
2 Posts |
Posted - 2008-10-28 : 22:39:26
|
Hi, I've problem on function calling with NTEXT param.lets say, i've function fnTest CREATE FUNCTION [dbo].[fnTest]( @p1 TEXT)RETURNS varchar(100)ASBEGIN DECLARE @retVal varchar(100) set @retVal = 'TEST' RETURN @retValENDand I call fnTest on select statement like :select top 1 dbo.fnTest(field_ntext)from tblSamplefield_ntext, which has NTEXT datatype.its resulting error :Location: rowset.cpp:3328Expression: m_cILockBytesOpen == 0SPID: 54Process ID: 1592(1 row(s) affected)Msg 3624, Level 20, State 1, Line 3 Msg 1203, Level 20, State 1, Line 3Process ID 54 attempting to unlock unowned resource KEY: 133:263008018:1 (82019b81793c).Does everyone knows what's wrong ???FYI, i'm running on sql server 2000 SP 4.Microsoft SQL Server 2000 - 8.00.2050 (Intel X86) Mar 7 2008 21:29:56 Copyright (c) 1988-2003 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 2)Kindly help and suggest.Thanks in AdvanceRegards,Solahuddin |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-29 : 00:48:38
|
why are you declaring parameter as text if you want to pass ntext values? |
 |
|
forzajavaman
Starting Member
2 Posts |
Posted - 2008-10-29 : 03:07:03
|
quote: Originally posted by visakh16 why are you declaring parameter as text if you want to pass ntext values?
this function is build not only for one sql statement, but also used by many other sql statement, it somekind common lib function. But when its parameter value pass by NTEXT, the error show-up. I just realized when the function executed in different server, then it works. The other server is also implemented SP 4 withMicrosoft SQL Server 2000 - 8.00.2040 (Intel X86) May 13 2005 18:33:17 Copyright (c) 1988-2003 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 1) is there any hotfix that cause this problems ???Thanks in AdvanceRegards,Solahuddin |
 |
|
|
|
|
|
|