notsure Posted October 22, 2009 Posted October 22, 2009 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] SQLCONNECT() $SQLCode = "SELECT * FROM bla" $TableContents = _Query($SQLInstance,$SQLCode) $ColumnNames[0]= "RecordID" $ColumnNames[1]= "bla" $ColumnNames[2]= "" $newguest[0]="" $newguest[1]="hello" $newguest[2]="" _AddRecord($SQLInstance,"bla",$ColumnNames,$newguest) Func SQLCONNECT() $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") Else $status = "SQLOK" EndIf EndFuncIf 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)^ ERRORI'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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now