Hey G, the user ID is 8 characters long. Weird. InternalID is declared as VARCHAR(MAX) in the User table.
Strangely enough though, the program runs fine in Prod. But does not in Dev. So I suspect it is a data issue, even though I refreshed Dev from Prod not long ago...The SP that calls these UDFs fails with a "String or binary data would be truncated." error. I have narrowed it down to this one function but can't get to see what is wrong. Still looking.
Thanks.
MCP SQL Server 2000, MCTS SQL Server 2005, MCTS SQL Server 2008 (DBD, DBA)
You are probably getting an InternalID that is > 20 chars. That would cause the truncation issue when trying to insert into the table that has InternalID defined as VarChar(20)
I am stepping through the code in Visual Studio 2010. What puzzles me is that the line
Code:
SELECT @intID = InternalID FROM [User] WHERE UserID='myuserID'
returns a value in SSMS, but does not inside the code. My user ID is 8 characters long and my internal ID is only 3 characters long. I guess I need lunch...maybe my muse will come back. Thanks and later.
MCP SQL Server 2000, MCTS SQL Server 2005, MCTS SQL Server 2008 (DBD, DBA)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.