How to Put in the 'Using cmd as New SqlCommand' Form


Author
Message
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
    Public Sub FillCountNonDRDOVR(ByVal nrod As Integer,
             ByVal cevt As String,
             ByVal ngo As Integer)
        Dim cmd = New SqlCommand("sp_CountBBNonDRDOVR")
        cmd.CommandType = CommandType.StoredProcedure
        cmd.Parameters.Add("@rodeoid"SqlDbType.Int).Value = nrod
        cmd.Parameters.Add("@eventcd"SqlDbType.Char, 2).Value = cevt
        cmd.Parameters.Add("@goround"SqlDbType.Int).Value = ngo
        FillDataTable(cmd)
    End Sub

I have tried several different iterations of the above code but can not seem to get the correct syntax to put the above code in the following form:
Using cmd using as new SqlCommmand
...
End Using
TIA for any help.



GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search