Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

SQL whoooos

$
0
0
im tring to connect to my local SQL server (using wamp) and i get the error
"Return $oConnectionobj.execute ($sQuery)
Return $oConnectionobj.execute ($sQuery)^ ERROR
->23:10:44 AutoIT3.exe ended.rc:1"

I editied the config.php file for the SQL server to use (username:root, pass: 'blank') but i cant see my error in the script.  Can anyone help me?



#include "MySQL.au3"
Dim $NameList
Dim $UserName = "root"
Dim $Password = ""
Dim $Database = "accounts"
Dim $MySQLServerName = "localhost"
Dim $TableName = "table"
Dim $ColumnNames[7]
;Dim $NewGuest[6]
Dim $Column = "CusNum"
;Dim $RecordID = "3"
$ColumnNames[0]= "CusNum"
$ColumnNames[1]= "UsrNm"
$ColumnNames[2]= "PsWd"
$ColumnNames[3]= "PPID"
$ColumnNames[4]= "PayDate"
$ColumnNames[5]= "ExpoDate"
$ColumnNames[6]= "allCount"

$SQLInstance = _MySQLConnect ($UserName, $Password, $Database, $MySQLServerName)
DisplayTable()
_MySQLEnd ($SQLInstance)
#region Functions
Func DisplayTable()
$NameList = ""
$SQLCode = "SELECT * FROM Accounts"
$TableContents = _Query ($SQLInstance, $SQLCode)
With $TableContents
  While Not .EOF
   $NameList &= .Fields ("UsrNm").value & " " & .Fields ("PsWd").value & @CRLF
   .MoveNext
  WEnd
EndWith
;MsgBox(0,"Guest List",$NameList)
EndFunc
#endregion


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>