Change Orientation Generates sql error? HOW?

Malky

Active Member
Licensed User
Longtime User
Hi, my App generates an error after changing orientation saying that a table 'system' doesn't exist in the database.

The db is initialised ok, and the scrollview is populated from it?

Malky
 

Attachments

  • db_error.zip
    16.2 KB · Views: 241

Malky

Active Member
Licensed User
Longtime User
Hi Erel, I have done this but I seem to be back to where I started?

On the first run from a fresh installation, it opens the language menu which is correct. If I tilt the phone, I get a blank screen?

On the second run if it's restarted it should open the menu (in the correct language) which it does, but if I then tilt again, I get the black screen?

It has to be in the activity start routine, but????

Malky
 

Attachments

  • db_error2.zip
    16.2 KB · Views: 255
Upvote 0

doogal

Member
Licensed User
Longtime User
Hi Malky, I had a similar problem with a listview disappearing on orientation change. To solve it I had to add something to Activity_Resume. So, add the following to Acivity_Resume:

B4X:
Sub Activity_Resume
   FillLangScrollView
   FillMenuScrollView
End Sub

Hope this helps!
 
Upvote 0

Malky

Active Member
Licensed User
Longtime User
Thanks Doogal, but this didn't work :(

As the Scrollviews are generated from the database, I get db access errors saying table doesn't exist etc?

It works ok with the first language view, but when I select the language and it displays the menu list, if I change orientation the language one appears again?

Must be something simple? I'll keep tottering away :)

Again many thanks for your input.

Cheers,

Malky
 
Upvote 0

Malky

Active Member
Licensed User
Longtime User
Thanks Erel, that helped extremely well.

I tried the StateManager module then realised I was using a database anyway, so just stored what I needed in there and retrieved it using the same methodology.

Hopefully I can crack on now and move faster after obtaining a better understanding of what was happening?

Is there a single link for all types of small tutorials for most possible scenarios?

Cheers,

Malky
 
Upvote 0
Top