Solved

Run sql query on onmouseover and display results

Posted on 2009-04-13
5
1,129 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
  • 2
  • 2
5 Comments
 
LVL 4

Accepted Solution

by:
Cakinci earned 250 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
0
 
LVL 1

Author Closing Comment

by:melinalt
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
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…
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…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now