70 Topics

Member Avatar for
Member Avatar for SpyrosMet

Hey everyone, so I have this project for windows phone i have to do and I have to put some pins on a bing map, but in order to do that I make an API request to google for google places. I get back an XML file and it's like …

Member Avatar for Ketsuekiame
0
3K
Member Avatar for singularity~

My linq query won't insert my data. What am I doing wrong? class Query { musicEntities db = new musicEntities(); public bool findArtist(string artist) { bool status = db.Artists.Any(w => w.Name.Contains(artist)); return status; } public void insertArtist(string artist) { if (findArtist(artist) == false) { Artist art = new Artist { …

Member Avatar for singularity~
0
250
Member Avatar for MARKAND911

`insert into table1 (Wicket,Run,Catch) values (Wicket+2,Run+22,Catch+5)` This statement is used to insert data using StoredProcedure. How can i insert data same way without using storeprocedure but using LinqToSql. What will be code for it.

Member Avatar for pritaeas
0
100
Member Avatar for lulu79

I have a LINQ function to get 3 things :: Line, Average of Duration and Count I have a problem to sort it based on Average Of Duration column. Here is my code: Dim group2 As IEnumerable(Of DataRow) = _ From row In Ds.Tables(0).AsEnumerable() _ Group row By LINENAME = …

Member Avatar for lulu79
0
743
Member Avatar for lulu79

Hi, I have 2 datagridview. 1 to show TANTOU, TOTAL SUM of DURATION and COUNT of event happened. Another 1 is to show TANTOU, AVERAGE of DURATION and COUNT of event happened. I have use LINQ function to get the result. But how can i combine it so that i …

0
197
Member Avatar for israruval007

Ok let say i have the following xml file <Users> <User> <Name>David</Name> <Attempts> <Place>Paris</Paris <Date>3/29/2012</Date> <Duration>50 seconds</Duration> <Distance>100</Distance> </Attempts> <Attempts> <Place>New York</Paris <Date>7/28/2012</Date> <Duration>30 seconds</Duration> <Distance>100</Distance> </Attempts> <Attempts> <Place>Paris</Paris <Date>8/19/2012</Date> <Duration>70 seconds</Duration> <Distance>60</Distance> </Attempts> <Attempts> <Place>New York</Paris <Date>9/29/2012</Date> <Duration>60 seconds</Duration> <Distance>200</Distance> </Attempts> </User> <User> <Name>Lenny</Name> <Attempts> <Place>Paris</Paris <Date>9/29/2012</Date> <Duration>51 seconds</Duration> …

Member Avatar for ChrisHunter
0
238
Member Avatar for jineesh

I am using LINQ in my project. I have tried using update query. But this is not working for me. Please any body help me. Did I need to change any settings of my database? or for the datacontext? My code is as follows: here dc is the datacontext, getinteger() …

0
82
Member Avatar for PatSharbaugh

Earlier today, I was very bored. I set out to see if I could write a program that would solve 24 problems (see [Wikipedia](http://en.wikipedia.org/wiki/24_Game)). Now, I was bored, mind you, and I thought, "Can I solve it in 1 line of code?" NOTE: I do not recomend this approach, it …

Member Avatar for nerdwerd
0
173
Member Avatar for k1robert

Hi all please help as I am so stuck. My aim in to retrieve the information out of the xml soap file and store it in a database. However I havent got the slightes idea what i'm doing wrong. Please help I just want to write the values out in …

0
115
Member Avatar for Begginnerdev

Hello my fellow DaniWebbers, I have a question for you. Problem: I am troubleshooting an ASP.NET (some one else wrote) page that has an insert form. The user can insert, using linq, into the database. I want to check the database for the values before inserting the values. (Safeguarding from …

Member Avatar for Begginnerdev
0
321
Member Avatar for kRod

Hello all. I have a question on searching a List(Of CLass). I am not sure how it is labeled List<OF T> or List(Of Class) However you label it here is the Class EXT Public Class EXT Implements IComparable Private m_extension As String Private m_exe As String Private m_description As String …

Member Avatar for kRod
0
466
Member Avatar for aldm

Hi, I'm working on one project in .NET 4 and I use LINQ for database access. I have a problem. Consider a following code: Guid userId = new Guid(Membership.GetUser().ProviderUserKey.ToString()); IEnumerable<ViewCount> views = from vc in dbContext.ViewCounts where vc.Time >= dateFrom && vc.Time <= dateTo group vc by new { catalogueId …

Member Avatar for aldm
0
152
Member Avatar for apals

Hello, i am working on a section of a project, that uses large number of sum methods. These sum methods are applied on a Datatable To test the best method, i use the following **Datatable structure** Class ParseLog { public DataTable PGLStat_Table = new DataTable(); public LogParser() { PGLStat_Table.Columns.Add("type", typeof(string)); …

Member Avatar for thines01
0
347
Member Avatar for Twistar

Hello! I am making a simple web application with a database. I want to show all the members from a specific group. The group is selected in a drop down list which is populated from my sql database table tblGrupper. I have managed to populate a GridView with the groupID …

0
71
Member Avatar for barriegrant1

Im creating a project where the a blog can be submitted, the date is stored in the database as dd/mm/yy, however im using LINQ to SQL to get the date as well as other information, the problem comes when i want to display the date in a particular layout (similar …

Member Avatar for barriegrant1
0
177
Member Avatar for mani-hellboy

Hi friends., I am now try to study LINQ in C#.net which book can i refer and that is easy to learn and give perfect example code snippet

Member Avatar for thines01
-1
223
Member Avatar for Ggalla1779

Hi guys I need to find next highest no in a field that is a stick ref it has chars at front and 0 padded How so I strip off front chars and 0's to get actual highest no number in the table field? Am using LINQ against entity framework …

Member Avatar for thines01
0
214
Member Avatar for ddanbe
Member Avatar for ddanbe
0
1K
Member Avatar for dhanlak

Hi, Does anyone know how to sort using linq-entity. i use the following code: from i in objEntities.Items where .... orderby i.Name select i The result is item1,item2,item21, item22, item3. But, i want it to be like item1, item2, item3, item21, item22 Thanks

-1
79
Member Avatar for Mike Askew

Hi there, I have two tables in my data entity model accessed by StaffDB. Staffs contains: StaffID FirstName LastName Address Town County Postcode YearJoined CurrentGrade Role Ratings contains: RatingID StaffID Date Rating1 (automatic to avoid conflict with table name also of rating) Comments These are linked by StaffID. I am …

Member Avatar for thines01
0
954
Member Avatar for anwar.mustafa

I am developing a Windows Forms Based Application using dbo.database and Visual Basic: I populate some Orders in DataGridView1 using LINQ 2 SQL from "tbl_Orders" where OrderStatus is "Pending". I change OrderStatus Column Type to "CheckBox" in DataGridView, Now I want that when I select some records (Orders) by checking …

Member Avatar for adam_k
0
303
Member Avatar for Mullaly

Hi, I am a newbie to C# and OOP.. I need some advice regarding my requirement.. 1st Part: There are persons who use mobiles, of many subscribers and also have many numbers in each subscribers. If we consider the XML tags it would be [CODE]<Persons> <PersonName1>XXX</PersonName1><Subscriber1><SubscriberName>ABC</SubscriberName> <Numbers><one>123456</one><two>123456</two>....<twenty>20</twenty></Numbers></Subscriber1><Subscriber2><SubscriberName>ABC</SubscriberName> <Numbers><one>123456</one><tow>123456</two>....<twenty>20</twenty></Numbers><Subscriber2> </Persons>[/CODE] Like …

0
103
Member Avatar for ssreevidya.m

hai , I used LINQ in application. I want to perform batch update. For that i used the code as: [CODE] int[] istudentId = new int[]; int j = 0; for (int i = 0; i < GrdStudent.Rows.Count; i++) { if ((GrdStudent.Rows[i].FindControl("chkSelect") as CheckBox).Checked) { istudentId[j] = ObjStudent.Student_Id; j++; } …

Member Avatar for stbuchok
0
143
Member Avatar for croker10

Hi All, I am trying to use to linq to retrieve some data, and creating my queries dynamically with where clauses added to an IQueryable object. The problem I am running into is filtering for days of the week. In the table, I have a datetime of a call. I …

Member Avatar for thines01
0
220
Member Avatar for drax12

hey, i am developing a booking system and i want to check whether user check in dates are within booked dates. for an example. user wants to book 12/03 to 14/03,but some body has already booked 10/03 to 15/03. For this scenario, we just cant check for 2 days,what i …

Member Avatar for zmeditation1
0
97
Member Avatar for drax12

Hey guys, I'm want to retrieve results from the database, where datetime picker given value, is equal to database value. var _check = (from day in Check.tbl_employees where day.d_from== _frm && day.d_to == _to select new { day.desg_id, }).FirstOrDefault(); datetime picker gives a value with its time,but i'm only interested …

Member Avatar for drax12
0
711
Member Avatar for RicardoE

Well first of all, I want to know if it is true, is Linq faster than default Collections methods like, contains(), size() etc... for example if I load a 3MB text list into a List<T> to find a specific string, will it be faster to use Linq or normal methos …

Member Avatar for Momerath
0
129
Member Avatar for Timmo987

Hi! I need to be able to change the location of the database at runtime through a menu in my program. My question is how to best achieve this. If for example the ip to the server change, the user need to be able to update the database path; i.e. …

Member Avatar for Timmo987
0
184
Member Avatar for barriegrant1

hey, im currently creating an e-commerce store, im quite new to ASP.NET and C#. im trying to create a menu that is generated based on the database tables. i have created a stored procedure, which works correctly: [CODE] ALTER PROCEDURE dbo.getProductsForCat AS SELECT * FROM products_cat WHERE product_cat_id IN ( …

Member Avatar for barriegrant1
0
292
Member Avatar for fullmetalboy

The main problem is that I recieve the following message: "base {System.SystemException} = {"Unable to create a constant value of type 'BokButik1.Models.Book-Author'. Only primitive types ('such as Int32, String, and Guid') are supported in this context."}" based on this LinQ code: [CODE] IBookRepository myIBookRepository = new BookRepository(); var allBooks = …

Member Avatar for kvprajapati
0
211

The End.