Jump to content

Recommended Posts

Posted

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.

Posted (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 by mistakilla

:alien: ~ Every Living Thing is a Code Snippet of World Application ~ :alien:

Posted

Maybe you need MySQL ODBC, have you installed that and rebooted your computer after installation ?

:alien: ~ Every Living Thing is a Code Snippet of World Application ~ :alien:

Posted

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?

Posted (edited)

Because there are other UDF for MySQL?

-- Edit --

Ok now i install the OBDC driver.. Can i now execute my script?

Edited by Brain
Posted

Because there are other UDF for MySQL?

-- Edit --

Ok now i install the OBDC driver.. Can i now execute my script?

Ofcourse :mellow:

is dll version udf and it dont needs ODBC Driver.

---

Btw reboot your computer and see if it works

:alien: ~ Every Living Thing is a Code Snippet of World Application ~ :alien:

  • Moderators
Posted

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.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...