This is frustrating and I feel it is really simple:
I have main subroutine calling functions which run SQLITE queries.
Each query has two function: One for success and another for error
Success function should return value like (Max Row Number), which should be available at the main subroutine or other functions.
gtotal: how to return its value to main Sub ?
Sub main DB =SqlOpenDatabase("MyData.db","1.0","Score Database") sqlList= sqlList=["CREATE TABLE IF NOT EXISTS Games('gn', 'them', 'us');"] Sql(DB, sqlList) CheckTable() end sub Function CheckTable() sqlList= sqlList=["SELECT * FROM Games",sqlExist,skipError] Sql(DB, sqlList) End Function Function sqlExist(transaction,results) DBRecords = results gtotal=DBRecords.rows.length End Function