Re: creating ExecuteQuery method



Can I commit your sample in DbLinq source code as ExecuteQuery
implementation
If you like...

I modified it to work with any ADO .NET provider.
And (ahem) took full credit I notice (except for HyperDescriptor, fair
enough)

In DLinq (i.e database) applications reflection speed seems to be
unimportant.
Fine; then don't use the extra stuff (which you haven't); that is why I like
this implementation - it is trivial to connect/disconnect it ;-p

Will the patch attached to link above look OK ?
Hard to tell without a working test rig; looks reasonable though...

How to modify this code so that if poperty returned by query does not
exist in type, it will be added to created entity for data binding in
DataGridView
This takes me back to some conversations (with you) in October? November?
You can weite runtime-extensible objects using TypeDescriptionProvider etc
without too much heartache, but you need somewhere to put the data...
ideally inside the record object so that it gets collected (GC) with the
record.
You could do something like this with a common base class for extensible
objects, but it isn't trivial.

Or is it better to use MS Dynamic Linq library to create new object from
scratch in this case ?
I guess this would be possible - but you'd have to pass this in as the <T>,
so you would have to use reflection to invoke the method. In this case,
personally I'd recommend getting the columns right, or using something
pre-rolled like DataTable.

Marc


.



Relevant Pages

  • DataGridView - Code Included - Want to Add Column Sorting
    ... Please help me understand my sorting problem in DataGridView. ... The combination of learning the massive DataGridView and Data Binding ... public string Name ...
    (microsoft.public.dotnet.languages.csharp)
  • DataGridView and reentrancy exception
    ... I have a strange problem with the DataGridView control. ... data binding to show computed values. ... CellEndEdit event to that purpose which then invokes the update method. ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: how to sort datagridview programmically
    ... Brian Noyes has an example in his book (Data Binding with Windows ... Forms 2.0) of binding a list of business objects to a DataGridView ... must be bound to an IBindingList object to be sorted.", ...
    (microsoft.public.dotnet.languages.csharp)
  • DataGridView and VS2005 Beta 2
    ... I have datagridview control on windows form with data binding to dataset. ... I need to do some verification on each row and indicate to ... datagridviewcellstle to change color but that worked only some times. ...
    (microsoft.public.dotnet.framework.windowsforms.controls)

Loading