Extract Some Data From A List With A Linq Querry?
Nov 15, 2010
I need to extract some data from a list with a linq querry like
(from p as MYClass1 In List where P.Datetime> UserDate1 P.Datetime< UserDate2 Select p Skip (StartPoint) Take (Range)
View 2 Replies
ADVERTISEMENT
May 12, 2010
If I write
[code]...
View 1 Replies
Jul 29, 2010
This is what I want to do as seen in C#(loop against a list and fill another list from its data using Linq)
[Code]...
View 1 Replies
Jun 22, 2010
I wonder how can I extract numerical data from a column of a list view and sum every and show in a label?
View 1 Replies
Apr 19, 2011
I have a list of data as shown below
Original Data
Genre Name Year
Comedy Shrek Forever After 2010
Drama The Karate Kid 2010
Action Iron Man 2 2010
[Code]...
View 1 Replies
May 4, 2012
This is my function:
Public Function GetAllEmployee() As List(Of Employees)
Return DB.Employees.Select(Function(q) New With {q.EmployeeID, q.LastName,q.FirstName}).ToList()
End Function
I'm getting an error:
Value of type System.Collections.Generic.List(Of <anonymous type>) cannot be converted to System.Collections.Generic.List(Of NorthwindModel.Employees).
View 1 Replies
Jun 22, 2010
I have a specialized string dictionary of (string, string) (_RulesAndTheirDescriptions) that contains the name (key) and description (value) of methods in a given class. I currently do the following query to search for a match on the key or value and then bind that to a grid.
[Code]...
View 1 Replies
Oct 26, 2011
I have these objects:[code]Using LINQ I need to take a List(Of MakeInfo) and a List(Of ModelInfo) and aggregate the StockInfo from ModelInfo into the List(Of MakeInfo).So for each MakeInfo I will have a total count of all stock where MakeInfo.Name = ModelInfo.Make, and also a minimum price.I think it's going to be something like this, but I'm having trouble accessing the nested object and not sure if it's going to be possible with a single query.[code]
View 2 Replies
May 26, 2012
y have this class
Private Class MyClass
Public Property propertyOne() as String
Public Property propertyTwo() as String
[code].....
View 2 Replies
Jun 1, 2011
How can I get a new distinct list from an existing list using LINQ? This is what I have so far and it is not distinct but does give me a new list.
Dim tmpQryColumn = (From a In _allAudits
Select New CheckBoxListItem
With {.Id = a.AuditColumn, .Name = a.AuditColumn}
).Distinct()
_columnList = New List(Of CheckBoxListItem)(tmpQryColumn)
View 2 Replies
Dec 22, 2010
I have 2 classes
Public Class Shipper
Public Property ShipperID As Long
Public Property CreateDate As DateTime
[Code].....
View 1 Replies
Mar 12, 2010
How can I get a new distinct list from an existing list using LINQ? This is what I have so far and it is not distinct but does give me a new list.
Dim tmpQryColumn = (From a In _allAudits
Select New CheckBoxListItem
With {.Id = a.AuditColumn, .Name = a.AuditColumn}
[code]......
View 2 Replies
Jan 25, 2011
I have two generic lists, named ListA and ListB. Both ListA and ListB could potentially have duplicate items. What I would like to do is use LINQ to grab the items in ListB that are not in ListA, but I'm unsure how to do so.
View 8 Replies
Nov 23, 2011
I'm trying to create a list of days(integer) from a list of dates(date).
I tryed to do this....
[Code]...
View 4 Replies
Mar 28, 2011
I am writing app in vb.net
I have two variables one with list of RoomRate and other with list of RoomTypes.
We have RoomRates and RoomTypes linked with RoomTypeInfo variable insite the RoomRate.
So how do i find the RoomTypes which donot have the RoomRates Defined.
My Sample Code:
class RoomType
property UIN as integer
property Title as string
end class
[Code]......
View 2 Replies
Jun 30, 2009
I'm basically brand new to LINQ. I've seen some examples that allow me to strong type objects using LINQ but I don't really understand them because they're in C#, which I guess lets you do different things with LINQ(I think?). [Code] I just want to get a list of all the products from the XML doc and put them into a Generics list.
View 3 Replies
Aug 8, 2011
i want to extract items of a list(40) to a sublist(5)
sublist.items = list.itmes(2,6,12,21,27)
what is the right syntax
View 10 Replies
Oct 6, 2010
I'm sorting data in a dictionary there each key has a list with like 3 items.I want to get all the data from the dictionary to a datatable with the key and the list items on the same row.
all i manage to get is "key" System.Collections.Generic.List`1[System.Data.DataRow]
i'll guess somehow i will loop trough the list and add all elements to a string?[code]...
View 10 Replies
Jun 2, 2010
I've not found any info on this again, i think i asked a while back ago and can't find it. But what I have is an application that stores data in xml files. I read these files in/out through datasets. My question is, can i filter or requerry these datatables in the datasets? and how?
View 7 Replies
Sep 22, 2011
im having some problems, when i do my query from my vb.net program to my mysql DB the data is sent, but its missing some things, let me explain.my query is pretty simple im sending a file path to my DB so that after i can have a php website get the data and make a link with the data from my DB, but when i send my data the results look like this.[code]but next time its going to be something else so i cant hard code the paths, i was looking more of a sql query switch that i might not know, since i already thaught about searching my string and if it finds a backslash it adds another one, but i feel its not a good way to script the whole thing..
View 3 Replies
Jul 15, 2010
I've search this forum and haven't found the answer to this problem and bing new to VB 2010 [cod]e...
View 8 Replies
Aug 19, 2010
I have a code to pass the querry from a one page that has a gridview hyperlink but what i didn't know is how to retrieve it.. Here is my code
[Code]...
View 2 Replies
Aug 27, 2009
I have one text box where i display my current time now i want that current time record to be display in my second text box
View 4 Replies
May 16, 2009
can somebody tell me what is wrong with my insert statement? Error: Syntex error: (missing operator) in querry expressions
Dim insertQry(1), insertString As String
insertQry(0) = "insert into activities(activities, place, days, act) values"
insertQry(1) = "('" & txtStudents.Text.ToString & "','" & lstEvent.Text.ToString & "', '" & txtNote.Text.ToString & "' '" & txtName.Text.ToString & "')"
[Code]...
View 35 Replies
Jan 11, 2010
How do I Extract all Characters in Unicode, UFT8,iso-8859-1 to 9 etc to a list or array In VB?I have a SQL Database of which contains values from 51 languages. I need to detect which ISO-8859-? Was used to encode the string value. For example Turkish Characters i.e. "Ö Ş ş ğ ü Ç" Once I have the correct ISO, I need to convert the Chars with-in the string to Unicode using only if the string value contains values that are not UFT7, and convert the string to HEX?The reason I need to detect the ISO etc is because we are sending SMS, of which jump from 160 characters to 70 if a special characters are used, i.e. "Ö Ş ş ğ ü Ç" Is there a simple way to extract the ISO-8859 Character Set to a Array etc, or is there a simple way to check if the character exists with a ISO-8859 data set?
View 5 Replies
Sep 26, 2011
I have an application that receives data input from an automated set of devices. This data stream I have managed to capture & get it into a list box which I can sort based on the Device ID & the time that the response was received.There is a set time window for the devices to transmit their data into the application and during this each device is not limited to the number of responses it can send (ie :- Device 1 can send in 2 responses where Device 3 can send in 40 responses, etc).All of the responses are captured, listed & sorted within the listbox (this bit is working ).I now need to extract the last (ie:- latest) entry in the listbox for each Device ID & this is where I am stuck. I can retrieve the last item in the list but cant seem to extract the last item for each Device ID.[code]
View 2 Replies
Sep 3, 2009
I have simple ASP.net web form. With a simple click on a button i need to call a the Multithread process in order to execute my querry in SQL Server DB. I know that my querry willl take up to 45 min to be executed. While the process is running i need to display some status information like: Starting time, Time elapsed, % of completed...So after running the process i got the following error message: "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."So i have 2 problems to fix:
Avoid getting timeout while processing/calling the stored procedure. I tried to add cmd.CommandTimeout = 1000 but it didn't work out!
Display correctly Time elapsed and % Completed while processing.
Here's my code in the main form:
Imports System
Imports System.Data
Imports System.Configuration
[code]....
View 3 Replies
Dec 15, 2010
I got an object of List<List<string>>I need to bring this into a ist<string>I have no idea how to do this with LINQ.
View 1 Replies
May 11, 2011
I am trying to use linq to query a List(of T) object, but when i type in my linq statement it comes back with the following error: Error57Expression of type 'System.Collections.Generic.List(Of BreakoutData)' is not queryable. Make sure you are not missing an assembly reference and/or namespace import for the LINQ provider.D:\Code\OLGA35\BreakoutByBusinessUnit.aspx17025D:\Code\OLGA35\
I have looked at my web.config and I have the imports:
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral,
[CODE]...
I have put in several imports at the top of my page, but that hasn't helped
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="System.Core" %>
[CODE]...
I'm not sure what to do at this point.
Here is the code that is relevant:
Dim ListCollection As List(Of List(Of BreakoutData))
Dim GroupList As List(Of String)
Dim DataList As List(Of BreakoutData)
[CODE]...
Everything i've found on google just says to add in the System.Core, System.Data.Linq references, but as far as I can tell it all is setup correctly
View 1 Replies
May 25, 2009
I am trying to use linq to query a List(of T) object, but when i type in my linq statement it comes back with the following error:
Error57Expression of type 'System.Collections.Generic.List(Of BreakoutData)' is not queryable. Make sure you are not missing an assembly reference and/or namespace import for the LINQ provider.D:\Code\OLGA35\BreakoutByBusinessUnit.aspx17025D:\Code\OLGA35\
[code].....
View 6 Replies