Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



LINQ Error

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 28-11-2009
Member
 
Join Date: Nov 2009
Posts: 1,191
LINQ Error
  

Hello folks,

Posting a new query about the LINQ. I am using SQL EXPRESS for my database and i have created a datatable in it. But the problem is that i am unable to run the LINQ code onto it. The datatable code is generated automatically. Whenever i am running the command it prompt me error about the definition of SingleOrDefault and no extension for the same. Now you help me because i have already tried hard but not succeeded

Thanks in advance.

Reply With Quote
  #2  
Old 28-11-2009
Member
 
Join Date: Jan 2008
Posts: 3,384
Re: LINQ Error

Hi,

First let me know that from where you are getting generated code. Is it some where form the Linq to SQL classes or is it from the Link to Entities classes.If its not coming from any of the above then you can move to the client side query to Array() as result. Try to use linq to object. Try this out it will work with the LINQ error and your database will start working properly.

Say thanks if you liked the idea because a thanks may be appreciated.

Bye...........
Reply With Quote
  #3  
Old 28-11-2009
Member
 
Join Date: Apr 2008
Posts: 2,001
Re: LINQ Error

A well-designed set of error handling code blocks can make a program more robust and less prone to crashing because the application handles such errors. Know when to set up a try/catch block. For example, you can programmatically check for a condition that is likely to occur without using exception handling. In other situations, using exception handling to catch an error condition is appropriate. The following example uses an if statement to check whether a connection is closed. You can use this method instead of throwing an exception if the connection is not closed.

To know more about the exception handling click here
Reply With Quote
  #4  
Old 28-11-2009
Member
 
Join Date: May 2008
Posts: 2,293
Re: LINQ Error

Hi,

Here i am discussing about the throwing exception from the component. Visual Basic .NET also supports unstructured error handling using the On Error Goto syntax. While this kind of error handling will continue to function in your components, it is not recommended that it be implemented. Code written using this method of error handling is difficult to debug and maintain, and it can degrade application performance. Structured error handling, using the Try...Catch...Finally block, results in code that is easier to maintain, more robust, and more flexible in the way that errors can be handled.

Detailed information about the same is here
Reply With Quote
  #5  
Old 28-11-2009
Member
 
Join Date: Jan 2008
Posts: 1,515
Re: LINQ Error

As per my knowledge, Which i gained from the MSDN. LINQ is a set of extensions to the .NET Framework that encompass language-integrated query, set, and transform operations. It extends C# and Visual Basic with native language syntax for queries and provides class libraries to take advantage of these capabilities.

Thank you
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , , , , , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "LINQ Error"
Thread Thread Starter Forum Replies Last Post
Getting Error message ?Northbridge Error, node 2<0>K8 ECC error.? in CentOS 5.5 Pawna Operating Systems 5 04-05-2011 10:50 AM
error “shmget (lowmem) error: Unknown error 999” on linux -Wamil- Operating Systems 6 12-11-2010 11:37 PM
problem in Reading XML via LINQ Steadfast Software Development 5 12-02-2010 08:29 PM
Server Error: 451, Socket Error: 10053, Error Number: 0x800CCC0F Eigenberg Windows XP Support 3 03-06-2008 04:13 PM


All times are GMT +5.5. The time now is 09:57 PM.