472,374 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Timeout expired error while using select

Dax
Hi,
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
page.

The query is the following:

Legend:
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
'62006___'
join utenti p on A.id_user = p.codcliente
and p.cognome like '%Marco%'
join prodotto q on U.prod_id=q.prod_id
order by p.cognome, q.prod_ID

the asp code is the following

Set conn1 = Server.CreateObject("ADODB.Connection")
conn1.open "PROVIDER=SQLOLEDB;DATA
SOURCE=test_sql;UID=test;PWD=blank;DATABASE=Test"
set rs1=Server.CreateObject("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.prod_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='#D0F1FF'><div align='center'><font
color='#000000'>" & rs1(0) & "</font></div></td>" &_
"<td bgcolor='#D0F1FF'><div align='center'><font
color='#000000'>" & rs1(1) & "</font></div></td>" &_
"<td bgcolor='#D0F1FF'><div align='center'><font
color='#000000'>" & rs1(2) & "</font></div></td>" &_
"<td bgcolor='#D0F1FF'><div align='center'><font
color='#000000'>" & rs1(3) & "</font></div></td>" &_
"<td bgcolor='#D0F1FF'><div align='center'><font
color='#000000'>" & rs1(4) & "</font></div></td>" &_
"</font></tr>"

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

Jul 20 '06 #1
1 2419
Dax wrote:
Hi,
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
message.

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

The query is the following:

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

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

http://www.aspfaq.com/show.asp?id=2366
http://www.aspfaq.com/show.asp?id=2066
http://www.aspfaq.com/show.asp?id=2424
http://www.aspfaq.com/show.asp?id=2120
http://www.aspfaq.com/show.asp?id=2467

--
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
"NO SPAM"
Jul 20 '06 #2

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

Similar topics

3
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...
0
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. -----------------------------------------------------------...
5
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...
2
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 ...
4
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...
3
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...
4
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...
0
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...
4
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...
1
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...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...

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.