Error: No value given for one or more required parameters
Posted on 2005-04-20
I have a VB.NET 2003 program. It has an OldDbDataAdapter with the following Select command:
Me.OleDbSelectCommand1.CommandText = "SELECT Forenames, Surname, Phone_Home, Phone_Work, Mobile, Fax, EMail, Physical_S" & _
"treet, Physical_Suburb, Physical_City, Postal_Street, Postal_Suburb, Postal_City" & _
", Postal_Code, Wants_EMail, Wants_Fax, Wants_Postal, Wants_Physical, Minimum_Bed" & _
"rooms, Maximum_Bedrooms, Minimum_Bathrooms, Maximum_Bathrooms, Minimum_Carports," & _
" Maximum_Carports, Minimum_Garages, Maximum_Garages, Minimum_Property_Size, Maxi" & _
"mum_Property_Size, Minimum_Price, Maximum_Price, Suburb, Area, City, Property_Ty" & _
"pe_ID, Rent, Comments, ID FROM Prospective_Clients"
This command basically gets all the fields from an Access 2000 database. When I run it, I get the following error message:
No value given for one or more required parameters
If I remove all the fields from the above query that start with the words Maximum_ or Minimum_ then it runs, but as soon as I reintroduce any of the fields I removed, it gives that error message again. Strangely enough, all the fields beginning with those two words are number fields. Everything else is either a Yes/No field or a Text field, with the exeption of Property_Type_ID and ID which are also number fields.