gpdeering
Posts: 57
|
Posted: 04/10/2006, 3:31 PM |
|
Has anyone ever encountered this problem before?
I'm trying to publish a ASP.NET project where, for all Listbox controls, I set the Unique property to "Yes". However, for each Listbox, CCS generates the following error message:
Error:C:\[project_pathname]\components\[application_listpage]DataProvider.vb(212) : error BC30456: 'CheckUnique' is not a member of '[projectname].[application_listpage].[searchfunction]]SearchDataProvider'.
If (Not IsNothing(s_field)) And (Not provider.CheckUnique("s_field",Me)) Then
Any ideas on how to fix this?
Thanks,
gpdeering
|
|
|
dik mus
|
Posted: 04/10/2006, 11:44 PM |
|
I dont know, But I do know in ASP.net the listbox always shows only unique values in the list. So i think you dont need to set this property.
Is this a solution for you?
|
|
|
WKempees
|
Posted: 04/11/2006, 2:53 AM |
|
I did not understand the question, not being an ASP'r.
But If it is what dikmus suggests then a
select id, distinct(value) from table
would also eliminate the problem, I think.
|
|
|
gpdeering
Posts: 57
|
Posted: 04/11/2006, 7:14 AM |
|
Thanks for the reply.
I am, in fact, seeing duplicates in my listbox. I was not aware of ASP.NET automatically showing only unique values in a listbox, and I had left alone the "Unique" property when I initially published the project.
But as I began to populate my DB with similar values in the same field, and then began trying to search by that field, my Listbox shows me each instance of a record where I had entered the same value.
All of this code was auto-generated by CCS. I did not add any custom code whatsoever.
I'll look into WKempees' recommendation.
--gpdeering
|
|
|
gpdeering
Posts: 57
|
Posted: 04/11/2006, 7:18 AM |
|
Never mind! I'm an idiot!
I remembered just now that I set the Bound property to the primary key index and the Text property to the value I wanted to show.
Well, then, or course it's going to show me every record in my DB!
I'm sorry to trouble you all. Case closed (with embarrassment)!
--gpdeering
|
|
|
|