Tuesday, February 14, 2012

Database Output Problem for a SQL Server 2000 stored procedure

Hi,

I have a problem with "database output" window in executing a select-sp in vs 2005 standard. The db is a sql server 2000 one.

When I execute the sp within VS, the database output correctly displays the execution information:

No rows affected.
(1 row(s) returned)
@.RETURN_VALUE = 3

but I can't see the returned rows (3 rows are returned); I only see the column names and no data.

Running [dbo].[spBkm_GetList] ( @.IDUser = <DEFAULT>, [.......]).

IDBkm UIBkm IDUser
------- ------------ ---No rows affected.

If I run the same sp in Sql Server Manager Studio Express it correctly shows the data of the 3 rows returned.

The sp uses

EXECsp_executesql @.Sql, @.ParamList, .....

for executing the sql statement and the last line of sp is
RETURN@.@.ROWCOUNT

I've tried removing the "RETURN @.@.ROWCOUNT" with no success.

The problem affects only one sp, the others, which are absolutely similar, work properly .

I don't know what is the problem...

Any idea?

Thanks in advance

Ive' resolved the problem in a strange way, it seems to me a bug...

If I exclude from the select statement a field of type uniqueidentifier, alla data are correctly displayed!

I've tried on other sp and the behaviour is the same.

Hope this may help someone else with the same problem...

No comments:

Post a Comment