why I have to put limit in the query

Posted on 2013-01-10
Medium Priority
Last Modified: 2013-01-25
I have MS  SQL 2008 and visual studio. I have MySQl query run in Visual studio by MySQl connector. For whatever reason, when I put "limit 2000000" in the MySQL query, it returns correct records. But, when I remove "limit 2000000" in the MySQL query, it returns null. I don't understand why. I want to remove "limit 2000000"

When I use MySQL editor from MySQL front to run the query without limit set, it returns the same records. I don't understand why in Visual Studio connecting to MySQL, I have to put a limit set in query???

Here is the query structure

select ...
from table
limit 2000000
Question by:wasabi3689
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
LVL 83

Expert Comment

by:Dave Baldwin
ID: 38766126
Many times the drivers enforce their own conditions.  Are you using the same driver for both Visual Studio and MySQL editor?

Author Comment

ID: 38766143
I don't think the same driver. But I want to use VS driver. Is there any way I remove the limit set to be able to populate the data?

I am using following connector

MySql.Data.MySqlClient.MySqlConnection, MySql.Data, Version=, Culture=neutral, PublicKeyToken=c5687fc88969c44d
LVL 83

Accepted Solution

Dave Baldwin earned 2000 total points
ID: 38766155
I don't know about the limit problem.  All the MySQL connectors come from MySQL including the .NET which is on version 6.6.4 now.  You might try the newer version and see if it works better for you.  http://www.mysql.com/products/connector/
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more


Author Comment

ID: 38766171
I see all download for 32-bit OS. I have 64-bit OS. Where to find the download link?
LVL 83

Expert Comment

by:Dave Baldwin
ID: 38766199
If you click on the dropdown and select ".NET and Mono", it will show a 'Architecture Independent' download.

Author Comment

ID: 38766214
After I downloaded ".NET and Mono", I don't see .exe. file? How do I configure it into VS ADO.net
LVL 83

Expert Comment

by:Dave Baldwin
ID: 38766246
I don't know.  That download does include a bunch of DLLs and a CHM Help File that contains information and programming instructions.

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question