Results 1 to 5 of 5

Thread: LINQ Error

  1. #1
    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.

  2. #2
    Join Date
    Jan 2008
    Posts
    3,388

    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...........

  3. #3
    Join Date
    Apr 2008
    Posts
    2,005

    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

  4. #4
    Join Date
    May 2008
    Posts
    2,297

    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

  5. #5
    Join Date
    Jan 2008
    Posts
    1,521

    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

Similar Threads

  1. Replies: 5
    Last Post: 04-05-2011, 10:50 AM
  2. Replies: 6
    Last Post: 12-11-2010, 11:37 PM
  3. problem in Reading XML via LINQ
    By Steadfast in forum Software Development
    Replies: 5
    Last Post: 12-02-2010, 08:29 PM
  4. Server Error: 451, Socket Error: 10053, Error Number: 0x800CCC0F
    By Eigenberg in forum Windows XP Support
    Replies: 3
    Last Post: 03-06-2008, 04:13 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,061,590.79741 seconds with 17 queries