October 19, 2006 at 12:20 am
Sir,
I am new to this site.
Technology Used
1.Front End-:Visual Basic 6.0
2.Back End-:MS-SQL 2000
3.ADO 2.5
4.MDAC 7.0
There are 100 use per site.There are 15 sites. which are connected through Lease Line.The server is located now at rremote location.
Now due to it we are getting errors in software like "TIME OUT EXPIRED" often and on.
What it could be ...
The connection is without DSN no ODBC used for it.
and please let me know connection time out is in MILISECONDS or seconds.
I hope you will look into the matter and waiting for your favourable reply.
Regards,
Chirag Parekh.
October 19, 2006 at 12:49 am
Chirag
ur problem could be because of ur lease line connection being slow
Or some bad performing query locking up resources resulting in time out.
time out is in seconds and 0 stands for unlimited time out, but in reality SQL does not wait indefinitely.
"Keep Trying"
October 19, 2006 at 10:59 pm
Rookie,
Thanks for your concern and support.
Can you guide and assist me to trace out this error and query which are taking time.
If cn.State <> 1 Then
With cn
.ConnectionString = OpenFileforRead
.ConnectionTimeout = 180
.Open
.CursorLocation = adUseClient
End With
I wanted to know whether the secconds are enough or not and How much time the sql takes to fetch the query in (seconds)
Thanks&Regards,
Chirag Parekh
October 20, 2006 at 2:14 am
Chirag,
I am sorry I can't help with the timings but I see that you are using a client side cursor. This suggests that you are draggging data down the line and processing it locally. Try a server side cursor and use stored procedures where possible. The downside of a server side cursor is increased server load and reduced functionality. I infer from your code snippet that you are performimg a read on the database. You might also try the forward only cursor type
If I remember correctly:
.CursorType = adOpenForwardOnly
.CursorLocation = adUseServer
This might improve your situation.
Shaun
Quis custodiet ipsos custodes.
October 20, 2006 at 3:25 am
Newbie,
i agree with Shaun there, that wud be the best way to do things.
to know the time taken by your queries use the tool "SQL profiler". U shud get enough info about how to use it (in case u dont know) from BOL or the NET.
"Keep Trying"
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply