ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingASP 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 April 8th, 2002, 08:54 AM
preet preet is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 3 preet User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question ASP with mysql on pws

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.
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=99.99.999.99;DATABASE=Test;U ID=xxx;PWD=xxx;
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

Reply With Quote
  #2  
Old April 8th, 2002, 08:00 PM
mytch mytch is offline
Dev Articles Novice (500 - 999 posts)
 
Join Date: Apr 2002
Location: Sydney, Australia
Posts: 588 mytch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 17
Hi Preet,
If you're running Win2k then why don't you just install IIS? I'm thinking that it definetly has sometihng to do with PWS's limitations. Also, this might sound stupid but do you actually have ADO 2.6+ installed on your win2k machine?

My advice would be to install IIS on your win2k machine. This will fix the problem. Also, just give the code a try on another machine running IIS first and see if it works. If it does then you've fixed your problem.

Reply With Quote
  #3  
Old April 9th, 2002, 04:33 PM
preet preet is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 3 preet User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question

sorry about that, I was using IIS.
, now I installed mdac 2.6 too.(even it was already there)
I tried on other machine too.
even then its not working.
weired thing is this, the same code is working perfectly on server.
but not working on my pc.

May be some mysql driver problem ?????

I installed drive from URL for mysqlodbc.
(in the same way it was explained in your article)

Please help to find out any solution and thanks about response.

Reply With Quote
  #4  
Old April 9th, 2002, 06:02 PM
mytch mytch is offline
Dev Articles Novice (500 - 999 posts)
 
Join Date: Apr 2002
Location: Sydney, Australia
Posts: 588 mytch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 17
Unhappy

ok....on your mysql server, have you setup an entry in the mysql table for your computer? mysql might not be accepting connections from other machines accept local. read this article: http://www.mysql.com/doc/A/d/Adding_users.html for info on how to do it.

Once you've added a new user your DSN and the commands should work properly. Also, if your using the @ symbol to hold back errors, remove it and see what errors come up.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > ASP with mysql on pws


Developer Shed Advertisers and Affiliates


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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap