Unfortunately, the IDE slips me the note; Undeclared variable 'SQL1' is used before it was assigned any value.
In actuality I don't have a variable SQL1 anyway, so how shall I change the wording to make it work for my project. I'll attach a screenshot of when the compilation goes haywire.... Whoops, the image was too large. Here's the wetransfer.com link: https://we.tl/t-vXVH78nqBw
Of course my project is an SQLite one. It has 712 records
Your Additional Libraries path is this (see red border)
but you put android-database-sqlcipher-4.5.4.aar into project folder not Additional folder
You should put the android-database-sqlcipher-4.5.4.aar into folder C:\Users\HP\Desktop\Projects\Additional Libraries\B4A
B4XPages.SetTitle(Me, "SS2021B4X")
If sql.IsInitialized = False Then
Try
#If B4J
sql.InitializeSQLite(DBFileDir, DBFileName,True)
#Else
sql.Initialize(DBFileDir, DBFileName,True)
#End If
It's telling me a comma was expected somewhere in this line:
sql.Initialize(DBFileDir, DBFileName,True)
Db file name as string (global variable (that's on line 85)
Thanks Ted, I used that (after taking out the numeral 1)
Now I still get the line 86 problem with this line:
sql.Initialize(DBFileDir, DBFileName,True)
Maybe I should write SQLCipher at the beginning of that line....Nope, didn't work; still has that expected comma comment when I hover over squiggly line.
Also this in Class-Globals:
B4X:
Public DBFileName = "dbircV11.db" As String
DBFileName is greened out everywhere (hovering, it doesn't like As string?)
Thanks Ted, I used that (after taking out the numeral 1)
Now I still get the line 86 problem with this line:
sql.Initialize(DBFileDir, DBFileName,True)
Maybe I should write SQLCipher at the beginning of that line....Nope, didn't work; still has that expected comma comment when I hover over squiggly line.
Also this in Class-Globals:
B4X:
Public DBFileName = "dbircV11.db" As String
DBFileName is greened out everywhere (hovering, it doesn't like string?)
That expected comma comment, it should be missing some parameters.
it also should be sql.Initialize(DBFileDir, DBFileName,True, "", "") instead of sql.Initialize(DBFileDir, DBFileName,True)
when you hover over line 86. it looks like the pic which I posted #7
Class_Globals
Private Root As B4XView
Private xui As XUI
Public sql As SQLCipher
Private db_password As String
Public DBFileDir As String
Public DBFileName = "dbircV11.db" As String
Public Shared As String
Public ImageFileName As String
Private xtblItems As xTableLite
Private ZoomImageView1 As ZoomImageView
Private btnQuit As Button
#If B4A
Public rp As RuntimePermissions
#End If
Private lblTitle As B4XView
Private lblSearch As B4XView 'first use of word: 'search'
Private lblCancel As B4XView
Private edtSearch As B4XView
Private xTableSearch As xTableLite
Private writing As Boolean 'Boolean to wait for search while writing
Private timerSearch As Timer 'The timer that will check when is possible to start Search
Private SearchPattern As String 'Variable to Hold the pattern to search for
Private lstSearch As List 'List contains copy of DB to fasten the search (I suppose)
Private ime As IME 'Library to handle the keyboard and hide it when no longer needed
End Sub