April 8th, 2002, 08:53 AM
Join Date: Apr 2002
Time spent in forums: < 1 sec
Reputation Power: 0
ASP with remote mysql on PC
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
if cnn.Errors.Count <> 0 then
Response.Write "<br>could not connect<br>"
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 "
response.write " it is eof "
'''' I always received "it is eof", but on server "it is not eof". I have 10
'''' 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