Solved

Run sql query on onmouseover and display results

Posted on 2009-04-13
5
1,179 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 250 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 250 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

696 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