Last post Apr 04, 2013 05:40 PM by smiling4ever
Apr 04, 2013 11:47 AM|aussiejmasp|LINK
I created a table adapter query that should return all data depending on what is entered. for expamle if I put in my first name text box the letter "S", it should return all records whose first name begins with "S". However, when i create query I get the
above mentioned message and when I click to preview the data and enter the information as above, it does not return all records as desired. I checked the query itself and that was ok.
Asking for assistance please.
Apr 04, 2013 05:14 PM|smiling4ever|LINK
This message indicates that your results could not be filled in your table adapter's model you are working on.
Please post your sql query and the schema of the tableadapter datatable
Apr 04, 2013 05:33 PM|aussiejmasp|LINK
SELECT PotentialCustomers.DateRegistered, PotentialCustomers.Email, PotentialCustomers.FirstName, PotentialCustomers.LastName, PotentialCustomers.PotentialCustNo,
ReferredBy.ReferredByCat, PotentialCustomers.TelephoneNumber1, PotentialCustomers.TelephoneNumber2
FROM PotentialCustomers INNER JOIN
ReferredBy ON PotentialCustomers.ReferredByID = ReferredBy.ReferredByID
WHERE (PotentialCustomers.FirstName LIKE ?) AND (PotentialCustomers.LastName LIKE ?)
Schema of tableadapter datatable (not sure if I am answering this part but here goes)
Apr 04, 2013 05:40 PM|smiling4ever|LINK
Well, the query will return the following
Which is different from your tableadapter schema, that's why you are getting this exception. Either modify your query to return the same schema or create another tableadapter with your query
Also, if you want to search for any existence of 'b' lets say, change the Where clause to look like the following:
(PotentialCustomers.FirstName LIKE '%' + ? + '%') AND (PotentialCustomers.LastName LIKE '%' + ? + '%')