473,706 Members | 2,421 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Timeout expired error while using select

I have a problema of query in an asp page, if I run the query in sql
query analizer is time running it's about 3-4 seconds, if I made the
same query in an asp page it create the error of timeout for the
browser. The result of the query output 2000 of records, all in one

The query is the following:

A table ordini_user refer to user
U table utenti refer ti prodoct requested
q table refer to product available
select distinct p.cognome, a.ord_ID, q.prod_id, q.descrip, u.qta
from ordini_user A
join ordini_utenti U on A.ord_id = U.ord_id and u.ord_id like
join utenti p on A.id_user = p.codcliente
and p.cognome like '%Marco%'
join prodotto q on U.prod_id=q.pro d_id
order by p.cognome, q.prod_ID

the asp code is the following

Set conn1 = Server.CreateOb ject("ADODB.Con nection")
SOURCE=test_sql ;UID=test;PWD=b lank;DATABASE=T est"
set rs1=Server.Crea teObject("ADODB .Recordset")

sql1="select distinct p.cognome, a.ord_ID, q.prod_id, q.descrip, u.qta
" &_
"from ordini_user A "&_
"join ordini_utenti U on A.ord_id = U.ord_id "&_
"and a.ord_id like '"&cod_ordine&" %' "&_
"join utenti p on A.id_user = p.codcliente "&_
"and p.cognome like '%"&fname&"%' join prodotto q on
U.prod_id=q.pro d_id "&_
"order by p.cognome, q.prod_ID"

response.write( sql1)

rs1.Open sql1, conn1

do while not rs1.EOF
strtable = strtable & "<tr>" &_
"<td><input type='hidden' name='Cod' value=" & rs1(0)
& "></td>" &_
"<td bgcolor='#D0F1F F'><div align='center'> <font
color='#000000' >" & rs1(0) & "</font></div></td>" &_
"<td bgcolor='#D0F1F F'><div align='center'> <font
color='#000000' >" & rs1(1) & "</font></div></td>" &_
"<td bgcolor='#D0F1F F'><div align='center'> <font
color='#000000' >" & rs1(2) & "</font></div></td>" &_
"<td bgcolor='#D0F1F F'><div align='center'> <font
color='#000000' >" & rs1(3) & "</font></div></td>" &_
"<td bgcolor='#D0F1F F'><div align='center'> <font
color='#000000' >" & rs1(4) & "</font></div></td>" &_

Ho can I optimize or modify the output source consider that I want to
print all these records?

Jul 20 '06 #1
1 2468
Dax wrote:
I have a problema of query in an asp page, if I run the query in sql
query analizer is time running it's about 3-4 seconds, if I made the
same query in an asp page it create the error of timeout for the
What kind of timeout? Script timeout or ADO Command timeout?

It never hurts to copy and paste the entire error message you are receiving,
as well as showing us which line of code is being referred to in the error

browser. The result of the query output 2000 of records, all in one

The query is the following:

A table ordini_user refer to user
U table utenti refer ti prodoct requested
q table refer to product available
do while not rs1.EOF

I don't see an rs1.MoveNext statement. Are you sure you haven't created an
infinite loop?


Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
Jul 20 '06 #2

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

Similar topics

by: David Morgan | last post by:
Hello In my ASP page I am trying to ascertain whether a randomly generated ID starts with certain characters that are not allowed or has been used before. When the SQL statement for latter is executed I get: Microsoft OLE DB Provider for SQL Server error '80040e31' Timeout expired
by: Silvia | last post by:
I have a application web and when execute this for a long time generated this error: Server Error in '/RAIMServer' Application. ----------------------------------------------------------- --------------------- Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and
by: Jason | last post by:
Hi all I get the following error when executing a rather intense stored procedure from an ASPX page. I have tried: - Increasing timeouts on IIS 5.0 (all areas that even mention timeout) - use the "Connection Timeout=2400" string in the SqlConnection connections string - disabled connection pooling.
by: Chris Langston | last post by:
I have a Web Server running IIS 5 or 6 on Windows 2K and Windows 2003 Server that is experiencing strange shutdown problems. We are using ASP.NET v1.1 and our application is written in VB.NET Here's the scenario: 1. .NET Windows Client on a remote machine makes a web service call to update tables on a Web Server running SQL Server 2000. 2. The Update is updating about 1000 - 3000 records doing simple update statements like "Update...
by: Nevyn Twyll | last post by:
I've been working on an asp.net application and everything's been great. But suddenly, whether I'm tyring to use a database on my own machine, or on my server, I'm getting a timeout when trying to open a database connection. The error seems to happen regardless of what ASP.NET app I'm working with/trying to debug. It will open a few connections, Here's the error:
by: Nils Magnus Englund | last post by:
Hi, I've made a HttpModule which deals with user authentication. On the first request in a users session, it fetches data from a SQL Server using the following code: using (SqlConnection connection = new SqlConnection(ConfigurationSettings.AppSettings)) {
by: VB Programmer | last post by:
When I run my ASP.NET 2.0 web app on my dev machine it works perfect. When I precomile it to my web deployment project and then copy the debug files to my web server I get this problem when trying to login (obviously it's using ASPNETDB.mdf). Any ideas? Server Error in '/' Application. --------------------------------------------------------------------------------
by: bonita | last post by:
If I add the code for user to download the file (e.g. if(File.Exists(FILE_NAME)){......}), the ASP.NET will give the following timeout error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. It seems that the download file code is executing before letting the previous code to finish. Even the message print code (message.Text="...";) is not executed.
by: mabubakarpk | last post by:
Hello to all I am using an application which is in vb6.0 and database in MSSQL server 2k. I am using connection string through ADO. Some times I receive message Timeout expired when I retreive data from table e.g Vendor (Select * from Vendor) through vb6.0 application . When I retreive data from table through SQL Server enterprise manager It also generate...
by: Scorpion657 | last post by:
Hey I really need help. I have a Website coded using ASP.NET and VB and for some reason, i'm getting the following error when I try to upload or access a large file which is stored in the database. It was working fine when I was runing the site on the localhost. I added the following line to the web.config file to increase the timeout: <httpRuntime maxRequestLength="1048576" executionTimeout="3600"/> I also added: connection timeout =...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.