UPDATE - The DataBase V1.0 Functions & Samples are Complete, see link below! - August 1st, 2011 12:21 AM
http://www.b4x.com/forum/basic4android-getting-started-tutorials/10553-new-easy-use-database-functions-v1-0-samples.html
Hello All,
No extra libraries are needed, just the CORE B4A library. I have tested some of the functions on my NookColor with up to 2500 records. With 2500 records, it moves very fast and searches are instant. All data stored will be in string format, however, you will be able to store links to images, web pages, etc. I wrote and posted the Strings functions here: http://www.b4x.com/forum/basic4android-getting-started-tutorials/10365-string-functions.html, and these functions will work in a similar way.
The functions and sample code are now attached. Some benefits may be that it is easier for new users to learn and less overhead on the processor. You don't have to learn SQL, etc. and the code required for each function is much less. Each device will have its limit on the number of records you can have before the system slows down, based on memory and processor. This will do just fine for most apps and contacts style programs. If you need to save images, objects, etc. directly into the database this will not work for you. You can have as many fields of any size as B4A and Android will support. It will also include the s.GenerateRecords(1000) functions, so you can populate the database with hundreds or thousands of records to test how the app performs under max load. Also, the database handles the pointer for you, it also handles BOF, EOF and no records in the database. It makes your coding job much easier!
If you have problems or questions, please post and I will try to help. Hope you find it useful!
___________________________________________________________________
db.AddRecord()
db.DeleteRecord()
db.Exist()
db.FindRecord()
db.GenerateRecords()
db.GetRecord()
db.GetStructure()
db.ListRecords()
db.UpdateRecord()
db.FirstRecord()
db.LastRecord()
db.PreviousRecord()
db.NextRecord()
___________________________________________________________________
Thanks,
Margret
http://www.b4x.com/forum/basic4android-getting-started-tutorials/10553-new-easy-use-database-functions-v1-0-samples.html
Hello All,
No extra libraries are needed, just the CORE B4A library. I have tested some of the functions on my NookColor with up to 2500 records. With 2500 records, it moves very fast and searches are instant. All data stored will be in string format, however, you will be able to store links to images, web pages, etc. I wrote and posted the Strings functions here: http://www.b4x.com/forum/basic4android-getting-started-tutorials/10365-string-functions.html, and these functions will work in a similar way.
The functions and sample code are now attached. Some benefits may be that it is easier for new users to learn and less overhead on the processor. You don't have to learn SQL, etc. and the code required for each function is much less. Each device will have its limit on the number of records you can have before the system slows down, based on memory and processor. This will do just fine for most apps and contacts style programs. If you need to save images, objects, etc. directly into the database this will not work for you. You can have as many fields of any size as B4A and Android will support. It will also include the s.GenerateRecords(1000) functions, so you can populate the database with hundreds or thousands of records to test how the app performs under max load. Also, the database handles the pointer for you, it also handles BOF, EOF and no records in the database. It makes your coding job much easier!
If you have problems or questions, please post and I will try to help. Hope you find it useful!
___________________________________________________________________
db.AddRecord()
db.DeleteRecord()
db.Exist()
db.FindRecord()
db.GenerateRecords()
db.GetRecord()
db.GetStructure()
db.ListRecords()
db.UpdateRecord()
db.FirstRecord()
db.LastRecord()
db.PreviousRecord()
db.NextRecord()
___________________________________________________________________
Thanks,
Margret
Last edited: