Hallo Gemeinde,
habe eine Problem das eine Tabelle in einer SQLite Datenbank nicht gefunden werden kann. Ich hoffe auf eure Hilfe.
Wo ist mein Fehler?
Hier die Daten:
B4A Version: 9.50
Java Version: 8
Parse den Code. (0.01s)
Building folders structure. (0.03s)
Kompiliere den Code. (0.03s)
Kompiliere Layoutcode. (0.01s)
Kompiliere Debugger-Code (0.01s)
Vorherige erfolgreiche Shell-App ausführen (0.00s)
Erfolgreich abgeschlossen.
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Public SQL1 As SQL
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private imgNeuerMandant As ImageView
Private imgPlus As ImageView
Private imgPfeil_Zurueck As ImageView
Private lblUeberschrift As Label
Private ListView1 As ListView
Private EditText1 As EditText
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("NeuerMandant")
imgNeuerMandant.Bitmap = LoadBitmap(File.DirAssets , "NeuerMandant_32.png")
imgPlus.Bitmap = LoadBitmap(File.DirAssets , "edit-add-48.png")
imgPfeil_Zurueck.Bitmap = LoadBitmap(File.DirAssets , "Pfeil_Zurueck.png")
ListView1.Initialize("ListView1")
Dim GD As GradientDrawable
GD.Initialize("TR_BL", Array As Int(Colors.White , Colors.LightGray))
Activity.Background = GD
ListView1.ScrollingBackgroundColor = Colors.Transparent
'Dim Bitmap1 As Bitmap
ListView1.SingleLineLayout.ItemHeight = 50dip
ListView1.SingleLineLayout.Label.TextSize = 20
ListView1.SingleLineLayout.Label.TextColor = Colors.Black
ListView1.SingleLineLayout.Label.Gravity = Gravity.FILL
ListView1.FastScrollEnabled = True
' Next
Activity.AddView(ListView1, 0, 260, 100%x, 30%y)
If FirstTime Then
SQL1.Initialize(File.DirInternal, "zerfa.db", True)
End If
'initialize the variables
'CurrentIndex = -1
'Edit.Mode = "Add"
VorhandeneMandaten_Laden
End Sub
Sub VorhandeneMandaten_Laden
Dim rs As ResultSet
Dim s As Int = 0
Try
rs = SQL1.ExecQuery("SELECT * FROM tabelle") <- Hier wird eine Exception geschmissen
Do While rs.NextRow
'ResultSet1.NextRow
s = s +1
Loop
Catch
ToastMessageShow(LastException, False)
Log(LastException)
End Try
rs.Close
End Sub
Protokoll:
Die Datenbank habe ich mit
DB Browser für SQLite
erstellt.
Version 3.11.2
Erstellt für i386-little_endian-ilp32, running on x86_64
Qt-Version 5.7.1
SQLite-Version 3.27.2
habe eine Problem das eine Tabelle in einer SQLite Datenbank nicht gefunden werden kann. Ich hoffe auf eure Hilfe.
Wo ist mein Fehler?
Hier die Daten:
B4A Version: 9.50
Java Version: 8
Parse den Code. (0.01s)
Building folders structure. (0.03s)
Kompiliere den Code. (0.03s)
Kompiliere Layoutcode. (0.01s)
Kompiliere Debugger-Code (0.01s)
Vorherige erfolgreiche Shell-App ausführen (0.00s)
Erfolgreich abgeschlossen.
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Public SQL1 As SQL
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private imgNeuerMandant As ImageView
Private imgPlus As ImageView
Private imgPfeil_Zurueck As ImageView
Private lblUeberschrift As Label
Private ListView1 As ListView
Private EditText1 As EditText
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("NeuerMandant")
imgNeuerMandant.Bitmap = LoadBitmap(File.DirAssets , "NeuerMandant_32.png")
imgPlus.Bitmap = LoadBitmap(File.DirAssets , "edit-add-48.png")
imgPfeil_Zurueck.Bitmap = LoadBitmap(File.DirAssets , "Pfeil_Zurueck.png")
ListView1.Initialize("ListView1")
Dim GD As GradientDrawable
GD.Initialize("TR_BL", Array As Int(Colors.White , Colors.LightGray))
Activity.Background = GD
ListView1.ScrollingBackgroundColor = Colors.Transparent
'Dim Bitmap1 As Bitmap
ListView1.SingleLineLayout.ItemHeight = 50dip
ListView1.SingleLineLayout.Label.TextSize = 20
ListView1.SingleLineLayout.Label.TextColor = Colors.Black
ListView1.SingleLineLayout.Label.Gravity = Gravity.FILL
ListView1.FastScrollEnabled = True
' Next
Activity.AddView(ListView1, 0, 260, 100%x, 30%y)
If FirstTime Then
SQL1.Initialize(File.DirInternal, "zerfa.db", True)
End If
'initialize the variables
'CurrentIndex = -1
'Edit.Mode = "Add"
VorhandeneMandaten_Laden
End Sub
Sub VorhandeneMandaten_Laden
Dim rs As ResultSet
Dim s As Int = 0
Try
rs = SQL1.ExecQuery("SELECT * FROM tabelle") <- Hier wird eine Exception geschmissen
Do While rs.NextRow
'ResultSet1.NextRow
s = s +1
Loop
Catch
ToastMessageShow(LastException, False)
Log(LastException)
End Try
rs.Close
End Sub
Protokoll:
Die Datenbank habe ich mit
DB Browser für SQLite
erstellt.
Version 3.11.2
Erstellt für i386-little_endian-ilp32, running on x86_64
Qt-Version 5.7.1
SQLite-Version 3.27.2