Presenter:Jim Wilson
The apparent absence of commonly used LINQ to DataSet extension methods in Visual Basic device projects can complicate many data binding scenarios. In this video, Jim Wilson explains what’s behind this apparent limitation and provides options for working around the issue.
The following text is a software generated transcript of the video. Click on a minute link to jump to a location within the video
Minute 0
I would kill some present of Judaism corporate in this aorta talk about how to work around some of the limitations of using link for data sets were working in Visual Basic for devices so I m talking about is that you ll find that there are certain features when you re querying data sets of link that worked just fine in Visual Basic for the desktop as well as see sharper with the desktop and devices of known as common ones of these is the Dataview extension method get what appears to be a blog in the Visual Basic for devices apartment we find absurd extension methods don t work properly the response about now to improve that and what our options are for working with us Lisa s can build a Visual Basic device projects to show you exactly talked about this with a greater new project new project
Minute 1
The Visual Basic Smart device project and what is good and call this are a VB link data view be being so paying good make it went as Molson six and cover for every five and I were talking about the next work as well as mobile five and 22 003 as he is showing missiles accidentally as a popular support in Suzuka will get that there still is an avid view source described as will set us out gives you would have any other data were in a project reason got my solutions for there to say data at new data source sitting next going to do is amuse the
Minute 2
Just read under a program files to the server competition 35 samples as he zephyrs the Northwind database and let them go ahead and say okay known click next course of safety when it is database for your project so you simply could do that and it will descry one table year was 50 orders table that was damaged over to Nixon s visit us so not sold on really got that imported verified to endow my data sources I now have a data source to source table so I dragged that a reader and does you expect to be a good integrated in the data center sense and adapter things develop more rights on over here and again still this guy that there was a missile filter for Sears filter that there still is so ideal is always a link query
Minute 3
Told are so it only contains those orders are shipping to the UK are so easy to is just a start excitement here for him say selected roads equals in this Pacers fan out licensing just equals will decide from order and her Northwind database to dissent our orders table at their service anywhere order shift country equals UK select order this might so that s their set is like forced know what is at this as a data source ford immigrant rights are given as they order
Minute 4
What I want courses the selected rows now if I try or run this now is what it should have selected rows if you look at a Typhon that we get a tax implication of eye and memorable or such a generic collection force the durable interface is located in the binding of simple flames it s not a sufficient for more complex types so we need his latest is a little list may add or easily as force a higher level data bindings so what does Google commonly do is it okay while this sauce a copy to this night is here that I could not work in a nicely as simple using the Excel is what I worry about that is a slight difference if you re working on the desktop or a teacher practice in your DB URL of the import seems you need for all the extension medicine show up with why does it exist out there
Minute 5
Was go into our project properties will do is a good or references in all you do is down here looking at system data bed and check that guy say this close at and now we can do our copy today feel bristle at a divorce is that the ahead and take all those rows that were selected based on the query and greatly guilty to a data cable force with waxy filter them down does not doubt that works okay to want any aware of those that you can really only copy it would be a row from one table to another would you have to do is create a new data row in the new data table in a row it only been one day they select as we say but it is able
Minute 6
Only if killing is actually have a new data table and respect but with new copies all the data rooms so that means that the data rows are being displaced your data grid are not the same gay roads that were in the original orders table recipes did agree to do changes against the data that can be different data rows than once in the export table also as monkeys are made to the rosary cable will be reflected in your grip if you want that new data table now what do we also like to do in the executive of the best solution to this is that what he is the as data view extension method may not sure that that line doesn t compilethat it s perfectly legitimate to actually use result of a link weary and using as Dataview sentiments are infected to go do a lookup MSDN docs for as they view as one of the examples is a statement almost
Minute 7
What I have here is to understand what s happening the listed as the screening the other project this will be a Visual Basic desktop project is just atrocious new Visual Basic Windows ghostwriter VB link Dataview desktop leaving so good and well they do as I build you basically the exact same project in the Gerber data sources to add the exact same data source said that when a database of a data source in order there and get the Northwind database pain so came saying next society when it s for your project and was it you said to mix a faster because of the desktop supports configuration files as you wouldn t store this configuration string so you can do that
Minute 8
And of course what they will a lot write why one of the orders table dissipated on the device is with there are two bills that saw us now with a duplicate the rest of us to go in here just start going here to my data sources regret the order server at a lower data table there is just data view for data table and while do then is that this is to double button on your site really simple and so this one will be to start filter citizens as filter does filter paying double click OKs now we rearm of inner click to rate all I do is go over to our device project for copy and paste the code in
Minute 9
It won t compile this print river to the suppression of treason in your local city to change the name of the great because on the desktop least immigrant Jews Pisces data grids but is this code compiles the dustup bikini difference is that Lucas selected rows here the compiler recognizes that it should make the return value and innumerable row collection I was a rich type that no zealous tour they arose with you having row collection you access to all the extension of the sport including the active favorite go over here for device side in the compiler fixes to be a simple eye in the role collection is very simple collection as a sex preventing us from getting access all the features we know you might consider explicitly cast their typing this as that site and if you do that ask you to say as innumerable
Minute 10
Were lax and so forth unless you count him out attacks this is something I saw on honor of his by comparing what would you stopped flow into your user device is I was just so that is a writer devices in and out its local to only devices works as he startled at a summit place is responding it on the desktop so so it just hope will get fixed in sooner rather than later but for now ago do it now discussing a couple different workarounds and that shouldn t emulate I m sure there s many more like a law show you but before I show you what because he says with considerations are when you make a choice now one thing for your further out as I shall distill you do for simplicity and assigning us later rose to the grids to
Minute 11
Readily know that we re doing content data binding this accident of a Visual Studio would only work directly against the grids and more waxworks and binding source by soap I really don t you would do for real this is actually really the orders binding source that has sat so now this I divine source is never that my sister is a distraction against Laura to presenting with this list is something you re now to put this and we know things as Dataview but what we really want his references to the actual records that are in a table for no Dataview is what we do that but I ve got a collection of those records anyway so I can do something like what to list here for too listed back about an collection has a high list of limitation and I listened the case is enough to make a data source bind
Minute 12
Work for grid well with you have is your not just as a little functionality for application of the adequate handler for the grit restlessly faces election is called down here in dysfunction and allegedly really simple like a descriptive name of that particular order to sin out whatever we handle the current change where we can ask a go out to her orders data for your orders binding source where the current property will give us back what s their number whenever we data binding is a data table were really is a data view and so is that this current property is actually a data row view as I say it in order row view as data to read equals Red Hat Redick and then say them
Minute 13
Order to pass with a data set order row equals the order reviewed a row in as an apologist for use in message watches as a slice of Chrysler s Jos of MessageBox and with us throughout our order shipping this as a simple fix on what we handle this sort of thing facility affected by federal Mr is so good and will run it in this regard is to start it present when you want to do now is that whenever we click on a cell when I have a show us of the Natick is a great so ask them to reorganize and a better you should assume who I see the name he does with this as I click on this I get to name
Minute 14
It s because the a row now this day looking at right now is the data as it was populated from the river data binding code in Visual Studio can enforce somewhat insulted us is that how reduces its own UK ones who want and click on this sissy about a name there s been an exception pricing is an invalid cast exception to follow here is that when we did a bind against the original data table we get the data reviews we had to do this kind of indirection to raise a unit to rove knew and then get the row but the way we populated our data source here we have taken to the series of data rows and put the data source to find that we re getting inconsistent contents in the job they abide right so that means that we have to deal with a somehow red silk to two choices are dealing with and which ever one works better for you depends on how complicated and how many queries you re dealing with an
Minute 15
Gives off the sky now one possibility is a change this query so that returns Pierrot views instead of their resources can copy this covenant are getting tired the first round with this in place so we can do here is that we can say what you want write me back the actual rose the confidence able to hear back to default view member of the default view for any data table if you haven t modified it gives you every record in the original tables of the fall view to shows directly to the underlying a data table so with that I can say that wealth rather than order Wednesday order row view now one thing is that we change to this kicker syntax the complete of heartache would figure out what type were road you order row view should be threats to us to
Minute 16
Some say as data row view that if you re not problem rights in our getting back the actual room views so we committed our order row view or a view and what you use a real road is under their price was one of the Ribeiro row Ellicott is that the row exactly typed as original data row or not an orders row so we can t access to these properties Razzano to do with that environment always do here is to cast CC type out a cast my order review row to be a Northwind data set orders row saw cast it to be worth row so now it understands that property and of the return back the data review for that president done here is just modify my query to the IMAX returning back
Minute 17
The reviews so now if I do that the sales like code is a short fine now because I m returning back to your reviews something reviews of the data source such as the same datatype in just both cases I would just see riddle binding code or the result of my link run out case in our cruise is a prime opponent urged the name is fine to expect too now will filter it is that runs are at our link could now will click on one of values in the sun networks raises one solution forces the basically just modify our query so the returns back today reviews as you find a fusible queries is a really reasonably go because the base maintains consistency in the data that is returned by the current property but it considers that if you
Minute 18
Absent a simple query may read a lot of you long complicated queers with that case the intended use of the latest to get very cumbersome very quickly risen the alternative is a system as code to your class that takes care of detecting which the data comes back as a way to take this is Alex R reviews is go back to use returning an actual data row and then Redick of hard to do so expect a day to review the sensible property or this was a read only property and property will close that our current order through there and will do here is what I steal some salutes of your before did a terrific essay in place and write and say to our order binding source the current
Minute 19
Three is a type of operator through is a type of the current is a data row view well if that s the case we do all the stuff of your residues could grab that line us via satellite and they re not litigating to scrap first this declaration or a tight run to cursor downer to the inside here so that the declaration is it now down inside my properties here I can say of a city order equals around our order row view row to doubt that they are selected as our actual row now if
Minute 20
Over getting is not a data row view was that s the case we do say that our order equals the order binding source for current prints it out with that poor dog in this return order rates and now we have a distraction so that we can write it we do what should we do our initiative I think they re due to reviews and their right disk property and record has a review into the two steps access a row yet we do our data binding and we do it if please are links to do the data binding when our being data rows in place so and I case our farm produce a sailor to their own company or industry back was directly so that being the case limiting to exist to hear comment that out and to say something like death order as our Northwind is set
Minute 21
Referral equals current were so now that it is a section for still the extraction of how to make a decision is one place I can read all my late queries just what I want to his return back a list over us rather than a data review and and Israel might do in terms of this property ran over the text happens out here racist in the break when let s see how the Softworks and somebody start up casework running busyness live binding upon your return for food resolute take a look here where we got our current property notice it is a data review versus SF through your a good data review if the row is the worst of why I hear it if the row of
Minute 22
Are on their MessageBox now if I filter it right now is that the data rows loaded in their click on one cells get to hear recurrent now is more as row substance here is my outsider to do as row as a discover on the networks are as well face it to resolve the force still feel ideally we would have to do you want to the source or does it neither one is perfect about severance of issues I find again that I have a couple queries I find returning back to the room views from queries is nice because he s only consistent almost elected to review the buying of rights fact is I get to work topics of queers are a large number of queries as I is much easier to write them so they return back to rose it is usable probably like this abstract out accessing the individual Roback went back in
Minute 23
Image you will some president has incorporated in for time
Click here to go to original video page
Monday, June 16, 2008
Video: How Do I: Work Around LINQ to DataSet Limitations in VB Device Projects?
Labels:
mobile development
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment