|
You last visited: Today at 03:48
Advertisement
Autoit Daten -> MySQL Database = ERROR?!
Discussion on Autoit Daten -> MySQL Database = ERROR?! within the AutoIt forum part of the Coders Den category.
12/02/2012, 18:56
|
#1
|
elite*gold: 25
Join Date: Nov 2011
Posts: 266
Received Thanks: 60
|
Autoit Daten -> MySQL Database = ERROR?!
Haha ich bins mal wieder  ich habe mal eine frage.. :O
unzwar beschäftige ich mich mit Autoit & Mysql und habe einige probleme wie z.b.:
ID = Admin
Pass = 123456
#######
$ID = inputbox("","")
$Pass = inputbox("","")
_Login($ID, $Pass)
[HIER IST DER MYSQL CODE USW]
#######
So geht es aber mit einer GUI geht es nicht warum? 2 Input boxen und 1 button das ganze wenn button gedrückt wird dann über guictrlread beide input ausgelesen dann Fehlgeschlagen ? warum?
|
|
|
12/02/2012, 19:15
|
#2
|
elite*gold: 0
Join Date: Mar 2009
Posts: 2,317
Received Thanks: 1,255
|
vllt. zeigst du uns mal deine source, wo es nicht klappt?
oder halt einen teil
|
|
|
12/02/2012, 19:18
|
#3
|
elite*gold: 0
Join Date: Aug 2011
Posts: 263
Received Thanks: 177
|
Poste deine ganze Source, dann können wir besser helfen.
|
|
|
12/02/2012, 19:21
|
#4
|
elite*gold: 95
Join Date: May 2011
Posts: 982
Received Thanks: 189
|
$ID = inputbox("","") speichert in $ID nur einen handle für die inputbox. um den text auszulesen musst du noch nen anderen befehlt ausführen. ich glaube guictrlread, bin mir aber nciht ganz sicher, sollte aber in der hilfe drinstehen
|
|
|
12/02/2012, 20:26
|
#5
|
elite*gold: 25
Join Date: Nov 2011
Posts: 266
Received Thanks: 60
|
normaler code (so funktioniert es)
Code:
#include <INet.au3>
$Input1 = InputBox("","ID","","")
$Input2 = InputBox("","PW","","•")
_Login($Input1,$Input2)
; Ein Loginbeispiel zum Testen:
; Benutername: Test
; Passwort: Hallo
Func _Login($sBenutzername = "", $sPasswort = "")
$iRValue = _INetGetSource("http://##pfad zur datei##/login.php?benutzername=" & $sBenutzername & "&passwort=" & $sPasswort)
; Statt <URL> tragt ihr hier bitte die URL zur login.php-Datei auf dem Webspace ein
; Öffnet die Seite und führt dabei die login.php-Datei aus. Die php-Datei arbeitet nun ihren Code ab und gibt entweder ...
; 0 - Benutzername stimmt nicht (nicht vorhanden) oder ...
; 1 - Passwort und Benutzername stimmt oder ...
; 2 - Passwort stimmt nicht
; ... aus
Switch $iRValue ; je nach Rückgabewert der login.php-Datei wird nun weiter verfahren:
Case 0 ; - Benutzername stimmt nicht (nicht vorhanden)
MsgBox(16,"Error","Benutzername ist nicht registriert!")
Case 1 ; - Passwort und Benutzername stimmt
MsgBox(32,"Info","Erfolgreich eingeloggt!")
Case 2 ; - Passwort stimmt nicht
MsgBox(16,"Error","Passwort ist falsch!")
EndSwitch
EndFunc ;==>_Login
so funktioniert es NICH:
Code:
#include <INet.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("...", 295, 178, 194, 135)
$Input1 = GUICtrlCreateInput("", 88, 40, 121, 21)
$Input2 = GUICtrlCreateInput("", 88, 72, 121, 21)
$Button1 = GUICtrlCreateButton("Login", 104, 96, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$R1 = GUICtrlRead($Input1,1)
$R2 = GUICtrlRead($Input2,1)
sleep(3000)
_Login($R1,$R2)
EndSwitch
WEnd
Func _Login($sBenutzername = "", $sPasswort = "")
$iRValue = _INetGetSource("http://#pfad-zur-datei#/login.php?benutzername=" & $sBenutzername & "&passwort=" & $sPasswort)
; Statt <URL> tragt ihr hier bitte die URL zur login.php-Datei auf dem Webspace ein
; Öffnet die Seite und führt dabei die login.php-Datei aus. Die php-Datei arbeitet nun ihren Code ab und gibt entweder ...
; 0 - Benutzername stimmt nicht (nicht vorhanden) oder ...
; 1 - Passwort und Benutzername stimmt oder ...
; 2 - Passwort stimmt nicht
; ... aus
Switch $iRValue ; je nach Rückgabewert der login.php-Datei wird nun weiter verfahren:
Case 0 ; - Benutzername stimmt nicht (nicht vorhanden)
MsgBox(16,"Error","Benutzername ist nicht registriert!")
Case 1 ; - Passwort und Benutzername stimmt
MsgBox(32,"Info","Erfolgreich eingeloggt!")
Case 2 ; - Passwort stimmt nicht
MsgBox(16,"Error","Passwort ist falsch!")
EndSwitch
EndFunc ;==>_Login
|
|
|
 |
Similar Threads
|
Flyff Server Database MYSQL Error
11/24/2012 - Flyff Private Server - 1 Replies
Hey,
Already many thanks for reading my topic.
So here is my problem i am working on my flyff private server and i got stuck at a certain point.
When i try to open my 2. DatabaseServer.exe I get the following error:
FAIL read ini- ..\\script\DataServer.ini
And if i look at that sertain file I have the following:
ResourceFolder "C:\Users\Daan\Desktop\Flyff server\New Repack\V15_FIles\Resource"
|
[ERROR] Mysql can't connect to local Mysql server through socket
10/08/2011 - Metin2 Private Server - 3 Replies
Hallo Liebe Com,
Undzwar habe ich ein Problem mit Mysql.
Als ich Mysql installiert habe konnte ich Problemlos drauf connecten,auch mit navicat.Aber als ich die Serverfiles (2011er) installiert habe und rebootet habe ging aufeinmal mysql nichtmehr.Wenn ich mysql -p eingebe steht dann da:
Wenn ich den Startbefehl eingebe steht da:
Was kann das sein? Und es passiert immer nur nach der Serverfiles installation.
Ich habe den Server schon 3x resetten lassen und es passierte immer das...
|
[ERROR] Mysql can't connect to local Mysql server through socket
11/06/2010 - Metin2 Private Server - 5 Replies
I just recently tried to configure a DNS server for MT2.. It came up with this error
ERROR: 2002 (HY000): Can't connect to local Mysql server through socket '/tmp/mysql.sock' (2)
Do I need to do a fresh installation of FBSD?
:S
Thanks.
|
Error MySQL Connection and New Database
11/24/2008 - CO2 Private Server - 8 Replies
My first problem: I'm trying to remake another server using LOTF this time, but now when I try to open up the localhost connection in MySQL I get this error: 2003 - Can't connect to MySQL server on 'localhost' (10016). I remember this error happened to me before as well, but I forget what exactly I did to fix it because it was working later on. If I can't open the connection then I can't make a new database.
My second problem: When I go here "http://localhost/phpmyadmin"
The page cannot be...
|
All times are GMT +1. The time now is 03:49.
|
|