我試圖在vb.net應用程序來執行此更新查詢:vb.net SQL更新查詢無法完成
SQL = "UPDATE billing_calldata SET status = 'c', customer = '" & customer_sequence & "', description = '" & description & "', customer_cost = '" & customer_cost & "', customer_ac = '" & customer_ac & "', customer_sc = '" & customer_sc & "', reseller_cost = '" & reseller_cost & "', reseller_ac = '" & reseller_ac & "', reseller_sc = '" & reseller_sc & "' WHERE sequence = '" & sequence & "';"
,但其採取的年齡,甚至沒有完成。
在ExecuteNonQuery()
的說法:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
這可能是導致它不完整?
我抄查詢(正確的值),並試圖直接大約需要49秒的服務器上運行(但實際完成)
我已經在表中添加一個索引我sequence
列
您是否知道,如果客戶說'Ziggy's Hardware',那麼以這種方式創建SQL會崩潰?而且它強制這些成本項目串?使用SQL參數 – Plutonix
你對換行符有什麼作用? –
@Plutonix客戶列只有一個整數,所以永遠不會有任何''' – charlie