I've got a SQL Server function that returns a scalar BIT value and takes one parameter. The following gives you an idea:
我有一个SQL Server函数返回标量BIT值并采用一个参数。以下为您提供了一个想法:
CREATE FUNCTION dbo.[fnTest] (@StringToTest VARCHAR(10))
RETURNS BIT
AS
BEGIN
DECLARE @b BIT
IF @StringToTest = 'A' SET @b = 0 ELSE SET @b = 1
RETURN (@b)
END
GO
Being very new (days!) to SubSonic - how would I call this using SubSonic?
对SubSonic来说是非常新的(几天!) - 我如何使用SubSonic调用它?
(I'm using a web site with the basic "subsonic.abp" file with an asterisk in it).
(我正在使用一个带有基本“subsonic.abp”文件的网站,其中带有星号)。
1 个解决方案
#1
Got it!
Here's how in VB:
这是VB中的方法:
Return New SubSonic.InlineQuery().ExecuteScalar(Of Boolean)("SELECT dbo.[fnTest](@StringToTest)", StringToTest)
Thanks all, hope this helps someone else,
谢谢大家,希望这有助于其他人,
Thomas
#1
Got it!
Here's how in VB:
这是VB中的方法:
Return New SubSonic.InlineQuery().ExecuteScalar(Of Boolean)("SELECT dbo.[fnTest](@StringToTest)", StringToTest)
Thanks all, hope this helps someone else,
谢谢大家,希望这有助于其他人,
Thomas