Jump to content
Sign in to follow this  

Ok, i'm lost... MYSQL.AU3

Recommended Posts


To start with, here's my code (i'm deliberately not showing the whole code coz its about 1300 lines.)

It's about this:

local $sqlcode, $tablecontents, $sqlinstance, $username, $password, $database, $mysqlservername
local $columnnames[3]
local $newguest[3]

$SQLCode = "SELECT * FROM bla"
$TableContents = _Query($SQLInstance,$SQLCode)
    $ColumnNames[0]= "RecordID"
    $ColumnNames[1]= "bla"
    $ColumnNames[2]= ""

$UserName = "blaat" 
$Password = "blaat123"
$Database = "rofl" 
$MySQLServerName = "MyIpAddress"

$SQLInstance = _MySQLConnect($UserName,$Password,$Database,$MySQLServerName)
if $SQLInstance = "0" Then
    msgbox(16,"Error","Error connecting to SQL server")

    $status = "SQLOK"


If i run this, my code crashes and gives me this :

mysql.au3 (132) : ==> The requested action with this object has failed.:

$oconnectionobj.execute ($query)

$oconnectionobj.execute ($query)^ ERROR

I'm 100% sure it comes from _AddRecord because if i mark it as command the error doesn't appear. In the tutorial here they explain why the last number of the array must be empty, so the function knows the array ends there.

Well, i'm very lost and frustrated coz i spend HOURS to fix this... without succes as you can imagine coz thats why im posting this.

some facts:

-The database connect succeeds, i can search records, that works (remember its not the whole code, coz the whole code is 1300 lines. This is the "fail-part" of the code)

-The fields ALL exist (the code worked before, but suddenly stopped working.. why? i dont have a clue)

-The database did not change since it DID work.

So it seems it MUST be the code.. but i can't point my finger on where...

Anyone, with any input or any help... you are greatly appreciated.

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