Mark,
If you have a *small* sample of code that illustrates what you're trying
to do I'll be glad to have a look at it. I also prefer SqlCeResultSet
not only for speed but also because it's generally a lot easier to use,
but I haven't run into the problem you're describing so I'm curious
exactly what you're doing.
--
Ginny Caughey
.NET Compact Framework MVP
Hi Ginny,
Actually there is no "new" resultset. What I'm doing is when the user
enters a categoryid in the lostfocus event of the textbox I do a seek
on the resultset. If a category id is found I want to update the
bindingsource to the same position as the resultset.
I prefer the sqlceresultset because it is faster on the device with
large tables.
Mark
"Ginny Caughey [MVP]" <
[email protected]> schreef in
bericht Mark,
What if you just set the DataSource to the new result set? Or use a
DataTable instead of a result set?
--
Ginny Caughey
.NET Compact Framework MVP
Ginny,
I tried that, but setting the bindingresource to null resulst in an
ArgumentException without an errormessage ( the source assembly
cannot be found).
Mark
"Ginny Caughey [MVP]" <
[email protected]> schreef
in bericht Mark,
Probably the best way would be to set the BindingSource.DataSource
to null, then set it back to your new resultset.
--
Ginny Caughey
.NET Compact Framework MVP
Ginny,
Ok, that is too bad. I have tried to achieve something similar by
using the sqlceresult seek method, however I then have no idea of
how to update the bindingsource so that my controls show the
correct record. Is this at all possible ?
thanx,
Mark
"Ginny Caughey [MVP]" <
[email protected]> schreef
in bericht Mark,
I think it's probably a limitation of the SqlCeResultSet since it
doesn't contain the actual data and only maintains pointers to the
data (unlike DataSet). Similarly Sort is also not supported I
believe.
--
Ginny Caughey
.NET Compact Framework MVP
Bindingsource.find(..) doesn't seem to work on a bindingsource
with as datasource a sqlceresultset.resultview. As far as I can
tell this is odd since the sqlceresultset.resultview does
implement IBindingList. Or is this a limitation of the
compactframework ?
Mark.