Sign in to follow this  
Followers 0
Armand

How can i upload / download data from my gui to a MySQL db ?!

13 posts in this topic

How can i upload / download data from my gui to a MySQL db ?!

are there such an options ?!

--> will appreciate any help at all !!!

(how does mysql work, how can i retrieve data from it's db ETC !)


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites



How can i upload / download data from my gui to a MySQL db ?!

are there such an options ?!

--> will appreciate any help at all !!!

(how does mysql work, how can i retrieve data from it's db ETC !)

You can use the MySQL.au3 UDF to access the database and make changes from AutoIt.

But if you don't even know how to access it outside of AutoIt that may not help much until you learn more about your environment.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

hey i've read the post you've directed me to and i still have a small Q about it:

- in order for my script to work i have to have the MYSQL Drivers Installed on the computer but what if i compile the script ?! even then everyone who wants to use the .exe file will have to have the drivers set-up as well ?!

THANKS IN ADVANCE !


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites

hey i've read the post you've directed me to and i still have a small Q about it:

- in order for my script to work i have to have the MYSQL Drivers Installed on the computer but what if i compile the script ?! even then everyone who wants to use the .exe file will have to have the drivers set-up as well ?!

THANKS IN ADVANCE !

...so your script would have to check for the driver and if it's not installed then prompt for it or install it.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Weird Post !

Edited by Armand

[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites

another Q on the SUBJ...

Why can't i connect to MySql server ?!

- i think there is something wicked with cdkid's UDF!

$SQLServerOBJ = _MySQLConnect("monshery_ShlomiK","ABD#$@1","monshery_USDLinks","65.254.38.250")
    If $SQLServerOBJ = 0 Then 
        If @error = 1 Then MsgBox(0,"Error","can't connect!")
        If @error = 2 Then MsgBox(0,"Error","missing drivers!")
    EndIfoÝ÷ Ø-æ¢÷¡×¡ë'ßÛi¢©)¬º1¶¨æÞZ0r»¬ë-ë®*mjëh×6 $SQLServerOBJ = _MySQLConnect("monshery_ShlomiK","123456","monshery_USDLinks","65.254.38.250")
    If $SQLServerOBJ = 0 Then 
        If @error = 1 Then MsgBox(0,"Error","can't connect!")
        If @error = 2 Then MsgBox(0,"Error","missing drivers!")
    EndIf
    $ret = _GetColVals($SQLServerOBJ,"Applications","Title")
    If IsArray($ret) <> 1 Then
        If @error = 1 Then MsgBox(0,"Error","Something Went Wrong!")
    EndIf

here is the error code:

C:\Program Files\AutoIt3\Include\Mysql.au3 (413) : ==> Only Object-type variables allowed in an "With" statement.: 
With $quer 
With ^ ERROR
Error in my_thread_global_end(): 3 threads didn't exit
->14:07:28 AutoIT3.exe ended.rc:1

- could i be terribly mistaken and my host details are false ?! (and it can't be an IP...)

Please Help!!!

You'll have to restore the code in the above post --

>N
You are in a maze of buggy forum editors, all alike...
>E
You are in a maze of buggy forum editors, all alike...
>W
You are in a maze of buggy forum editors, all alike...
>S
You are in a maze ofoÝ÷ Ø-æ¢÷¡×¡ë'ßÛi¢©)¬º1¶¨æÞZ0r»¬ë-ë®*mjëh×6

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

another Q on the SUBJ...

Why can't i connect to MySql server ?!

- i think there is something wicked with cdkid's UDF!

$SQLServerOBJ = _MySQLConnect("monshery_ShlomiK","Password","monshery_USDLinks","65.254.38.250")
    If $SQLServerOBJ = 0 Then 
        If @error = 1 Then MsgBox(0,"Error","can't connect!")
        If @error = 2 Then MsgBox(0,"Error","missing drivers!")
    EndIfoÝ÷ Ù8^/yÚ²}ý¶)º§Éê뢸hÁëÞ®Ø^¢wzZ0v§v+wöÌ+Û^;¬µ©b¸­v'ÁªÝ±«­¢+ØÀÌØíME1MÉÙÉ=  (ô}5åME1
½¹¹Ð ÅÕ½Ðíµ½¹Í¡Éå}M¡±½µ¥,ÅÕ½Ðì°ÅÕ½ÐíAÍÍݽÉÅÕ½Ðì°ÅÕ½Ðíµ½¹Í¡Éå}UM1¥¹­ÌÅÕ½Ðì°ÅÕ½ÐìØÔ¸ÈÔиÌà¸ÈÔÀÅÕ½Ðì¤(%%ÀÌØíME1MÉÙÉ=   (ôÀQ¡¸($%%ÉɽÈôÄQ¡¸5Í  ½à À°ÅÕ½ÐíÉɽÈÅÕ½Ðì°ÅÕ½Ðí¸Ìäíн¹¹ÐÌÌìÅÕ½Ðì¤($%%ÉɽÈôÈQ¡¸5Í   ½à À°ÅÕ½ÐíÉɽÈÅÕ½Ðì°ÅÕ½Ðíµ¥ÍÍ¥¹É¥ÙÉÌÌÌìÅÕ½Ðì¤(%¹%($ÀÌØíÉÐô}Ñ
½±Y±Ì ÀÌØíME1MÉÙÉ=   (°ÅÕ½ÐíÁÁ±¥Ñ¥½¹ÌÅÕ½Ðì°ÅÕ½ÐíQ¥Ñ±ÅÕ½Ðì¤(%%%ÍÉÉä ÀÌØíÉФ±ÐìÐìÄQ¡¸($%%ÉɽÈôÄQ¡¸5Í    ½à À°ÅÕ½ÐíÉɽÈÅÕ½Ðì°ÅÕ½ÐíM½µÑ¡¥¹]¹Ð]ɽ¹ÌÌìÅÕ½Ðì¤(%¹%

here is the error code:

C:\Program Files\AutoIt3\Include\Mysql.au3 (413) : ==> Only Object-type variables allowed in an "With" statement.: 
With $quer 
With ^ ERROR
Error in my_thread_global_end(): 3 threads didn't exit
->14:07:28 AutoIT3.exe ended.rc:1

- could i be terribly mistaken and my host details are false ?! (and it can't be an IP...)

Please Help!!!


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites

I don't know if I have the latest version of _MySQL.au3, but that function looks like this:

#cs
    Function name: _GetColVals
    Description: Gets all of the values of a specified column in a specified table
    Parameters: $oConnectionObj - As returned by _MySQLConnect(), $sTable - the table that the column is in
    $sColumn - the column to get values from.
    Return value(s): On success returns an array where $array[0] is the number of values and $array[n] is the Nth value
    On failure sets @error to 1 and returns 0
    Author: cdkid
#ce

Func _GetColVals($oConnectionObj, $sTable, $sColumn)
    If IsObj($oConnectionObj) Then
        Dim $ret[1]
        $quer = $oConnectionObj.execute ("SELECT " & $sColumn & " FROM " & $sTable & ";")
        With $quer
            While Not .EOF
                ReDim $ret[UBound($ret, 1) + 1]
                $ret[UBound($ret, 1) - 1] = .Fields (0).value
                .MoveNext
            WEnd
        EndWith
        $ret[0] = UBound($ret, 1) - 1
        Return $ret
    EndIf
EndFunc   ;==>_GetColValsoÝ÷ Ù.r¥v­Ê«£  ïz»"¢x§Ê«±Êâ¦Ü"¶(籶¶®º+­êh®Ø§X¤zØb±«­¢+ØÌ(%չѥ½¸¹µè}Ñ
½±Y±Í}`(%ÍÉ¥ÁÑ¥½¸èṈ̃°½Ñ¡Ù±Õ̽ÍÁ¥¥½±Õµ¸¥¸ÍÁ¥¥Ñ±(%AɵÑÉÌèÀÌØí½
½¹¹Ñ¥½¹=¨´ÌÉÑÕɹä}5åME1
½¹¹Ð ¤°ÀÌØíÍQ±´Ñ¡Ñ±Ñ¡ÐÑ¡½±Õµ¸¥Ì¥¸($ÀÌØíÍ
½±Õµ¸´Ñ¡½±Õµ¸Ñ¼ÐÙ±ÕÌɽ´¸(%IÑÕɸٱա̤è=¸ÍÕÍÌÉÑÕɹ̸ÉÉäÝ¡ÉÀÌØíÉÉålÁt¥ÌÑ¡¹ÕµÈ½Ù±Õ̹ÀÌØíÉÉåm¹t¥ÌÑ¡9Ñ Ù±Õ(%=¸¥±ÕÉÍÑÌÉɽÈѼĹÉÑÕɹÌÀ(%ÕÑ¡½Èè­¥(%5½¥¥½ÈáÑÉÉɽÈÉÁ½ÉÑ¥¹(()Õ¹}Ñ
½±Y±Í}` ÀÌØí½
½¹¹Ñ¥½¹=¨°ÀÌØíÍQ±°ÀÌØíÍ
½±Õµ¸¤(%%%Í=¨ ÀÌØí½
½¹¹Ñ¥½¹=¨¤Q¡¸($%¥´ÀÌØíÉÑlÅt($$ÀÌØíÅÕÈôÀÌØí½
½¹¹Ñ¥½¹=¨¹áÕÑ ÅÕ½ÐíM1
PÅÕ½ÐìµÀìÀÌØíÍ
½±Õµ¸µÀìÅÕ½ÐìI=4ÅÕ½ÐìµÀìÀÌØíÍQ±µÀìÅÕ½ÐììÅÕ½Ðì¤($%%%Í=¨ ÀÌØíÅÕȤQ¡¸($$%]¥Ñ ÀÌØíÅÕÈ($$$%]¡¥±9½Ð¹=($$$$%I¥´ÀÌØíÉÑmU   ½Õ¹ ÀÌØíÉаĤ¬Åt($$$$$ÀÌØíÉÑmU  ½Õ¹ ÀÌØíÉаĤ´Åtô¹¥±Ì À¤¹Ù±Õ($$$$$¹5½Ù9áÐ($$$%]¹($$]¥Ñ ($$$ÀÌØíÉÑlÁtôU  ½Õ¹ ÀÌØíÉаĤ´Ä($$%IÑÕɸÀÌØíÉÐ($%±Í($$%IÑÕɸMÑÉÉ½È È°À°À¤($%¹%(%±Í($%IÑÕɸMÑÉÉ½È Ä°À°À¤(%¹%)¹Õ¹ìôôÐí}Ñ
½±Y±Í}`oÝ÷ Ø(Z­ç["*.®Ç+m¢Z(X¤zØb±«­¢+ØÀÌØíÉÐô}Ñ
½±Y±Ì ÀÌØíME1MÉÙÉ=   (°ÅÕ½ÐíÁÁ±¥Ñ¥½¹ÌÅÕ½Ðì°ÅÕ½ÐíQ¥Ñ±ÅÕ½Ðì¤(ÀÌØíÉɽÉMØôÉɽÈ)%%ÍÉÉä ÀÌØíÉФ±ÐìÐìÄQ¡¸(%%ÉɽÈQ¡¸5Í    ½à ÄØ°ÅÕ½ÐíÉɽÈÅÕ½Ðì°ÅÕ½Ðí}Ñ
½±Y±Í}` ¤ÉÑÕɹèÅÕ½ÐìµÀìÀÌØíÉеÀìÅÕ½ÐìÉɽÈôÅÕ½ÐìµÀìÀÌØíÉɽÉMؤ)¹%

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Your changed call should use _GetColVals_X(), of course.

I can't edit without scrambling the code boxes.

I hate that forum bug!

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

If you plan on making this public, If I were you;

I would have the MySQL functions, on a server, and the people access your server through the program.

Or else, they could decompile your exe, and get your MySQL DB info.

Which isnt good.


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

i just talked to my host and i can't open the port for the mysql db thus:

how can i send data to a PHP page using Autoit ?!

any help will be appreciated ! thANKS !


[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Share this post


Link to post
Share on other sites

what about using:

_IEcreate("http://www.yourdomain.com/script.php?var1=value1?var2=value2")

? (look for more info about the _IE functions in the manual

Share this post


Link to post
Share on other sites

i just talked to my host and i can't open the port for the mysql db thus:

how can i send data to a PHP page using Autoit ?!

Is your question "how can i send data to a PHP page, stored under MySQL via AutoIT?"?

If the answer is yes, all you have to do is, send the appropriate MySQL instructions, like

_Query($sql, "INSERT INTO `testdb` ( `id` , `name` , `testfield` , `testfieldnew` , `value` ) VALUES ('', 'Otto', 'gtest', 'test3', '252637');")

from AutoIT. (Let us know, if you need more code.)

Then you can have your PHP page retrieve this info .

If your answer is "No" - then what is your question?

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