Sign in to follow this  
Followers 0
Pakku

mysql

3 posts in this topic

hi,

i can't get this working

i want to connect to a database (mysql) on my website

i use the follow udf:

http://www.autoitscript.com/forum/index.php?showtopic=20814

and this is my script:

#include<MySQL.au3>
_MySQLConnect("myusername", "mypassword","mydatabase","mywebsite.com")

but when i run this (with the right data (password and username and stuff) in it)

i get this error

The requested action with this object has failed.:

$ObjConn.open ("DRIVER=" & $sDriver & ";SERVER=" & $sServer & ";DATABASE=" & $sDatabase & ";UID=" & $sUsername & ";PWD=" & $sPassword & ";")

$ObjConn.open ("DRIVER=" & $sDriver & ";SERVER=" & $sServer & ";DATABASE=" & $sDatabase & ";UID=" & $sUsername & ";PWD=" & $sPassword & ";")^ ERROR

yes i use beta (newest) and i have installed the mysql ODBC 3.51 driver

doe someone see the problem, i can't

Arjan

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Use: "http://www.mywebsite.com"

Edit:

if you're getting errors...i've found a good way to track em. this was in the idea lab, written by SvenP

put this at the top:

$objErr = ObjEvent("AutoIt.Error","MyErrFunc")

and then this anywhere

Func MyErrFunc()

$hexnum=hex($objErr.number,8)

Msgbox(0,"","We intercepted a COM Error!!"      & @CRLF                & @CRLF & _
             "err.description is: " & $objErr.description   & @CRLF & _
             "err.windescription is: " & $objErr.windescription & @CRLF & _
             "err.lastdllerror is: "   & $objErr.lastdllerror   & @CRLF & _
             "err.scriptline is: "   & $objErr.scriptline    & @CRLF & _
             "err.number is: "       & $hexnum               & @CRLF & _
             "err.source is: "       & $objErr.source        & @CRLF & _
             "err.helpfile is: "       & $objErr.helpfile      & @CRLF & _
             "err.helpcontext is: " & $objErr.helpcontext _
            )
exit
EndFunc
Edited by Manadar

Share this post


Link to post
Share on other sites

Hi, so my new script is:

#include<mysql.au3>

$objErr = ObjEvent("AutoIt.Error","MyErrFunc")
Func MyErrFunc()

$hexnum=hex($objErr.number,8)

Msgbox(0,"","We intercepted a COM Error!!"      & @CRLF                & @CRLF & _
             "err.description is: " & $objErr.description   & @CRLF & _
             "err.windescription is: " & $objErr.windescription & @CRLF & _
             "err.lastdllerror is: "   & $objErr.lastdllerror   & @CRLF & _
             "err.scriptline is: "   & $objErr.scriptline    & @CRLF & _
             "err.number is: "       & $hexnum               & @CRLF & _
             "err.source is: "       & $objErr.source        & @CRLF & _
             "err.helpfile is: "       & $objErr.helpfile      & @CRLF & _
             "err.helpcontext is: " & $objErr.helpcontext _
            )
exit
EndFunc


_MySQLConnect("username", "password","database","website.com")

the error message i now get is the follow:

We intercepted a COM Error!!

err.description is: [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'staringcorporation.nl' (10060)

err.windescription is: Niet nader omschreven fout(this is dutch for: "undiscrible error" or something like that)

err.lastdllerror is: 0

err.scriptline is: 27

err.number is: 80020009

err.source is: Microsoft OLE DB Provider for ODBC Drivers

err.helpfile is:

err.helpcontext is: 0

i'm using website.com and not http://www.website.com cause then i get unkown hostname and now i get can't connect so i think the hostname is right

Arjan

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0