Showing posts with label successfully. Show all posts
Showing posts with label successfully. Show all posts

Sunday, March 11, 2012

CLR test script SELECT returns no row data

Hi,

The test.sql scripts I write to test CLR stored procedures run successfully, but when I want to display the resulting data in the database with a simple "SELECT * from Employee"

I get the result as:
Name Address
- -
No rows affected.
(1 row(s) returned)

But not the actual row is displayed whereas I would expect to see something like:

Name Address
- -
John Doe
No rows affected.
(1 row(s) returned)

I have another database project where doing the same thing displays the row information but there doesn't seem to be a lot different between the two.

Why no results in first case?

Thanks,
Bahadir
You maybe still have the transaction open and uncommitted, thats why you don′t see the actual row.

HTH; Jens SUessmeyer.

http://www.sqlserver2005.de

CLR Stored Procedures & VS2005 ASP.NET designer support?

I have successfully created CLR stored procures using c# and SQL Server 2005. Now I want to use the CLR stored procedures with some ASP.NET controls. I can add the CLR stored procedure to the dataset designer and have it add a new table adapter but it does not list the columns in the designer view. This forces me to code the column references manually into the controls (tried: DropDownList, GridView).

I can deal with adding the columns manually for controls using a CLR stored procedure, but I want to make sure I was not missing something, am I?

BTW: TSQL stored procedures work as expected (show columns in the dataset designer)

thanks!

-pieter

Hi,

as metadata can be defined on the fly in a stored procedure by building your rowset one by one and then sending it through the pipe, I don′t really know if there is a way to give the designer a hint via some properties or anything else to sniff into the CLR resultset.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||

Thanks. Your reply does help.

I just wanted to be sure it was not something I was doing incorrectly. The CLR stored procedures do indeed have a great deal of power available to them.

Let us hope the VS team can find some way of bringing the two closer together in the future.

-pieter