Jump to content

SQL whoooos


Recommended Posts

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)
_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
;MsgBox(0,"Guest List",$NameList)

muppet hands are so soft :)

Link to comment
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

  • Recently Browsing   0 members

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