About Us
Products
Purchase
Downloads
Support
Forums
Contact Us
Site
 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 Jan 17, 2012 2:23 am   

[3.34]%sqldb() object needs to be accessible to %sql() for all contexts
 
%sqldb() generates an SQL db connection object. As it is a function, you can assign this object to a variable. Being as it's in a variable, you can then refer to said db connection object from any context.

%sql(), however, only deals with the db connection object name (AardwolfData) rather than the db connection object itself (@dbAardwolfData). This means that %sql() cannot currently be used out of context (ie, from a second window), as this generates a reproducible AV about an unknown database. The workaround, obviously, is to create a local connection object.

Any chance of having either the variable handle an %sql() call (ie, @dbAardwolfData.query("SQL string") or letting %sql() take the variable for the db reference (ie, %sql(@dbAardwolfData,"SQL string"))?
_________________
EDIT: I didn't like my old signature
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