MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 10th, 2003, 03:21 AM
sahil sahil is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 1 sahil User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Angry High priority bug----- MySQL + ASP

Hi,

We are using MySQL 3.23.51 , IIS 5.0 and ASP to connect to the database the code is given below

but I get a exception error after 4 -5 refresh

"

Error Type:
Microsoft VBScript runtime (0x800A01FB)
An exception occurred: 'rs.Open'
/gcr/data_connection(mysql).asp, line 16

"
-----------------

<%
dim objconnection

dim query

set objconnection = Server.CreateObject("ADODB.Connection")
set rs = Server.CreateObject("ADODB.RecordSet")
objconnection.Open "DSN=user","root",""

'objconnection.Open "dsn =gcrmysql; Server=131.1.1.103; Port=3306; Option=0; Socket=; Stmt=;Database=gcr; Uid=gcr; Pwd=gcr"



query="select * from users"
rs.ActiveConnection = objconnection
rs.Open query

while not(rs.EOF or rs.BOF)
Response.Write(rs(1)& "<br>")
rs.MoveNext()

wend

rs.close()
Set rs = nothing
objconnection.Close()
Set objconnection = nothing

%>

-----------------------------

thanks
sahil

Last edited by sahil : January 13th, 2003 at 05:49 AM.

Reply With Quote
  #2  
Old January 30th, 2003, 12:17 AM
ramz ramz is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: Juiz de Fora - MG- Brazil
Posts: 93 ramz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via ICQ to ramz Send a message via MSN to ramz
Try this...

Set Conn = Server.CreateObject("ADODB.Connection")
ConnInfo = "DSN=myDSN;UID=myUser;PWD=myPass"
Conn.Open ConnInfo

SQL = "SELECT * FROM table"
Set RS = Conn.Execute(SQL)

If RS.BOF And RS.EOF Then
RS.Close
Conn.Close
Set RS = Nothing
Set Conn = Nothing
Response.Write("No results!")
Else
While Not RS.EOF
'Print the results
RS.MoveNext
Wend
RS.Close
Conn.Close
Set RS = Nothing
Set Conn = Nothing
End If
__________________
Regards,
Ramiro Varandas Jr.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > MySQL + ASP problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT