?
Solved

Run sql query on onmouseover and display results

Posted on 2009-04-13
5
Medium Priority
?
1,188 Views
Last Modified: 2013-12-25
APS .NET / AJAX
I want to run a sql query when the user does mouseover to few links on my ASP .NET page and display the results on a popup or tool tip window.
This query will hit sql and show special details of that particular item.
Do not want to pre-load information because the query is pretty long and would slow my page load very much.
Thanks,
0
Comment
Question by:melinalt
[X]
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
  • 2
  • 2
5 Comments
 
LVL 4

Accepted Solution

by:
Cakinci earned 1000 total points
ID: 24132924
I can suggest some few tips to make reading data procedure from SQL that i am using in my projects;

1-Using stored procedure will decrease the reading time.
2-Inside the store procedure try to avoid using unneseccarily joins. And select only required fileds. Try to give "where" parameters inside the SP. So the query will select the specific Sql line.
3-If you will only read values not write anything to sql use Datareader component only.(Do not use Dataadapter and Dataset component togother i mean\ only datareader)
4-If you have liblaries directly spesific to your SQL database like SQLDatareader use that one rather than normal datareader.

I hope those information will help.
0
 
LVL 1

Author Comment

by:melinalt
ID: 24133116
Thanks for your information Cakinci.
I actually need to display information on an onmouseover action.
I am looking for an option to display data comming from sql on an onmouseover action in my project.
preferible an AJAX control.
0
 
LVL 5

Expert Comment

by:striker46
ID: 24138802
While this doesn't address this specific question 100%, it can be of help regarding how to retrieve MySQL results with AJAX. The external page in the example uses PHP, but I don't think there's any reason why ASP or other languages would not work. The missing part is putting the results in a tooltip, which I personally don't know how to do.

Regards
0
 
LVL 5

Assisted Solution

by:striker46
striker46 earned 1000 total points
ID: 24138811
0
 
LVL 1

Author Closing Comment

by:melinalt
ID: 31569673
Even though the answers where not quite what I was looking for they both help me to realize the solution.
I created an accordion ajax control to display the list of item, however, the ajax onmouse over function (which should show run a sql statment) didn't work because it kept calling a button to execute sql and causing postback.  since it was in onmouseover the page didnt' stop flicking.
I used ajax to show the initial list and a basic javascript function to open a different page onmouseover.  The new page executes the SQL and displays the results.
Thank you both.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

jQuery is a JavaScript library that greatly simplifies JavaScript programming. AJAX is an acronym formed from "Asynchronous JavaScript and XML."  AJAX refers to any communication between client and server, when the human client does not observe a…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

770 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