You are here: Get results from VB SQLCRL Stored Procedure « MsSQL Server « IT news, forums, messages
Get results from VB SQLCRL Stored Procedure

Posted by Chris on 06/07/06 14:07

Hi,

I created a VB SQL CRL Stored procedure for calculating a value. Value
is returned as below

Using sConn4 As New SqlConnection("context connection=true")
sConn4.Open()
scmd = New SqlCommand("SELECT " & var_max, sConn4)
sdrd = scmd.ExecuteReader()
SqlContext.Pipe.Send(sdrd)
End Using

When calling this stored procedure from a TSQL stored procedure for
using the value for further processing the value returned to my
variable is 0. The correct value should be 56. In results tab I get the
correct result, but how can I assign it to my variable @max ?

DECLARE @max1 int
DECLARE @max int

EXEC @max1 = [dbo].[VBSTP_calculate_MAX_no]
@vsp_table_name = N'[dbo].[Message]',
@vsp_table_key = N'message_no',
@vsp_WHERE = N''

print @max1 -- value here is 0

SET @max = (SELECT @max1)

Thanks a lot.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация