A Andromeda Member Licensed User Longtime User Sep 5, 2021 #1 Good morning, i try to fiddle with the example SqlLight2. My first idea is to move the SqlTable onto another Page (from MainPage to "CustomerPage") and implement a drawer to access different pages later (only CustomerBtn is ctive now) This seems pretty good. But when i try to "Add" or "Edit" another entry on the new CustomerPage and use the Page "PageEdit" in Add or Edit Mode it throws an exception about "initializing". This page wants to have the RowId that was formerly choosen on the MainPage. But i moved it onto the Customer page and it seems that i cant access the RowId or the full SQL-Entry. Maybe my example is totally faulty? Or i have mixed "normal" pages and B4XPages? Maybe someone can throw me a hint what is going wrong here? Attachments B4XPages_SQLiteLight2.zip B4XPages_SQLiteLight2.zip 290.5 KB · Views: 379
Good morning, i try to fiddle with the example SqlLight2. My first idea is to move the SqlTable onto another Page (from MainPage to "CustomerPage") and implement a drawer to access different pages later (only CustomerBtn is ctive now) This seems pretty good. But when i try to "Add" or "Edit" another entry on the new CustomerPage and use the Page "PageEdit" in Add or Edit Mode it throws an exception about "initializing". This page wants to have the RowId that was formerly choosen on the MainPage. But i moved it onto the Customer page and it seems that i cant access the RowId or the full SQL-Entry. Maybe my example is totally faulty? Or i have mixed "normal" pages and B4XPages? Maybe someone can throw me a hint what is going wrong here?
LucaMs Expert Licensed User Longtime User Sep 5, 2021 #2 PageEdit, line 85: B4X: Copy RowID = B4XPages.MainPage.RowIDList.Get(EntryIndex) 'get the ID for the given entry index B4XPages.MainPage.RowIDList is not initialized (place the editor cursors on RowIDList and press F7 to see where it is used). [Note that it is technically wrong to use RowID] Last edited: Sep 5, 2021 Upvote 0
PageEdit, line 85: B4X: Copy RowID = B4XPages.MainPage.RowIDList.Get(EntryIndex) 'get the ID for the given entry index B4XPages.MainPage.RowIDList is not initialized (place the editor cursors on RowIDList and press F7 to see where it is used). [Note that it is technically wrong to use RowID]
A Andromeda Member Licensed User Longtime User Sep 5, 2021 #3 Thanks for your hint. Changed the occurence of Mainpage to Mainpage.Customer and it works again. I just take the example program. You said "RowId is technically wrong".....Its just the example from here. But what should i use instead? Upvote 0
Thanks for your hint. Changed the occurence of Mainpage to Mainpage.Customer and it works again. I just take the example program. You said "RowId is technically wrong".....Its just the example from here. But what should i use instead?
LucaMs Expert Licensed User Longtime User Sep 5, 2021 #4 Andromeda said: But what should i use instead? Click to expand... Primary keys of db tables. Upvote 0