Advertisement

Over 40 Experts attended the first Annual Core Conference! Take a look at what happened throughout the week...

2008 Core Conference

 

Welcome! If you have any general questions about Experts Exchange, feel free to ask me.

 
Time Tested LINQ Solutions: 51 - 75 of 98
 
Hello Experts, I create a function which returns an IQueryable or IEnumerable like this: object MyFunction() { var result = from Categories in dataContext.Categories                    ...
Hi Experts, I'm a beginner with LINQ so I would appreciate any help. I'm trying to insert a lot of rows into my database. The obvious way would be to do something like this:            ...
The below code is giving error when I want to use Count function:     var procQuery = from p in System.Diagnostics.Process.GetProcesses()                             //check for processes ...
I have SQL Server 2005 installed.  I am wondering if there is anyway to get LINQ to work in SQL Server 2005.  I also have Visual Studio 2005, unintalled, but I could install it. I understan...
I'm using LINQ to develop a website, i'm doing the DataContext.SubmitChanges() for Update, Delete, Insert. Is there a way for me to retrieve the Id of the newly inserted record without queryin...
Hello All I have installed VS2005 + 3.0 framework. I cannot find any reference to Linq. Could anybody tell me please how do I use Linq in VS2005 with 3.0 framework? Thanks in advance!
Below is LINQ query which returns the New records which exist in dtFreshdata  but not in dtSnapShot. My question is that how to generalize this code so that it works for all DataTables of di...
I would like to join and query an in memory query and a fresh linq query. I will try and explain. I have a query in memory (CurrentItem.ItemClauses). I need to then join this to a fresh dat...
Hi, I am trying to import an MS Excel XML document (2003 version of XL). The code being used is as shown. The issues I have are as follows:- 1) The For Each R in Sheet....<Row> sec...
I am quite new to LINQ and quite nieve last week I thought it was an easy language aspect to get in to. Anyway, i have a query that i wrote and for some reason the order by will not work on...
In a gridview I have to display data that comes from 5 different tables. I wrote a method that joins my tables using foreach loops to iterate over the data tables. Now I'm thinking about switc...
How do I randomize the returned records in a Linq to SQL query?
I am calling a web service that returns an XmlElement.  I'd like to use LINQ to parse through the results, so I need the results in an XDocument.  How can I convert the web service results int...
I would like to concantenate two database fields to make a first-last name string for an end result in a search. I am trying to use the sql server wildcard with LINQ. Can anyone see what I am ...
How can I use LINQ to read the XML and populate the database? I have XML which contains data in a 1..n hierarchy.  The database has a foreign key relationship defined between the two tables...
(a link to an image of the class designer and app is below) I have 2 linq to sql classes, Place and PlaceType.  A place is a restaurant and PlaceType is the type of food.  To add a new pla...
I am not sure of the syntax of a LINQ query, please identify the following items: 1.  From f In Th.AsEnumerable()   ' can "f" be any name I set it to? 2.  In th.AsEnumerable() ' is "th" the ...
From within the LINQ DataSource Selected Event I am trying to capture the record count from the e.Result. My LINQ DataSource is using the SELECT attribute to select only the fields from the...
I am curious how I can go about doing the following. I am creating an application that is similar to the custome data filter on excel. Here is an example of how the custom data filter would wo...
reader1.read sucessfully reads ea row created with the OLESelect Statement, in the Code Loop. However, when the last reader1 row is returned/read, the reader1.HasRows BOOLEAN Value shows 'T...
Hey all, I'm getting to grips with LINQ, and enjoying it quite immensely, however I am a bit uncertain as to how I would do SQL 2005 row_number() paging, as well as subqueries. I have whipp...
I want to query a table and return a list of distinct people. BUT I do not want empty entries that will given a blank line in the combobox e.g  Dim person =From p In Db.CDRs Select p.Appr...
Hi Iam trying to write a Linq select and join sentence however i need the query only to join values specified by both a local variable and some data in the joined table. I tried doing th...
Hi I have a very simple requirement which I'm struggling to get my head round I have linked my SQL datatables up to my VS2008 VB.NET app and I want to use the generated classes in the fo...
How can I combine results from two data sources?  The problem is that the second datasource result set is the 'current' data in the binding source and the first is the results that are showing...