Can anyone spot the problem with this code:
The procedure works correctly, I have manually ran it and it returns all the expected data. The error message that I am getting is:
Mike55.
Code:
clsConnection.OpenConnection(cnConn)
quickAddAdapter.SelectCommand = New SqlCommand
quickAddAdapter.SelectCommand.Connection = cnConn
quickAddAdapter.SelectCommand.CommandText = "QuickSelectMembers"
quickAddAdapter.SelectCommand.CommandType = CommandType.StoredProcedure
quickAddAdapter.SelectCommand.Parameters.Add(New SqlParameter("@Organisation", SqlDbType.NVarChar, 10))
quickAddAdapter.SelectCommand.Parameters("@Organisation").Direction = ParameterDirection.Input
quickAddAdapter.SelectCommand.Parameters("@Organisation").Value = organisation
quickAddAdapter.Fill(dsReturn, "Everybody")
The procedure works correctly, I have manually ran it and it returns all the expected data. The error message that I am getting is:
"Value cannot be null. Parameter name: dataSet"
Mike55.