Hello all:
I am having this strange problem with Application Blocks. I have the following stored procedure:
CREATE PROCEDURE SPGetClientKeyCount
@user_id int,
@key nvarchar(80)
AS
SET NOCOUNT ON
SELECT
id,portal_id,module_id,user_id,key,key_count,created_date
FROM Wordnet WHERE
user_id=@user_id and key=@key
GO
When I run the above stored procedure in Query Analyzer (this is SQL 2000 btw), it runs fine. I receive the record I want and all columns in the select clause
However, when I use the following code:
Return CType(SqlHelper.ExecuteReader(ConnectionString, "SPGetClientKeyCount", user_id, skeyword), IDataReader)
I am only receiving the user_id and the key columns. When I debugged the DNN source, I find that the CBO.CreateObject is using the arrOrdinals to see if the column has been populated. All columns except for the id, user_id and keyword return -1 ordinal. Could someone tell me what I am doing wrong? It doesn't make any sense at all to me...
Thanks in advance for your help.