Dim dt As New DateTime(MyYear, MyMonth, 1)
Dim sql As String = "SELECT RIGHT(CONVERT(NVARCHAR(10), MyDate, 103), 7) AS MonthYear FROM MyTable WHERE YEAR(MyDate) = @Year AND MONTH(MyMonth) = @Month"
Using cmd As SqlCommand = con.CreateCommand()
cmd.CommandType = CommandType.Text
cmd.CommandText = sql
cmd.Parameters.AddWithValue("@Year", dt.Year)
cmd.Parameters.AddWithValue("@Month", dt.Month)
...
...
...
End Using