I've got a SQL Server function that returns a scalar BIT value and takes one parameter. The following gives you an idea:
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?
(I'm using a web site with the basic "subsonic.abp" file with an asterisk in it).
Got it!
Here's how in VB:
Return New SubSonic.InlineQuery().ExecuteScalar(Of Boolean)("SELECT dbo.[fnTest](@StringToTest)", StringToTest)
Thanks all, hope this helps someone else,
Thomas
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With