Prev: How do subprocess.Popen("ls | grep foo",shell=True) with shell=False?
Next: passing environment variable path to open command
From: durumdara on 11 Jun 2010 05:07 Hi! I want to use KinterBasDB in mixed mode: sometimes embedded, sometimes real local/remote server. How can I set up the connection to KinterBasDB can determine, what mode I want to use? Thanks for your help: dd
From: DarkBlue on 11 Jun 2010 20:38
On Jun 11, 5:07 pm, durumdara <durumd...(a)gmail.com> wrote: > Hi! > > I want to use KinterBasDB in mixed mode: sometimes embedded, sometimes > real local/remote server. > How can I set up the connection to KinterBasDB can determine, what > mode I want to use? > > Thanks for your help: > dd you could use 2 connection strings and make the selection yourself as needed. e.g. def kbconnector(connectionmode): if connectionmode=='use_embedded': myonnectionstring=..... elif connectionmode=='use_real': myconnectionstring=kinterbasdb.connect.... return myconnectionstring #connect to the embedded server somemode='use_embedded' myconnector=kbconnector(somemode) mycursor=myconnector.cursor() |