Problems with recordsets and SQlite Database since update to Xojo 2015 R3

Hello,

Since I updated to the new Version Xojo 2015 R3 (from 2.4) I have Problems with my old apps. Those are running and building well under 2.4. Now with R3 I have several Nil exception Errors occuring when reading data from database in a recordset. I made a new small App for testing only containing a PopUpMenu which has to be filled with database entries (which definitely exist) when getting Focus. Code is as follows:

[code] Dim rs As RecordSet
if Mitbewerberdatenbank.Connect then
If Mitbewerberdatenbank.Error Then
MsgBox("DB Error: " + Mitbewerberdatenbank.ErrorMessage)
Return
End If

//Listenfeld füllen

PopupMenu1.DeleteAllRows

rs = Mitbewerberdatenbank.SQLSelect("SELECT rowid, * FROM Hersteller ORDER BY Name ASC")
If rs <> Nil Then
  While Not rs.EOF
    PopupMenu1.AddRow(rs.Field("Name").StringValue)
    rs.MoveNext
  Wend
  rs.Close
end if

end if[/code]

Anyone could help me please…I tried everything, but nothing helps. With R2.4 it´s still running well without any Nil Exceptions.

Code looks OK.
I did testing with a project having connections to several SQLite databases at a time, and so far no problems with the 64-bit-build of the application related to recordsets.
I do have some quite big test-databases, so try to find the time to do some testing too if I get the time today.

What OS are you on ?
See also this thread:

I’m on windows 7 64bit. Compilersettings on 32bit to run. Sqlite database not encrypted, no password needed.
Database connected by insert database
With 32bit build it shows the nil exceptions…iif i choose 64bit it gives me error while linking “llinking executable: failed to read binary: no such file or directory”

I will try making clean install of r3.

Ok did fresh install …64bit compilation now links…however same error…

It seems like if i connect by code to existing sqlite database its functioning. So there seems to be a bug in menu…insert…database…sqlite…select existing one.

However how could i do this now for lots of popupmenus to be filled specifically depending on others without connecting everytime for every event from scratch?

Make a small test project with a small database. If it shows the problem then post it here. Don’t expect who knows how many others to do all that for you. The more you put in, the more help you are likely to get.

Ok

Attached please find 3 files. 1 binary Project file, 1 pic of my workdesk and 1 databasefile. The databasefile has to be connected new if it´s in different Folder so you have to select “insert”, “Database”, “select sqlite db” and the attached file. This has to be renamed then to the Name inside the code “Testdatenbank”, old one can be deleted before too, so Name will be already correct then.

…oh no file upload button here…I will check later to upload on dropbox

Where are you getting the Nil object exceptions? - What line in code?

I use SQLite databases heavily in my app and have seen no issues in R3.

Hi again,

So I also tried on my Macbook. Seems to be a bug in “Insert” Menu with SqLite Databases. I cannot even create a new database by using the menu. As soon as I click Insert new SqLite Database I get a connection error and the Editor does not open. The database is displayed in the tree but neither saved nor editable.

I reworked my code to connect to database by code and not by the built-in Insert Database function and everything works well now.

The nil Exception seems to be OK since as described above the database is not connected correctly neither editable if you do it by Insert Menu.

Thank you all for your assistance, for me problem is solved, however the bug is there under Windows and Mac.

Perhaps somebody could just make a new project then just click on Insert-Database-New SQLite and he should get same problems.
No other code or items needed.