|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I guess we have mysql installed on linux server.
I am able to connect that server through following ado connection string and through system dsn too. I installed Myodbc from mysql web site and it is working, because I am able to insert into database. Now my problem is, If I execute following asp code on Win 2000 pc using Personal web server (PWS) to "select * from webusers". It does not return any rows. Can you please help to find out what is the problem ?(I am strugling from last one week) I installed odbc driver 4 times. This same code works fine on server, that is linux server and using chillisoft asp to execute asp(if I am not wrong). But this is not working on my local machine. I need to run asp pages on local machine (win2k with pws) for development and testing purpose. =========== Code which I am using =========== dim cnn, rs, strcnn, sqlstr set cnn = Server.CreateObject("ADODB.Connection") Set rs = Server.CreateObject("ADODB.Recordset") 'cnn.ConnectionString = "DSN=mysqldsn" ''' I tried system dsn and complete connection string too 'cnn.Open "DSN=mysqldsn" strcnn = "driver={mySQL};SERVER=38.15.135.99;DATABASE=LQMTes t;UID=admin;PWD=lqmadmin; Option=0 ;Socket=;Stmt=;" cnn.Open strcnn if cnn.Errors.Count <> 0 then Response.Write "<br>could not connect<br>" else Response.Write "<br>connected<br>" ''' I always received connected message on browser rs.ActiveConnection = cnn rs.Open "select * from webusers" if not rs.eof then response.write " it is not eof " else response.write " it is eof " end if end if '''' I always received "it is eof", but on server "it is not eof". I have 10 rows. '''' If I use mysql client on my m/c to connect remote server, then webusers table returns me 10 rows. '''' I inserted row through above conenction string too. THAT IS WORKING. Why It is not returning rows ? ============================= end of code |
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > ASP with remote mysql on PC |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|