This is the error:
Waiting for debugger to connect...
Program started.
ExecuteMemoryTable: Select * FROM Persona WHERE strftime('%Y-%m-%d', DataModifica) BETWEEN '2020-02-29' AND '2020-03-08';
Errore nella linea: 141
java.lang.ClassCastException: class [Ljava.lang.String; cannot be cast to class anywheresoftware.b4a.objects.collections.Map$MyMap ([Ljava.lang.String; is in module java.base of loader 'bootstrap'; anywheresoftware.b4a.objects.collections.Map$MyMap is in unnamed module of loader 'app')
at anywheresoftware.b4a.objects.collections.Map.getSize(Map.java:114)
at anywheresoftware.b4a.objects.collections.Map$IterableMap.getSize(Map.java:154)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:632)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:234)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
at jdk.internal.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:98)
at anywheresoftware.b4a.debug.Debug.delegate(Debug.java:64)
at com.guerrinosantoni.database.dbutils._insertmaps(dbutils.java:808)
at com.guerrinosantoni.database.gestione._btnxxx_click(gestione.java:646)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:632)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:237)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
at jdk.internal.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91)
at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:98)
at anywheresoftware.b4a.BA$1.run(BA.java:216)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:834)
(Exception) java.lang.Exception: java.lang.ClassCastException: class [Ljava.lang.String; cannot be cast to class anywheresoftware.b4a.objects.collections.Map$MyMap ([Ljava.lang.String; is in module java.base of loader 'bootstrap'; anywheresoftware.b4a.objects.collections.Map$MyMap is in unnamed module of loader 'app')
(ArrayList) [[Ljava.lang.String;@8062955, [Ljava.lang.String;@5f74425f, [Ljava.lang.String;@2a64848c]
ans this is the code:
'Dim oggi As String=""
Private res As ResultSet
dati.Clear
DateTime.DateFormat = "yyyy-MM-dd"
'oggi=DateTime.Date(DateTime.now)
Dim s As String
s="Select * FROM Persona WHERE strftime('%Y-%m-%d', DataModifica) BETWEEN '" & data1 & "' AND '" & data2 & "';"
'lancio la query
res=Main.sql.ExecQuery(s)
Dim lista As List
lista.Initialize()
lista = DBUtils.ExecuteMemoryTable(Main.sql, s,Null,0)
DBUtils.InsertMaps(Main.sql,"Persona2",lista)
error is here, in DBUtils:
For Each col As String In m.Keys