I never had the version set to 0 so it should be onCreate. I put a log like this for each db.executeSql: Log.w(TAG, "Starting to create db!");
And got this output. Did I misunderstand you of how to find the problem? 10-04 15:01:12.546: Warn/DbAdapter(8904): Starting to create db! 10-04 15:01:12.546: Warn/DbAdapter(8904): tabel1 created! 10-04 15:01:12.546: Warn/DbAdapter(8904): tabel2 created! 10-04 15:01:12.546: Warn/DbAdapter(8904): tabel3 created! 10-04 15:01:12.556: Warn/DbAdapter(8904): tabel4 created! 10-04 15:01:12.556: Warn/DbAdapter(8904): tabel5 created! 10-04 15:01:12.556: Warn/DbAdapter(8904): tabel6 created! 10-04 15:01:12.556: Warn/DbAdapter(8904): tabel7 created! 10-04 15:01:12.556: Warn/DbAdapter(8904): tabel8 created! 10-04 15:01:12.556: Warn/DbAdapter(8904): tabel9 created! 10-04 15:01:12.567: Warn/DbAdapter(8904): tabel10 created! 10-04 15:01:12.567: Warn/DbAdapter(8904): tabel11 created! 10-04 15:01:12.567: Warn/DbAdapter(8904): tabel12 created! //André On Oct 4, 2:49 pm, Kostya Vasilyev <[email protected]> wrote: > 04.10.2011 16:42, André пишет: > > > I had a problem where the database called onCreate every time i > > started my app and got the suggestion of using that bit of code. But I > > see your point. > > I can see how that could happen if your VERSION was defined as 0, or if > your onCreate failed. > > > Could that have anything to do with failt to setLocale? > > Possibly :) > > > > > I tried without that bit of code now and get this error: > > the bind value at index 1 is null > > Ah, and so it does. > > Your code never completes creating the database. Fix onCreate to run > start to finish without throwing an exception (add log statements on > entry and exit to check, to step through in the debugger), and I think > you won't see it called multiple times anymore. > > -- > Kostya Vasilyev -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

