Is there a func for changing Database Query Builder connection parameters at runtime?

Andre Garzia soapdog at mac.com
Sat Jan 10 16:16:50 EST 2004


	Hi revFolks,

	I am making an app (Called DataJunior, nice app, 
http://www.soapdog.org/blog for info) which uses a mix of DB handlers 
and Database Query Builder stuff... This application is a mix of 
substacks, each substack is like an self-contained application dealing 
with a very specific problem, like for example there's an addressbook 
like app, there's a team management app... When the substack needed 
more complex database resources, I wrote my own functions but when it 
was a simple query I used Database Query Builder (It's a cool thing!).

	It was like dream coding, adding complexity only when needed, but I 
didn't foresaw one problem. The bootstrap problem, like setting it up 
for the first run on another computer that is not mine. For my hand 
coded funcs, I made a substack called "DBConf" which is responsible for 
loading itself on launch time, checking for Database connection 
parameters, if they are not present (first run) asking for them, saving 
it, opening the connection. So far so good, I've got a reusable 
substack that will take care of opening and closing connections to 
database and will put all the usefull info in a nice global. The 
problem is, How do I take this parameters (host, username, pass...) to 
Database Query Builder. See, I can garantee that my funcs will work, 
but Automatic Queries are strange entities sometimes. Here, everything 
points to home.soapdog.org, but this will be deployed to an enterprize 
and hell knows where they will install MySQL, I would not like to build 
a new version everytime they feel like changing their ips or their 
servernames.... There must be an undocummented nice way like 
revHeyChangeAutoQueriesParametersToWhereverMyServerIs or something near 
this.. :-D

	So... anyone here can point me to some frontscript or info? Also, I am 
thinking about posting in the web a developer journal on this app and 
making the code available, would people here find this usefull?

	Cheers

Andre Alves Garzia ð 2003 ð BRAZIL
http://www.soapdog.org



More information about the use-livecode mailing list