Home All Groups Group Topic Archive Search About

problem with bindingsource and byte-column

Author
2 Feb 2007 8:28 AM
Christopher
hi,

my problem is as follows:
i have a bindingsource and i want to set a filter. my primary key is a
GUID and is stored in the database as a byte-value.
now i want to set the filter of the bindingsource to that byte-value,
but it does not work and i don't know how to set the filter now.

                this.tABLE1indingSource.Filter = "foreignkeyID='" +
tABLE2.ID+ "'";

tABLE2's id is a foreign key in table1.

More Infos:
with the bindingsource I am filling a ListBox with the id of the table
as selectedvalue and some other information as selecteditem.

I hope somebody understood what i want and has a clue!

Thanks
Chris

Author
2 Feb 2007 11:31 AM
Christopher
Show quote
On 2 Feb., 03:28, "Christopher" <chrishunn***@gmail.com> wrote:
> hi,
>
> my problem is as follows:
> i have a bindingsource and i want to set a filter. my primary key is a
> GUID and is stored in the database as a byte-value.
> now i want to set the filter of the bindingsource to that byte-value,
> but it does not work and i don't know how to set the filter now.
>
>                 this.tABLE1indingSource.Filter = "foreignkeyID='" +
> tABLE2.ID+ "'";
>
> tABLE2's id is a foreign key in table1.
>
> More Infos:
> with the bindingsource I am filling a ListBox with the id of the table
> as selectedvalue and some other information as selecteditem.
>
> I hope somebody understood what i want and has a clue!
>
> Thanks
> Chris

hi,

i have deleted the bindingsource and now i am binding my listbox-
control to an array which i create and fill when i click a button.
i was able to set the displaymember but  when i set the valuemember my
application throws an exception
"Cannot bind to the new value member.
Parameter name: value"
the value is a byte-value if this helps ...

AddThis Social Bookmark Button