I have these scripts which seem woking until I try to display the query contents of a table of my SQL database (I use the latest AutoIt version):
#include "mysql.au3"
_MySQLConnect ($UserName, $Password, $Database, $MySQLServerName)
$SQLCode = "SELECT * FROMTable1WHERE Col1 = '2012-12-30' "
$result = _Query ($SQLInstance, $SQLCode)
The result return 0 = successful
However, I can't get the contents of my query, I did try to use:
a)
_MySQLConnect ($UserName, $Password, $Database, $MySQLServerName)
$SQLCode = "SELECT * FROMTable1WHERE Col1 = '2012-12-30' "
$TableContents = _Query ($SQLInstance, $SQLCode)
With $TableContents
While NOT .EOF
FileWriteLine("c:\test.txt",.Fields("Description").value & @CRLF)
.MoveNext
WEnd
EndWith
- But it shows error: ==> Only Object-type variables allowed in a "With" statement.:
_SQLExecute ($SQLInstance, $SQLCode) ... but the mysql.au3 doesn't have this function
*) Someone can help me somehow to get the results from my query?![:sweating:]()
Thanks for any help or advice.
#include "mysql.au3"
_MySQLConnect ($UserName, $Password, $Database, $MySQLServerName)
$SQLCode = "SELECT * FROMTable1WHERE Col1 = '2012-12-30' "
$result = _Query ($SQLInstance, $SQLCode)
The result return 0 = successful
However, I can't get the contents of my query, I did try to use:
a)
_MySQLConnect ($UserName, $Password, $Database, $MySQLServerName)
$SQLCode = "SELECT * FROMTable1WHERE Col1 = '2012-12-30' "
$TableContents = _Query ($SQLInstance, $SQLCode)
With $TableContents
While NOT .EOF
FileWriteLine("c:\test.txt",.Fields("Description").value & @CRLF)
.MoveNext
WEnd
EndWith
- But it shows error: ==> Only Object-type variables allowed in a "With" statement.:
![B)](http://aut1.autoit-cdn.com/forum/public/style_emoticons/default/cool.png)
*) Someone can help me somehow to get the results from my query?
![:sweating:](http://aut1.autoit-cdn.com/forum/public/style_emoticons/default/sweating.gif)
Thanks for any help or advice.