Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Jul 10, 2012 4:59 am   

[3.34]AV when trying to open an empty SQLite db file
 
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.
_________________
EDIT: I didn't like my old signature
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: 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.
Reply with quote
Tarn
GURU


Joined: 10 Oct 2000
Posts: 873
Location: USA

PostPosted: 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.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net