Solved

Run sql query on onmouseover and display results

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS SQL Update query with connected table data 3 62
MS SQL and column defined as time 7 25
Html split(text) 2 30
JSON/JQuery/AJAX Error Identification 2 30
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, …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

749 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