473,320 Members | 1,900 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

ODBC Driver error '80040e31'


Hi,
I'm new to the forum. Hope I'm starting this in the right place.

I have the infamous timeout error accessing a sql server 2000 d
through asp pages on iis. I read the other post concerning this issu
and added the recommendations to my code. Problem is, no resolutio
for me.

I have a dynamically generated update statement which has a rathe
large IN clause making comparisions on an indexed and keyed intege
field. Here's the code below:

If Request("Submit").Count > 0 Then
Server.ScriptTimeout = 600
Set cn = Server.CreateObject("ADODB.Connection")
cn.ConnectionTimeout = 600
cn.open CONN_STRING

Set editCmd = Server.CreateObject("ADODB.Command")
editCmd.ActiveConnection = cn
editCmd.commandtimeout = 600

'This part dynamically generated translates to....
editCmd.CommandText = "UPDATE Inspections SET Mailgrou
= '10774, 10773, 10771, 10766, 10764, 10763, 10767, 10770, 10769
10772, 10768, 10765, 10762, 10759, 10758, 10757, 10761, 10760, 10750
10748, 10755, 10751, 10753, 10752, 10749, 10754, 10756, 10745, 10741
10743', LetterNo = 'asdf', InspComment = 'asdf', Reviewed = 1 WHER
Record_ID in (10774, 10773, 10771, 10766, 10764, 10763, 10767, 10770
10769, 10772, 10768, 10765, 10762, 10759, 10758, 10757, 10761, 10760
10750, 10748, 10755, 10751, 10753, 10752, 10749, 10754, 10756, 10745
10741, 10743)"
editCmd.Execute
End If

The strange thing is that if less values are in the IN clause, th
statement executes quickly and successfully.

I also thought to put this statement in a loop for each of the I
clause values to see if that helped. Nope. It executes about 1
iterances then timesout.

Any suggestions greatly appreciated.

S
-
swransk
-----------------------------------------------------------------------
Posted via http://www.webservertalk.co
-----------------------------------------------------------------------
View this thread: http://www.webservertalk.com/message172903.htm

Jul 19 '05 #1
1 4436
> cn.open CONN_STRING

What is CONN_STRING?
Set editCmd = Server.CreateObject("ADODB.Command")
Why are you using a command object?
'This part dynamically generated translates to....
editCmd.CommandText = "UPDATE Inspections SET Mailgroup
Why aren't you using a stored procedure?
= '10774, 10773, 10771, 10766, 10764, 10763, 10767, 10770, 10769,
10772, 10768, 10765, 10762, 10759, 10758, 10757, 10761, 10760, 10750,
10748, 10755, 10751, 10753, 10752, 10749, 10754, 10756, 10745, 10741,
10743'
Ugh, are you really storing this entire list for all the elements in the
list? This a very non-normalized, non-relational way of storing this data.
If I were the database, I would probably time out on you too.
I also thought to put this statement in a loop for each of the IN
clause values to see if that helped. Nope. It executes about 14
iterances then timesout.


Does the table have any indexes? Have you tried executing each of these
statements individually, and see if there is one specific statement (e.g.
one value in the WHERE clause) that is causing the timeout?

This sounds pretty unconvincing that there is a bug, but with a slightly
better approach to the design you can eliminate any ambiguity...
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: avihay | last post by:
Hello, Using .NET 1.1 and MS visual studio 2003 we are failing to close an ODBC Connection to an ODBC driver using system.data.odbc. We are getting the following Error from the Microsoft odbc...
2
by: uli2003wien | last post by:
Dear group, we are dealing with some very specific problems with ODBC, where a connection from SQL-Server to Mysql works with ODBC-driver 3.51.10.00 and does NOT work with ODBC-driver...
3
by: Andrew McGregor | last post by:
Hi, I am trying to get a VB.NET application to connect to a local Oracle 9i Lite database. What is the correct form for a connect string? cn = New...
0
by: bazzer | last post by:
hey, i am using visual basic.net 2003 and have an ASP.NET webform application thats accessing a microsoft access 2003 database. i kept getting the following error when i tried to run it: ERROR ...
0
by: bazzer | last post by:
hey, im trying to access a microsoft access database from an ASP.NET web application in visual basic 2003.NET. i get the following error when i try running it: Server Error in...
3
by: Greg Strong | last post by:
Hello All, Is there any way to close an ODBC connection via DSN without completely closing the Access front-end? I'm doing some testing with using Access as a front-end to Oracle 10g Express...
8
by: Greg Strong | last post by:
Hello All, The short questions are 1 Do you know how to make DSN connection close in Access to Oracle 10g Express Edition? &/or 2 Do you know how to make a DSN-less pass-through query...
3
by: zombiechewtoy | last post by:
I'm having trouble making an ODBC connection using VB.NET 2005. I have tried nearly every connection string found on connectionstrings.com, in almost every format I can think of. I have tried...
0
by: sudhaoncyberworld | last post by:
Dear Techies, I do have small issue on connecting oracle server from .net This is the code snippet public string strConString = "Driver={Microsoft ODBC for...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.