On Jul 12, 2012, at 6:51 AM, Sibylle Koczian wrote:

> I want to change the database backend for an existing (test) application 
> from SQLite to PostgreSQL. The table structures are identical, so I 
> thought I just had to do three things:
> 
> - create the application using "app = dabo.dApp("myCryptoKey")
> - put a .cnxml file in the db directory of the application which is 
> right for the PostgreSQL database (and which works in another application)

        Database servers such as PostgreSQL have very different connection 
parameters than file-based backends. Did you edit the .cnxml file first?

>   File "./CxnEditor.py", line 543, in writeChanges
>     vals = self.relPaths(self.connDict.values())
>   File "./CxnEditor.py", line 556, in relPaths
>     if self.isFileBasedBackend(val["dbtype"]):
> KeyError: 'dbtype'
> 
> What is happening here? What sort of information should I provide?

        First off, what was the setting for the "Database Type" dropdown? That 
should be what is in val("dbtype").

        Second, it sounds like it is connecting to your SQLite database, not 
the PostgreSQL database, since you said that the password was empty (unless 
neither require a password to connect).

        Third, I would generally define two connections, one for each backend, 
and then use some sort of configuration setting to determine which connection 
to use when you run your app. That is generally how I have handled moving 
between development and production backends.


-- Ed Leafe



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to