You mean passing the value using B4X as parameter?adding a tip for SQLite...
Did you know that at a string column/field... if add something (having zeros in front) like 0000000000... will saved value only 0 (drop zeros) --> changing field/column to varchar(numofchars) will save all zeros !
You must be implementing something differently from me. I get all the zeros!@aeric no generally![]()
Dim Query As String = $"UPDATE SIV SET IsSync = ? WHERE SIVDate = ?"$
DB.ExecNonQuery2(Query, Array As Object("000000000000000000000000000000", "06-01-2022"))
Query = $"SELECT IsSync FROM SIV WHERE SIVDate = ?"$
Dim rs As ResultSet = DB.ExecQuery2(Query, Array As String("06-01-2022"))
Do While rs.NextRow
Log("Updated Value:" & rs.GetString("IsSync"))
Loop
rs.Close
INSERT INTO "main"."SIV"("SIVCode","CompanyNo","StoreCode","SIVDate","Description","IsSync")
VALUES ('1','1','1','19-01-2022',NULL,'0000000000000000000000000');
mydir = "D:\B4J\timologisi\timologisi\B4J"
datadb.InitializeSQLite(mydir,"test.db",False)
datadb.ExecNonQuery2("INSERT INTO exampletable VALUES(?)",Array("00000000")) ' with field-column like String will not accept leading zeros... but only one !
datadb.Close
I see. I never use String and not aware it is available as SQLite field type. I always use TEXT.I am uploading my database with String Fields to see the "effect"... if you change it to varchar (the database fields) with a specific characters will accept leading zeros-0 like TEXT...
B4X:mydir = "D:\B4J\timologisi\timologisi\B4J" datadb.InitializeSQLite(mydir,"test.db",False) datadb.ExecNonQuery2("INSERT INTO exampletable VALUES(?)",Array("00000000")) ' with field-column like String will not accept leading zeros... but only one ! datadb.Close
Here one old post... found with the same effects...
https://stackoverflow.com/questions...strings-that-start-with-zero-e-g-001/14382201
To be fair, it's not very difficult to argue that point.However, you may also argue that SQL is also a type of programming languages.
what program is this?
SQLiteStudio opensource - very light and fast !what program is this?
And let's not forget this interactive 3d engine.To be fair, it's not very difficult to argue that point.