Last post Sep 30, 2011 05:56 AM by hans_v
Sep 30, 2011 05:45 AM|icenvon|LINK
Hello. I have a table called Batteries. It has the fields ID, Name, Capacity, size, cost. I have connected the table to my gridview in microsoft visual studio as my accessdata source. I put as the select query in the access data source SELECT * FROM Batteries
WHERE ID = ? OR Name = ? OR Capacity = ? OR Size = ? OR Cost = ?. ID, Name, Capacity, size & cost are each connected to various dropdown lists as Controls. However, when I view in browser and i choose any of the fields in any of the dropdownlists the table
doesn't appear. However, when I go back to the select query and condition for only two fields, let's say WHERE ID = ? OR Name = ?, the table shows in the browser giving me information on the two selected fields. How do I make all the fields show, because I
know I am doing something wrong in my command? I APPRECIATE THE HELP!!
Sep 30, 2011 05:52 AM|hans_v|LINK
Sep 30, 2011 05:56 AM|hans_v|LINK
By the way
size is a Reserved Word in Jet, meaning it should be enclosed in brackets when used as a field or table name!
SELECT * FROM Batteries WHERE ..... [Size] = ....