Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi list, How to use dsnless data

Status
Not open for further replies.

parames

MIS
Jun 26, 2000
71
MY
Hi list,

How to use dsnless database connection for mysql.Currently i'm using dsn connection and it's very very slow:

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.open "project"
Query = "select * from product"
Set RS= Conn.Execute(Query)

I write the same program in perl script and it takes around 3 seconds to load the page compare to asp which takes about 8 to 9 seconds..

My database is at same server, path = c:/mysql/data/online
The database name is online. Do i need to include the path for dwnless connection?


Thanks
Best Regards,
Parames.s


 
sODBCSource = "Driver={MySQL};SERVER=webserver;DATABASE=c:\mysql\data\online OR DNS Name;UID=root;PWD=password;OPTION=16386;"

If you are using this for ASP scripts, keep the OPTION=16386. If you don't put this, then RIGHT JOIN queries will return no results sometimes!! Don't know why, but it took a while for me to work that one out :) Brett Birkett B.Comp
Systems Analyst
 
thanks BBirkett,

I've tried this but i get this error message :
1)strDSN = "Driver={MySQL};SERVER=parames;DATABASE=c:\mysql\data\online;OPTION=16386;"

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[TCX][MyODBC]Access denied for user: '@PARAMES' to database 'c:\mysql\data\online'

2)strDSN = "Driver={MySQL};SERVER=parames;DATABASE=c:\mysql\data\online;OPTION=16386;UID=parames;PWD=123;"

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[TCX][MyODBC]Access denied for user: 'root@PARAMES' (Using password: YES)

3)strDSN = "Driver={MySQL};SERVER=parames;DATABASE=c:\mysql\data\online;OPTION=16386;UID=parames;PWD=;"

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[TCX][MyODBC]Access denied for user: 'root@PARAMES' (Using password: NO)

I don't know where to check.. Please guide me..
thanks a lot..
Parames.s





 
It looks to me like you are using a linux mysql?? Is that right? If so, login to your mysql db with mysql -u root -p yourrootpass.

When logged in, type "use mysql;"

Then select * from user; and make sure you have a valid user account called parames, with a password and rights.

Whatever the username and passwords are, these are your UID and PWD fields in the string. The SERVER field is for the IP address, or hostname of the machine with MySql installed.

Brett Birkett B.Comp
Systems Analyst
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top