在VB.NET中使用调用SQL函数 [英] Using call SQL function with VB.NET
本文介绍了在VB.NET中使用调用SQL函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有SQL函数,此函数检索true或false我如何通过vb.net使用此sql函数以使用此值
我尝试过的事情:
我有SQL函数此函数检索true或false我如何通过vb.net使用此sql函数以使用此值
I have SQL Function this function retrieve true Or false how i can use this sql function by vb.net to use this value
What I have tried:
I have SQL Function this function retrieve true Or false how i can use this sql function by vb.net to use this value
推荐答案
尝试:
Using con As New SqlConnection(strConnect)
con.Open()
Using com As New SqlCommand("SELECT dbo.MyFunctionName()", con)
Using reader As SqlDataReader = com.ExecuteReader()
While reader.Read()
Dim i As Integer = CInt(reader(0))
Dim b As Boolean = i = 0
...
End While
End Using
End Using
End Using
这篇关于在VB.NET中使用调用SQL函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文