|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > MySQL + ASP problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|