Hallo autoit,
ich habe folgendes Problem.
Zwar wenn ich aus der Datenbank die wiefolgt aufgebaut ist:
JID|StrUserID|password|Status|GMrank|Name|Email|sex|certificate_num|address|postcode|phone|mobile|regtime|reg_ip|Time_log|freetime|sec_primary|sec_content|AccPlayTime|LatestUpdateTime_ToPlayTime|Play123Time
versuche anhant der StrUserID alles auszulesen kommt ein
error
Sofern ich alles anhant der JID auslese klappt es wunderbar.
So klappt es nicht:
[autoit]
$constrim = "DRIVER={SQL Server};SERVER=MEINEIP;DATABASE=MEINEDATENBANK;uid=USERNAME;pwd=PASSWORD;"
$adCN = ObjCreate("ADODB.Connection") ;<==Create SQL connection
$adCN.Open($constrim) ;<==Connect with required credentials
If @error Then
MsgBox(0, "ERROR", "Failed to connect to the database")
Exit
Else
;~ MsgBox(0, "Success!", "Connection to database successful!")
EndIf
$sQuery = "select * from TB_User where StrUserID=" & GUICtrlRead($Input1) & ""
$result = $adCN.Execute($sQuery)
MsgBox(0, "", $result.Fields("StrUserID" ).Value)
$adCN.Close ;==>Close the database
So klappt es:
$constrim = "DRIVER={SQL Server};SERVER=MEINEIP;DATABASE=MEINEDATENBANK;uid=USERNAME;pwd=PASSWORD;"
$adCN = ObjCreate("ADODB.Connection") ;<==Create SQL connection
$adCN.Open($constrim) ;<==Connect with required credentials
If @error Then
MsgBox(0, "ERROR", "Failed to connect to the database")
Exit
Else
;~ MsgBox(0, "Success!", "Connection to database successful!")
EndIf
$sQuery = "select * from TB_User where JID=" & GUICtrlRead($Input1) & ""
$result = $adCN.Execute($sQuery)
MsgBox(0, "", $result.Fields("StrUserID" ).Value)
$adCN.Close ;==>Close the database
Hoffe ihr könnt mir nun helfen