Mar 19, 2018 Replies: 28 This new library is used to add some functions to the already precious SQL library. Insertion, updating and reading of images in fields of type BLOB. Functions to add a table, a field. Update a field. Delete a row or table. List of tables, fields and typos of the fields contained in the database Commands to populate List and ListView also with images. SD_SqliteExtra Author: Star-Dust Version: 1.03 sqlite Fields: (TypeBase) TypeFieldBlob As String TypeFieldInteger As String TypeFieldNumeric As String TypeFieldReal As String TypeFieldText As String Functions: AddField (FileNameDB As String, NameTable As String, NameField As String, TypeField As String, defaultValue As String) As Boolean Example: Dim sq as sqlite sq.initialize sq.AddField("mysql.db","mytable","myfield","") sq.AddField("mysql.db","mytable","myNumberfield","0") AddTable (FileNameDB As String, NameTable As String, Fields As String, CreateIfNecessary As Boolean) As Boolean Example: Dim sq as sqlite sq.initialize sq.AddTable("mysql.db","mytable","ID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, Number INTEGER default 0, Name TEXT default ''") Class_Globals As String DeleteRow (FileNameDB As String, NameTable As String, Condition As String) As String Example: Dim sq as sqlite sq.initialize sq.DeleteRow("mysql.db","mytable","ID=1") DeleteTable (FileNameDB As String, NameTable As String) As String Example: Dim sq as sqlite sq.initialize sq.DeleteTable("mysql.db","tableOld") Initialize As String Initializes the object. You can add parameters to this method if needed. InsertBitmap (filenameDB As String, TableName As String, Field As String, Bm As Bitmap) As String Example: Dim sq as sqlite sq.initialize sq.InsertBitmap("mysql.db", "mytable", "imageField", LoadBitmap(File.DirInternal,"myimage.png")) IsInitialized As Boolean Verifica se l'oggetto sia stato inizializzato. getListTable(Path As String,FileName As String) As List getListFieldName(Path As String,FileName As String, TableName As String) As List getListFieldTypeBase(Path As String,FileName As String, TableName As String) As List getListFieldTypeName(Path As String,FileName As String, TableName As String) As List PopulateList (FileNameDB As String, NameTable As String, FieldName As String, Condition As String) As List Example: Dim sq as sqlite sq.initialize Dim L As list = sq.PopolateList("mysql.db","mytable","Name", "") PopulateListTwoLine (FileNameDB As String, NameTable As String, FieldName As String, FieldSecondLine As String, FieldID As String, Condition As String, LV As ListView, CLearListView As Boolean) As String Example: Dim sq as sqlite sq.initialize sq.PopolateListTwoLine("mysql.db","mytable","City","State","ID", "", ListView1,True) PopulateListTwoLineBitmap (FileNameDB As String, NameTable As String, FieldName As String, FieldSecondLine As String, FieldID As String, FieldBitmap As String, Condition As String, LV As ListView, CLearListView As Boolean) As String Example: Dim sq as sqlite sq.initialize sq.PopolateListTwoLine("mysql.db","mytable","City","State","banner","ID", "", ListView1,True) PopulateListView (FileNameDB As String, NameTable As String, FieldName As String, FieldID As String, Condition As String, LV As ListView, CLearListView As Boolean) As String Example: Dim sq as sqlite sq.initialize sq.PopolateList("mysql.db","mytable","CityField","ID", "", ListView1,True) readBitmap (filenameDB As String, TableName As String, Filter As String, Field As String) As Bitmap Example: Dim sq as sqlite sq.initialize Dim B as Bitmap = sq.readBitmap("mysql.db", "mytable","ID=1", "imageField") UpdateBitmap (filenameDB As String, TableName As String, Filter As String, Field As String, Bm As Bitmap) As String Example: Dim sq as sqlite sq.initialize sq.UpdateBitmap("mysql.db", "mytable","ID=1", "imageField", LoadBitmap(File.DirInternal,"myimage.png")) UpdateField (FileNameDB As String, NameTable As String, FieldName As String, Value As String, Condition As String) As String Example: Dim sq as sqlite sq.initialize sq.UpdateField("mysql.db","mytable","NumberField", "100", "ID=1") sq.UpdateField("mysql.db","mytable","StringField", "'StringValue'", "ID=1") Attachments example2.zip example2.zip 62.9 KB · Views: 1,069 example1.zip example1.zip 99.3 KB · Views: 1,089 SD_SqliteExtra 1.04.zip SD_SqliteExtra 1.04.zip 7.4 KB · Views: 1,105 Last edited: Nov 20, 2021 Click to expand...
This new library is used to add some functions to the already precious SQL library. Insertion, updating and reading of images in fields of type BLOB. Functions to add a table, a field. Update a field. Delete a row or table. List of tables, fields and typos of the fields contained in the database Commands to populate List and ListView also with images. SD_SqliteExtra Author: Star-Dust Version: 1.03 sqlite Fields: (TypeBase) TypeFieldBlob As String TypeFieldInteger As String TypeFieldNumeric As String TypeFieldReal As String TypeFieldText As String Functions: AddField (FileNameDB As String, NameTable As String, NameField As String, TypeField As String, defaultValue As String) As Boolean Example: Dim sq as sqlite sq.initialize sq.AddField("mysql.db","mytable","myfield","") sq.AddField("mysql.db","mytable","myNumberfield","0") AddTable (FileNameDB As String, NameTable As String, Fields As String, CreateIfNecessary As Boolean) As Boolean Example: Dim sq as sqlite sq.initialize sq.AddTable("mysql.db","mytable","ID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, Number INTEGER default 0, Name TEXT default ''") Class_Globals As String DeleteRow (FileNameDB As String, NameTable As String, Condition As String) As String Example: Dim sq as sqlite sq.initialize sq.DeleteRow("mysql.db","mytable","ID=1") DeleteTable (FileNameDB As String, NameTable As String) As String Example: Dim sq as sqlite sq.initialize sq.DeleteTable("mysql.db","tableOld") Initialize As String Initializes the object. You can add parameters to this method if needed. InsertBitmap (filenameDB As String, TableName As String, Field As String, Bm As Bitmap) As String Example: Dim sq as sqlite sq.initialize sq.InsertBitmap("mysql.db", "mytable", "imageField", LoadBitmap(File.DirInternal,"myimage.png")) IsInitialized As Boolean Verifica se l'oggetto sia stato inizializzato. getListTable(Path As String,FileName As String) As List getListFieldName(Path As String,FileName As String, TableName As String) As List getListFieldTypeBase(Path As String,FileName As String, TableName As String) As List getListFieldTypeName(Path As String,FileName As String, TableName As String) As List PopulateList (FileNameDB As String, NameTable As String, FieldName As String, Condition As String) As List Example: Dim sq as sqlite sq.initialize Dim L As list = sq.PopolateList("mysql.db","mytable","Name", "") PopulateListTwoLine (FileNameDB As String, NameTable As String, FieldName As String, FieldSecondLine As String, FieldID As String, Condition As String, LV As ListView, CLearListView As Boolean) As String Example: Dim sq as sqlite sq.initialize sq.PopolateListTwoLine("mysql.db","mytable","City","State","ID", "", ListView1,True) PopulateListTwoLineBitmap (FileNameDB As String, NameTable As String, FieldName As String, FieldSecondLine As String, FieldID As String, FieldBitmap As String, Condition As String, LV As ListView, CLearListView As Boolean) As String Example: Dim sq as sqlite sq.initialize sq.PopolateListTwoLine("mysql.db","mytable","City","State","banner","ID", "", ListView1,True) PopulateListView (FileNameDB As String, NameTable As String, FieldName As String, FieldID As String, Condition As String, LV As ListView, CLearListView As Boolean) As String Example: Dim sq as sqlite sq.initialize sq.PopolateList("mysql.db","mytable","CityField","ID", "", ListView1,True) readBitmap (filenameDB As String, TableName As String, Filter As String, Field As String) As Bitmap Example: Dim sq as sqlite sq.initialize Dim B as Bitmap = sq.readBitmap("mysql.db", "mytable","ID=1", "imageField") UpdateBitmap (filenameDB As String, TableName As String, Filter As String, Field As String, Bm As Bitmap) As String Example: Dim sq as sqlite sq.initialize sq.UpdateBitmap("mysql.db", "mytable","ID=1", "imageField", LoadBitmap(File.DirInternal,"myimage.png")) UpdateField (FileNameDB As String, NameTable As String, FieldName As String, Value As String, Condition As String) As String Example: Dim sq as sqlite sq.initialize sq.UpdateField("mysql.db","mytable","NumberField", "100", "ID=1") sq.UpdateField("mysql.db","mytable","StringField", "'StringValue'", "ID=1")
Star-Dust Expert Licensed User Longtime User Mar 20, 2018 #21 Mashiane said: Cool that it's coming for b4j. You might need to consider availing using map variables for your filters. I like what you are doing here.. Click to expand... The ideas have become many and the class has become very complex. I'll have to make a library just for this BindingNavigator class.
Mashiane said: Cool that it's coming for b4j. You might need to consider availing using map variables for your filters. I like what you are doing here.. Click to expand... The ideas have become many and the class has become very complex. I'll have to make a library just for this BindingNavigator class.
Star-Dust Expert Licensed User Longtime User Mar 21, 2018 #22 Update 1.02 Add this method getListTable(Path As String,FileName As String) As List getListFieldName(Path As String,FileName As String, TableName As String) As List
Update 1.02 Add this method getListTable(Path As String,FileName As String) As List getListFieldName(Path As String,FileName As String, TableName As String) As List
Star-Dust Expert Licensed User Longtime User Mar 21, 2018 #23 Claudio Oliveira said: Hey Star! Nice improvement! Will this work the other way 'round? I mean, view updates will also be applied to the associated database field, like VB "bound controls" do? Click to expand... Claudio Oliveira said: You could also associate database boolean fields to checkbox and/or button views. Spare some time to think about it... Click to expand... Wizard for creating mask from SQL is now a reality ... here Last edited: Mar 23, 2018
Claudio Oliveira said: Hey Star! Nice improvement! Will this work the other way 'round? I mean, view updates will also be applied to the associated database field, like VB "bound controls" do? Click to expand... Claudio Oliveira said: You could also associate database boolean fields to checkbox and/or button views. Spare some time to think about it... Click to expand... Wizard for creating mask from SQL is now a reality ... here
Claudio Oliveira Active Member Licensed User Longtime User Mar 22, 2018 #24 Star-Dust said: Now it's a reality ... here Click to expand... Awsome news!
Star-Dust Expert Licensed User Longtime User Mar 22, 2018 #25 Update release 1.04 getListFieldTypeBase(Path As String,FileName As String, TableName As String) As List getListFieldTypeName(Path As String,FileName As String, TableName As String) As List
Update release 1.04 getListFieldTypeBase(Path As String,FileName As String, TableName As String) As List getListFieldTypeName(Path As String,FileName As String, TableName As String) As List
Star-Dust Expert Licensed User Longtime User Mar 23, 2018 #26 Mashiane said: Cool that it's coming for b4j. You might need to consider availing using map variables for your filters. I like what you are doing here.. Click to expand... Are you willing to test the B4J version? See here Last edited: Mar 24, 2018
Mashiane said: Cool that it's coming for b4j. You might need to consider availing using map variables for your filters. I like what you are doing here.. Click to expand... Are you willing to test the B4J version? See here
Johan Hormaza Well-Known Member Licensed User Longtime User Mar 23, 2018 #27 Star-Dust said: ¿Estás dispuesto a probar la versión B4J? Click to expand... I do want
Star-Dust Expert Licensed User Longtime User Mar 25, 2018 #28 Johan Hormaza said: I do want Click to expand... Now it is available in B4J version here In addition, the Sqlite browser, which allows you to automatically update the contents of the views (EditText, Label, ImageView, etc ..) changing only the position of the cursor of the DataBase, is available yes for B4A and B4J
Johan Hormaza said: I do want Click to expand... Now it is available in B4J version here In addition, the Sqlite browser, which allows you to automatically update the contents of the views (EditText, Label, ImageView, etc ..) changing only the position of the cursor of the DataBase, is available yes for B4A and B4J
Johan Hormaza Well-Known Member Licensed User Longtime User Mar 25, 2018 #29 [QUOTE = "Star-Dust, post: 575506, member: 101440"] Ahora está disponible en la versión B4J aquí Además, el navegador Sqlite, que le permite actualizar automáticamente el contenido de las vistas (EditText, Label, ImageView, etc.) cambiando solo la posición del cursor de la Base de Datos, está disponible sí para B4A y B4J [/ QUOTE ] Excelente
[QUOTE = "Star-Dust, post: 575506, member: 101440"] Ahora está disponible en la versión B4J aquí Además, el navegador Sqlite, que le permite actualizar automáticamente el contenido de las vistas (EditText, Label, ImageView, etc.) cambiando solo la posición del cursor de la Base de Datos, está disponible sí para B4A y B4J [/ QUOTE ] Excelente