Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Using dtResult as New DataTable
- Using cn as SqlConnection = New SqlConnection ("ConnectionString")
- Using sqlcmd as SqlCommand - New SqlCommand("StoredProceName", cn) with {.CommandType=CommandType.StoredProcedure}
- Dim sp As SqlParameter
- sp = sqlcmd.Parameters.Add("@Count", SqlDbType.Int)
- sp.value = CType(Nothing, SqlTypes.SqlInt32)
- Using myDR as SqlDataReader = sqlcmd.ExecuteReader
- dtResult.Load(myDR)
- end using
- return dtResult
- End Using ' For sqlcmd
- cn.Close() ' Close the connection
- end using ' For cn
- end using ' For dtResult
Add Comment
Please, Sign In to add comment