Brain Posted August 18, 2011 Posted August 18, 2011 This is the GUI part: $lbl_hostname = GUICtrlCreateLabel("Hostname:", 20, 30, 55, 17) $hostname = GUICtrlCreateInput("", 110, 30, 121, 21) $lbl_username = GUICtrlCreateLabel("Username:", 20, 55, 55, 17) $username = GUICtrlCreateInput("", 110, 55, 121, 21) $lbl_passowrd = GUICtrlCreateLabel("Password:", 20, 80, 53, 17) $password = GUICtrlCreateInput("", 110, 80, 121, 21) $lbl_database = GUICtrlCreateLabel("Database:", 20, 105, 53, 17) $database = GUICtrlCreateInput("", 110, 105, 121, 21) And this is the functions who doesn't work $READ_hostname = GUICtrlRead($hostname) $READ_username = GUICtrlRead($username) $READ_password = GUICtrlRead($password) $READ_database = GUICtrlRead($database) $Connection = _MySQLConnect($READ_username, $READ_password, $READ_database, $READ_hostname) If $READ_database = "" Then MsgBox(0, "Errore", "Non hai selezionato nessun Database") ElseIf $READ_hostname = "" Then MsgBox(0, "Errore", "Non hai selezionato nessun Server") ElseIf $READ_username = "" Then MsgBox(0, "Errore", "Non hai specificato l'Username!") ElseIf @error = 1 Then MsgBox(0, "Errore", "Impossibile connettersi al database") Else MsgBox(0, "Successo", "La connessione al database è avvenuta correttamente." &@CRLF& "Stiamo inviando una query al database!") Sleep(1500) $Query = "use `test01`; CREATE TABLE `users` ( `RecordID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Unique Record ID', `Username` varchar(30) collate latin1_general_ci NOT NULL, `Password` varchar(30) collate latin1_general_ci NOT NULL, PRIMARY KEY (`RecordID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci" _Query($Connection, $Query) If Not @error Then MsgBox(0, "Successo", "La query è stata inviata correttamente.") Else MsgBox(0, "Errore", "Impossibile eseguire la query richiesta.") EndIf EndIf Pls if you can.. Resolve this problem.
aNewLyfe Posted August 18, 2011 Posted August 18, 2011 (edited) so whats the problem, can u tell about that ?If you see "Impossibile eseguire la query richiesta." that means you got something wrong in your sql query.btw have you tried to del ;?$Query = "use `test01`; CREATE TABLE `users`or delete whole "use `test01`; ".maybe it helps. Edited August 18, 2011 by mistakilla ~ Every Living Thing is a Code Snippet of World Application ~
Brain Posted August 18, 2011 Author Posted August 18, 2011 No no.. The problems is in the connections. The func MySQLConnetions it doesn't work.. Test it
aNewLyfe Posted August 18, 2011 Posted August 18, 2011 Maybe you need MySQL ODBC, have you installed that and rebooted your computer after installation ? ~ Every Living Thing is a Code Snippet of World Application ~
Brain Posted August 18, 2011 Author Posted August 18, 2011 Maybe you need MySQL ODBC, have you installed that and rebooted your computer after installation ?Where i can take the MySQL ODBC?And i can istall it?
aNewLyfe Posted August 18, 2011 Posted August 18, 2011 If you are using udf, get mysql odbc here. ~ Every Living Thing is a Code Snippet of World Application ~
Brain Posted August 18, 2011 Author Posted August 18, 2011 (edited) Because there are other UDF for MySQL? -- Edit -- Ok now i install the OBDC driver.. Can i now execute my script? Edited August 18, 2011 by Brain
aNewLyfe Posted August 18, 2011 Posted August 18, 2011 Because there are other UDF for MySQL?-- Edit --Ok now i install the OBDC driver.. Can i now execute my script?Ofcourse is dll version udf and it dont needs ODBC Driver.---Btw reboot your computer and see if it works ~ Every Living Thing is a Code Snippet of World Application ~
Brain Posted August 18, 2011 Author Posted August 18, 2011 I have installed the OBDC driver but the script doesn't work. Now.. I don't understand anything..
Moderators SmOke_N Posted August 18, 2011 Moderators Posted August 18, 2011 You don't provide enough information to help you, I'm not even sure what MySQL.au3 you're using. Anyway, ProgAndy's works fine for me: Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now