B4A Library Library SqlSimple for novice users

This library is responsible for your life easier by using sql database, and then who knows nothing about it to have a minimal use ...
It does not do anything that might make an experienced user with using sql but allows you to do many things, the methods below:

  • 'Initialize the db , name your db
    Initialize(Db_name As String )

  • 'Create the table with the corresponding column names if you do not want to spend all of the data 'set if the string "",is added n with a number if that column is not present, field5 and filed6 are the 'INT number then.
    CreateTABLE (NameTable As String,field1 As String , field2 As String, field3 As String, field4 As String, field5 As String,field6 As String)

  • 'Delete Name_Table
    DeleteTABLE(NameTable As String)
  • 'Insert the fields in the db respecting the column names, provided also empty fields or zero will be 'called but will not be considered.
    insertFieldTABLE(field1 As String , field2 As String, field3 As String, field4 As String, field5 As Int,field6 As Int)
  • 'View all of the table
    viewAllTABLE
  • 'Displays the whole table ordered by the field (column name that you will pass the) in ascending 'order ASC
    viewAllTABLE_OrderASC(field1 As String)
  • 'Displays the whole table ordered by the field (column name that you will pass the) in descending order DESC
    viewAllTABLE_OrderDESC(field1 As String)
  • 'Upgrades some table fields (field1 is the field "column_name" to be modified if the condition '(major, minor, equal in symbols) compared field2 which can be another field, a string or a 'number, etc .. NewValue is the new value to assign true if the condition above.
    update_FieldTABLE(NameTable As String,field1 As String, Condition As String, field2 As String, NewValue As String)
  • 'Allows you to delete some data from the table than a condition see other uses of the 'conditions in the other methods.
    Delete_ConditionTABLE(NameTable As String,field1 As String, Condition As String, field2 As String )
The only variable that will contain the query results as if you are viewing is this:

  • 'you will see result query
    RESULT
Below the library and an example of use
 

Attachments

  • Lib_Sql_.zip
    4.7 KB · Views: 255
  • EXAMPLE.zip
    20.8 KB · Views: 238
Last edited:

DonManfred

Expert
Licensed User
Longtime User
and what should be do with the CLASS-File???????????
We can NOT use it in a B4A-Project!
I tried to open your example project. I got an ERROR when opening.
missinglibraries001.jpg
 

androidappl

Active Member
Licensed User
Longtime User
[QUOTE = "DonManfred, posta: 295.986, membro: 42.649"] e quello che dovrebbe essere fare con la classe-File ???????????
Non possiamo usarlo in un B4A-Project!
Ho cercato di aprire il progetto di esempio. Ho ottenuto un errore durante l'apertura.
[ATTACH = full] 29860 [/ attach] [/ QUOTE]
you have to put the library before.
 

tremara1

Active Member
Licensed User
Longtime User
winzip not opening example zip.....anyone else the same.
 
Top