如果您想更詳細的回答,請描述你現在該怎麼做你的過程。
有幾個原因,爲什麼你的過程中花費太長的時間,例如:您的數據庫和我們的應用服務器之間
- 連接。
- 如何編寫用於檢索或更新數據庫的代碼。
- 您使用哪種提供程序進行數據庫連接。
- 是否有很多東西需要更新,什麼樣的數據。
等等。
的jQuery AJAX樣本(這是Ajax調用用jQuery功能):
<script type="text/javascript">
//this is for handling the button click event
$(function() {
$("#btnTest").click(function() {
//this is to call the function if click was initiated
AjaxTest();
});
};
function AjaxTest() {
//this is variable to collect data
var _ajaxData= { firstName: "John", lastName: "Smith", email: "[email protected]" };
//this is the main ajax function, it basically send the collected data
//to AjaxProcessPage.aspx and response back
$.post("AjaxProcessPage.aspx", _ajaxData, function (data) {
if (data.status == "ok") {
alert("Data is ok");
};
});
}
</script>
<body>
<input type="button" name="btnTest" id="btnTest" />
</body>
說明是在註釋,這基本上是在客戶端側。當數據發送到AjaxProcessPage.aspx時,您可以在該頁面上插入流程。
有關jQuery的Ajax的更多信息: http://api.jquery.com/category/ajax/
欲瞭解更多信息jQuery的約$。員額()函數,我用: http://api.jquery.com/jQuery.post/
嗯,你需要在SQL事件探查器跟蹤,看看如果你的SQL在30秒內佔用了25個:P – 2012-06-22 03:36:49