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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
phrento
Newbie


Joined: 17 Oct 2003
Posts: 4
Location: USA

PostPosted: Fri Oct 17, 2003 4:13 pm   

database not available unless db window open
 
I am using the database module in zmud to track/ save and display various information on clan members.
Everything works fine while I have the db window open or minimized,
My question is "Must I open this window to have access to the DB?"
when I dont open the DB window the scripting acts as the DB is not open, no information is being displayed in in target windows when script calls for DB data.

When I have the DB window open I can see that the script opens the db, changes the view, performs the queries, sets and resets filters.

Totally confused, is this a normal situation ??
Its not really a big deal like I said everything works when I open the db window (I wont have to open the db the script does that fine)
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Oct 17, 2003 5:20 pm   
 
That's correct. The database module is only loaded when the database window is open, so you can't use it when the database window is closed.
Reply with quote
phrento
Newbie


Joined: 17 Oct 2003
Posts: 4
Location: USA

PostPosted: Fri Oct 17, 2003 9:53 pm   
 
Thanks for that.
I thought I was doing something wrong.
Is there a way to set the DB module to load on start when a certain character or session is intiated??
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Oct 17, 2003 11:40 pm   
 
Sure can. You can open itm position it how you want, then save the layout. Layouts are character specific, so it would only affect that character.

The other option is to add a little code snippet to your existing scripts to check for the DB window being open, and open it when it is not. This is what I use for my ID database.
#DBOFFLINE
#DBLOAD ID
#VIEW All
#DBFIRST
#IF (%rec="") {
#MENU {Windows|Database}
#WHILE (%rec="") {
#DBLOAD ID
#VIEW All
#DBFIRST
}
}

The #WHILE is there because it might take a moment to load up the DB after the #MENU opens it. If your DB currently has no records this will cause an infinite loop, I never got around to fixing this, but could easily be done with %numrec.
Reply with quote
phrento
Newbie


Joined: 17 Oct 2003
Posts: 4
Location: USA

PostPosted: Sat Oct 18, 2003 3:40 pm   
 
Thanks again,
I had tried to open the window and then make changes to the layout and dock it all and save, it didnt work ( i was using 6.16 at the time, I did just upgrade to 6.62 and now I am able to lock the layout with db window open, docked and rolled up.
I do have scripting that checks to see if the db is open since the db contains static information in first field its quite easy.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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