Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 28th, 2003, 11:17 PM
Registered User
 
Join Date: Oct 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Connection to MySql times out

Hi..When I try to open a page with the code below, the page times out. When I run the same query using phpmyadmin, everything works fine. I can't seem to figure out what the problem is.

<%
Dim conn, rs, query

Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Driver={MySQL ODBC 3.51 Driver}; Server=*****; Database=todo; UID=*****; PWD=****"

query = "SELECT * FROM todo where priority='high'"
Set rs = conn.Execute(query)

While Not rs.EOF
Response.Write "<tr><td><input type='radio' name='radiobutton' value='radiobutton'></td>" & _
"<td>" & rs("AddDate") & "</td><td>" & rs("Description") & "</td><td>" & _
"<td>" & rs("Priority") & "</td><td>more info</td></tr>"
Wend

conn.Close
rs.Close

Set conn = nothing
Set rs = nothing
%>


 
Old November 3rd, 2003, 03:13 PM
Authorized User
 
Join Date: Nov 2003
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

In your while loop you never moveNext with your recordset, that should take care of your timeout issues.

 
Old November 4th, 2003, 03:19 PM
Registered User
 
Join Date: Oct 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

YES! you are right..i created an infinite loop. Thanks!






Similar Threads
Thread Thread Starter Forum Replies Last Post
C# and mySQL Connection naifwonder C# 5 March 8th, 2008 01:52 PM
making an mysql connection Zoe-Alyssa Dreamweaver (all versions) 0 May 19th, 2006 02:16 PM
mysql and access2003 connection krisfr Access VBA 0 October 21st, 2004 04:13 PM
ASP Connection to MySQL fs22 Classic ASP Databases 1 August 18th, 2004 11:35 PM
Mysql connection catab C# 4 December 7th, 2003 11:25 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.