tucano2000 Active Member Licensed User Longtime User Sep 20, 2016 #1 I am using this code, in my App, to open sqlite database that was working perfectly until iOS 9.x.x. Recordset was returning many results... Code: Copy If SQL1.IsInitialized = False Then Try SQL1.Initialize(File.DirTemp,"controle.sqlite",False) Catch Msgbox("Erro ao acessar o arquivo de dados.","Aviso") Return End Try End If Dim rs As ResultSet rs = SQL1.ExecQuery(SQLString) After users was update to iOS 10.0. I discovery that resultset returns 0 results if sql is already initialized by page loaded before. I solve this issue removing this line code " 'If SQL1.IsInitialized=false " to force sql initialize all times when load Page. This way resultset now return correct results. Why this is happening ? Am I anything wrong ? Is a ResultSet bug with iOS 10 ? Last edited: Sep 20, 2016
I am using this code, in my App, to open sqlite database that was working perfectly until iOS 9.x.x. Recordset was returning many results... Code: Copy If SQL1.IsInitialized = False Then Try SQL1.Initialize(File.DirTemp,"controle.sqlite",False) Catch Msgbox("Erro ao acessar o arquivo de dados.","Aviso") Return End Try End If Dim rs As ResultSet rs = SQL1.ExecQuery(SQLString) After users was update to iOS 10.0. I discovery that resultset returns 0 results if sql is already initialized by page loaded before. I solve this issue removing this line code " 'If SQL1.IsInitialized=false " to force sql initialize all times when load Page. This way resultset now return correct results. Why this is happening ? Am I anything wrong ? Is a ResultSet bug with iOS 10 ?
Erel B4X founder Staff member Licensed User Longtime User Sep 21, 2016 #2 You should move SQL1 to the main module and initialize it once in Application_Start. There shouldn't be any additional SQL object. Upvote 0
You should move SQL1 to the main module and initialize it once in Application_Start. There shouldn't be any additional SQL object.
tucano2000 Active Member Licensed User Longtime User Sep 21, 2016 #3 Okay. My App uses others SQLs (SQL1, SQL2, SQL3, etc). I must move all to the main module in Aplication_Start using only SQL1.Initialize(xxxx,xxxx,False) and I don't need to check if the database is initialized when I navigate between pages. Right ? Upvote 0
Okay. My App uses others SQLs (SQL1, SQL2, SQL3, etc). I must move all to the main module in Aplication_Start using only SQL1.Initialize(xxxx,xxxx,False) and I don't need to check if the database is initialized when I navigate between pages. Right ?
Erel B4X founder Staff member Licensed User Longtime User Sep 21, 2016 #4 Are they connected to different database files? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Sep 21, 2016 #6 I see. Then you need to create multiple SQL objects. Initialize them all in Application_Start and they will stay initialized until the process is killed. Note that this is equivalent to the usage of B4A starter service. Upvote 0
I see. Then you need to create multiple SQL objects. Initialize them all in Application_Start and they will stay initialized until the process is killed. Note that this is equivalent to the usage of B4A starter service.
tucano2000 Active Member Licensed User Longtime User Sep 21, 2016 #7 Ok. Thanks Erel. I'll be using this method. Upvote 0