[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小
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小
留言