 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
|
_________________ EDIT: I didn't like my old signature |
|
|
 |
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Tue Jul 10, 2012 1:55 pm |
I noticed something like that with #SQLDB just last week. I'm not at home to check just now, but I think it would work if there was no file--it would create a new empty database file. But if you didn't add anything to the file, the next time you ran #SQLDB on it, it would give an AV. I didn't think hard about it--I just made sure I added a table to the new file before closing it. I'll try to remember to test this when I get home.
|
|
|
 |
Tarn GURU
Joined: 10 Oct 2000 Posts: 873 Location: USA
|
Posted: Tue Jul 10, 2012 8:31 pm Re: [3.34]AV when trying to open an empty SQLite db file |
MattLofton wrote: |
dbvar = %sqldb("blah.dbm")
#call @dbvar.open
This generates an AV if the database file happens to be empty. Similar AVs are generated if the filepath is wrong. |
I can replicate that.
The first time you run those commands and exit the program, a zero byte file has been created.
Load up CMUD, run those commands again and get a parse error telling you that it's not a valid sqlite database. |
|
|
 |
|
|