.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Kaviya Balasubramanian
Sgraph Infotech
Imran Ghani
Post New Web Links

can sql queries work on the same form with Linq queries

Posted By:      Posted Date: October 15, 2010    Points: 0   Category :Sql Server
 

Goodday

I have a windows form with VB  and SQL database ,and i find that once i have written some Linq queries that the SQL queries do not work anymore . Is there any reaon for this and if so how can i overcome it?

THanks Rob


rh


View Complete Post


More Related Resource Links

Which tier do Linq queries belong?

  

Started in middle of a new project.  Our design architecture uses an n-tier (not MVC - no controllers) structure with Presentation, Data, Business and Service tiers.  However the lead analyst has the majoriety of code all in the Business tier claiming it all contains Business logic.  Our data tier is nothing more than a single .dbml model of the primary database to support all of the Linq queries in the Business tier.  To my mind Linq queries and classes they use are data access and belong in the data tier  but our lead analyst says they contain business logic therefore have to be in business layer.  


Data Points: LINQ Projection Queries and Alternatives in WCF Services

  

LINQ's ability to project randomly shaped data into anonymous types can be a blessing and a source of frustration, says Julie Lerman. It's great when you just need to grab a special view of your data, but it can be problematic in certain circumstances. She explains what the limitations are and how to get around them.

Julie Lerman

MSDN Magazine May 2010


Data Points: Precompiling LINQ Queries

  

Did you know that by precompiling LINQ queries you might actually be degrading your app's performance if you're not careful? Julie Lerman explains how to ensure you're not re-precompiling queries each time and losing the expected performance benefits across post-backs, short-lived service operations and other code where critical instances are going out of scope.

Julie Lerman

MSDN Magazine March 2010


Toolbox: Easy LINQ Queries, Becoming A Better Developer, And Logging Help

  

This month Toolbox provides help with error logging, finds an app that helps you write LINQ queries, and explores the non-technical side of development.

Scott Mitchell

MSDN Magazine September 2008


Parallel LINQ: Running Queries On Multi-Core Processors

  

Use Parallel Language Integrated Query (PLINQ) to take advantage of multi-processor computers and the newer wave of multi-core processors.

Joe Duffy and Ed Essey

MSDN Magazine October 2007


Time Difference in Linq queries

  

Hi All,

 

I have my Linq query in which i need to find time difference(not days difference).

The field in database is datetime.

Dim ldtToday As DateTime = TimeOfDay

Dim SR_RM_InnerJoin = From SR In lcntxRT60Entities.RtSReports _

Join RM In lcntxRT60Entities.RtRMaster On SR.RtRMaster.ReportID Equals RM.ReportID _

Select SR, RM _

Join linq queries with same field name

  
Hi everyone-I'm trying to join three Linq queries together.  One of the fields (rating) is the same name for each so when I add b.rating as you'll see below, I get a squiggly that says "Anonymous type member or property 'rating' is alread declared.   Dim customerCategoryA= (From a In dc.CategoryARatings _                                  Where a.userID = userID _                                  Select New With {a.productID, a.rating, a.ratingComment}) Dim customerCategoryB = (From b In dc.CategoryBRatings _                                 Where b.userID = userID _                                 Select New With {b.productID, b.rating}) Dim DataForGridview = From p In Products _   

Asynchronously Load LINQ Queries/Repeaters in Sections with Web Service

  

Hello,

I'm trying to  figure out the best way to load my main page faster.  What I'd like to do is have the bare bones of the master page display right away and on the Default.aspx Page_Load, call some web services that would query the rest of the items, in chunks, and then display.  I have 3 or 4 queries, which would be the chunks I am talking about. 

How would I accomplish this?  I tried putting Update Panels around the repeaters, but that didn't make the page show any faster, and the page still only displayed once all the data was queried.

I found this article, http://msdn.microsoft.com/en-us/library/2e08f6yc.aspx.  Could I call a web service and return a Linq Query and populate a Repeater on Default.aspx?  Would I need an Update Panel around the Repeater still?

I also found this article, which was very interesting in that it parsed and returned the actual HTML to plug into the page, http://encosia.com/2008/02/05/boost-aspnet-performance-with-deferred-content-loading/

I've been reading both of these for a while to try to understand which may be the best method to proceed with.  I'd really appreciate any a

Can LINQ be used with sql queries

  

Goodday

I have a windows form with VB  and SQL database ,and i find that once i have written some Linq queries that the SQL queries do not work anymore . Is there any reaon for this and if so how can i overcome it?

THanks Rob


rh

LINQ 2 SharePoint: recursive queries

  
Hi all,
is there a way to search items in a recursive way on a SharePoint 2010 list using LINQ?
For example, I have to search the last uploaded video in an Asset Library. This video can be uploaded on the root path or inside a folder. My query has to retrieve the last video uploaded, no matter if inside a folder or not.

This was possible with CAML: it was sufficient to set the scope attribute of a query to "Recursive". I am not able to do the same with LINQ.

Can anybody help me with this topic? Thanks.
Michele

Web Form import into Excel with Multiple Queries - HELP!

  

Hello all, I'm new to forum but been using the site for some time (good information on here).  I am trying to export data from a .aspx web page into an excel sheet.  There are a couple of things.  The web address is static, doesn't change when tables a populated.  Also, there are multiple input selections to query the results. 

I am trying to import flight information from all gateways for each day.  I am only concerned for the results coming from the "originating flight search" box.  I've been doing this manually for some time and the process takes several hours - its time to make it automated.

Basic excel layout:


Importing Access to SQL Server. How to Work with Queries?

  

I’m trying to understand SQL Server better.  I just imported a small Access DB into SLQ Server Express 2008.  I followed the steps below; very easy:

http://www.online-tech-tips.com/ms-office-tips/ms-access-to-sql-database/

 

I thought the Queries would be imported as Views in SQL Server.  As I look at it now, the Queries seem to have been converted into Tables.  It seems like the SQL is different too.  The results in the very first Table (which should be a Query) is totally wrong.  When I copy/paste the SQL from Access into SQL Server, I get an error:

Importing Access to SQL Server. How to Work with Queries?

  

I’m trying to understand SQL Server better.  I just imported a small Access DB into SLQ Server Express 2008.  I followed the steps below; very easy:

http://www.online-tech-tips.com/ms-office-tips/ms-access-to-sql-database/

 

I thought the Queries would be imported as Views in SQL Server.  As I look at it now, the Queries seem to have been converted into Tables.  It seems like the SQL is different too.  The results in the very first Table (which should be a Query) is totally wrong.  When I copy/paste the SQL from Access into SQL Server, I get an error:

Combining two LDAP queries

  

Hey guys, I have these two queries I'd like to combine into one.  Is there any way of doing it?
Query 1: (&(!cn=SystemMailbox{*})(&(&(ou>="")(name=executive*)(objectCategory=organizationalUnit)(ou=*operations))))
Query 2: (&(!cn=SystemMailbox{*})(&(ou>="")(name=50*)))
Thanks in advance.

Hey guys, I have these two queries I'd like to combine into one.  Is there any way of doing it?


<

C++ at Work: Form Validation with Regular Expressions in MFC

  

I thought I'd use this month's column to describe an interesting app I built using the RegexWrap library described in my article "Wrappers: Use Our ManWrap Library to Get the Best of . NET in Native C++ Code" in this issue.

Paul DiLascia

MSDN Magazine April 2005


Origin FLT# Dest Dep-Date Dep-time Arr-Date Arr-time A/C
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend