Ok i have this code to retreive data from a Table "Calendar" and the feild within the table are Id,Day ,Month and Year.
When i press the button to run this code and i get the error message "The parameterized query '(@Day varchar(8000),@Month varchar(8000),@Year varchar(8000))Sel' expects the parameter '@Day', which was not supplied. "
Dim con As New System.Data.SqlClient.SqlConnection
con.ConnectionString = ******
Dim cmd As System.Data.SqlClient.SqlCommand
Dim myDA As System.Data.SqlClient.SqlDataAdapter
Dim myDataSet As System.Data.DataSet
'Binding database table to DataGridView
cmd = New System.Data.SqlClient.SqlCommand("Select * FROM Calendar", con)
If con.State = System.Data.ConnectionState.Closed Then con.Open()
myDA = New System.Data.SqlClient.SqlDataAdapter(cmd)
myDataSet = New System.Data.DataSet()
myDA.Fill(myDataSet, "Calendar")
DataGrid.DataSource = myDataSet.Tables("Calendar").DefaultView