• Welcome to PlanetSquires Forums.
 

Extra SQLitening functions

Started by Ivan Iraola, December 11, 2009, 09:34:52 PM

Previous topic - Next topic

Ivan Iraola

These 4 functions will allow you to get some Row, Table or Database info quickly.


1- slGetNumRowsFound(Query$) : It will get the number of matches found according to a SELECT, DELETE or UPDATE query without making any changes to the database.


   Query$ = "SELECT * FROM DVD-Collection WHERE [Genre] = 'Zombies'"

   Result& = slGetNumRowsFound(Query$)



2- slGetNumRowsInDatabase : Get the total of rows in the database.


   slOpen "MyDatabase.db3", "E0"

   Rows& = slGetNumRowsInDatabase



3- slGetNumRowsInTable(TableName$) : Get the number of rows in the indicated table.


   slOpen "MyDatabase.db3", "E0"

   Rows& = slGetNumRowsInTable("Projects")



4- slGetTableCount : Get the number of tables in the database.


   slOpen "MyDatabase.db3", "E0"

   Tables& = slGetTableCount



I hope you find them useful :)
Android App Developer
http://www.uncledroid.com