iOS Question knowing before buying part three

Enthousiastic

Active Member
Licensed User
Hello , i made a database for mine books with B4A and it's OK . Now I want to make it in B4i and before buing it i study it . I am thinking to write the code as word .doc file to have it .
I have two questions :

a) In b4A my cell phone has an sdcard 16Gb where i saved the images of authors and covers for my books database . The question is since ios devices don't have sdcard where do you suggest to save them ( i mean the pictures) .First in assets and then in an folder of ios device ?

b) In attached file i have the code in word file loading records in B4A database CAN YOU TELL ME PLEASE THE CORRESPONDING CODE IN B4i especially going to first , next ,previous and last record ?

MANY , MANY THANKS IN ADVANCED TO ALL OF YOU !!!!!!!!!!!!!
Ethousiastic
 

Attachments

  • B4A_LoadRecords.zip
    11 KB · Views: 104

ilan

Expert
Licensed User
First in assets and then in an folder of ios device ?

1, if you are talking about saving content while app is running then you cannot write to file.dirassets. you can only read from file.dirassets (from a running app).
but you can save to File.DirDocuments. Note that you can make this folder shareable via itunes by adding few lines of code. (this folder will be backed up via itunes automatically)

2. i think it should be the same (or almost the same). b4i also support Max(...,...) and Min(...,...)
actually most code will be the same only few views are setup differently and few libs that does not exists in b4i.
 
Upvote 0

klaus

Expert
Licensed User
SQLite works a little bit different in iOS.
The object Cursor doesn't exist there is the object RecordSet instaed.
But RecordSet doesn't have the Position property like Cursor, only RecordSet.NextRow.
You cannot directly get a record from RecordSet for a given position.
I'm afraid that you need to change the code.
Load a list with the rowids.
Then you can access a given record directly from the database with an index and its rowid.

You may have a look at the SQLiteLight examples in my signature, they exist for Android and iOS so you can see the difference.
 
Upvote 0
Top