[ASP.NET] 執行StorePorcedure

Public Sub CreateGroupAuthority(ByVal groupNo As String)
Dim myConnection As SqlConnection = DBUtil.CreateSQLConnection()

Dim myCommand As SqlCommand = New SqlCommand("sp_CreateGroupAuthority", myConnection)
myCommand.CommandType = CommandType.StoredProcedure
Dim parameterCustomerid As SqlParameter = New SqlParameter("@GroupNo", SqlDbType.VarChar, 4)
parameterCustomerid.Value = groupNo
myCommand.Parameters.Add(parameterCustomerid)
myConnection.Open()
myCommand.ExecuteReader(CommandBehavior.CloseConnection)
End Sub





文章分類: .NET小

留言

這個網誌中的熱門文章

嘗試卸載資料庫時,發生資料庫正在使用的而無法卸載的可能解決方案

ASP.NET常用的RegularExpressionValidator驗證