SQL query time out

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • qfchen
    New Member
    • Oct 2006
    • 91

    SQL query time out

    Hi,

    I had one problem when query in VB.net. It fails at first time after SQL server restart, the fail message is "timeout expired". The same query success in second time onward, How can I set timeout in VB dataSet property? I use DataSet to communicate with database. Below is the query statement I used in FillBy() function.
    Code:
    cnt = Me.EM_AWARE_20kV2TableAdapter.FillByTOP_EndDT(Me.DataSet_ESD2.EM_AWARE_20kV, samples, toF)
    SQL statement:
    SELECT TOP (300) CdmFilter, DateTime, DateTimeStamp, Distance, EsdCntAll, EsdCntLast, EsdLimAbs, EsdLimLin, EsdLimLog, EsdMaxAbs, EsdMaxLin, EsdMaxLog, EventNumber, IP, SvCurrent, SvMax, SvRange FROM EM_AWARE_20kV ORDER BY DateTimeStamp DESC
  • Aimee Bailey
    Recognized Expert New Member
    • Apr 2010
    • 197

    #2
    question, do you leave the sql connection open when you restart your server?

    Comment

    • qfchen
      New Member
      • Oct 2006
      • 91

      #3
      yes, the sql connection open all the time.

      Comment

      Working...