jcpetu Posted October 24, 2014 Share Posted October 24, 2014 Hi people, I'm trying to query an SQLite Indexed DB but I don't get a way to list all records that fit a condition: For instance, I want to list the records with LastChanged date equal to some date but I get a message : ! SQLite.au3 Error --> Function: _SQLite_Query --> Query: SELECT ROWID,* FROM Computers INDEXED BY LastChanged WHERE CLastChanged='20141020-204026' --> Error: no query solution Below the code: _SQLite_Query(-1, "SELECT ROWID,* FROM Computers INDEXED BY LastChanged WHERE CLastChanged='" & $LastSchanged & "'", $hQuery) While _SQLite_FetchData($hQuery, $aRow) = $SQLITE_OK ; ConsoleWrite($j & "-->" & $ComputerName & $aRow[1]&"-" & "Last changed---> "&$aRow[19]&@CRLF) $j = $j + 1 WEnd By the way, How can I get the first and last record of the indexed database? I'll appreciate any help. Thanks a lot and regards. Link to comment Share on other sites More sharing options...
Zedna Posted October 24, 2014 Share Posted October 24, 2014 (edited) Post schema of your database/table. Also look here '?do=embed' frameborder='0' data-embedContent>> Edited October 24, 2014 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
jcpetu Posted October 25, 2014 Author Share Posted October 25, 2014 Hi Zedna, I found it. I didn't get any result until I reindexed the table only by one field. It seems that when you use more than one field the query returns an empty set of data. Thanks a lot for your help. Link to comment Share on other sites More sharing options...
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