-
Database Connection Error
We have a VB 6.0 application that displays a timeout error whenever large SQL tables are queried (over 30K records). Is there a solution to this besides extending the timeout value for the connection? We need to upgrade the app to VB.Net, but need to sort through spaghetti. Is there anything that can be done now to enhance the ADO objects used or re-enginer the code?
-
Here is the Error:
ADO Command Timeout
Runtime error -214721781 (80040e31)
[Microsoft][ODBC SQL Server Driver]Timeout expired
-
30K records is a small table in database terms. Sounds like you need indexes and likely query optimizations.
-
We have indexes on most of the tables hitting the server. It appears that the connections are not pooled and as a result each user is knocked out.
-
Are you using individual logins based on the user or a central application based login?
-
Central application login.
-
Do you enable connection pooling in odbc?
-
Is this done through the VB application or on SQL Server.
-
-
ado.net connection
connetionString = "Data Source=ServerName;Initial Catalog=DatabaseName;User ID=UserName;Password=Password"
cnn = New SqlConnection(connetionString)
Try
cnn.Open()
MsgBox("Connection Open ! ")
cnn.Close()
Catch ex As Exception
MsgBox("Can not open connection ! ")
End Try
yang.
-
if you want to know more about ado.net , follow th url
http://vb.net-informations.com/ado.n...connection.htm
yang.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|