KinterBasDB - how to change the mode: embedded/server

DarkBlue pict100 at gmail.com
Fri Jun 11 20:38:19 EDT 2010


On Jun 11, 5:07 pm, durumdara <durumd... at 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()





More information about the Python-list mailing list