[web-devel] [Yesod] Teach me how to write to access second database.

Petter Egesund petter.egesund at gmail.com
Mon Feb 28 20:17:33 CET 2011


Hi

This might not be the correct answer to your problem, but I asked
about how to pass a hashtable to the application in a prevoius mail.

The answer was to pass the ioref in the data constructor - Michael
wrote a very good example at:
https://github.com/snoyberg/haskell-web-rosetta/blob/master/counter/yesod.hs

It might be you can connect to the database, and then pass it on and
handle this second db-connection manually?

Cheers,

Petter Egesund

On Mon, Feb 28, 2011 at 10:05 AM, Katsutoshi Itoh <cutsea110 at gmail.com> wrote:
> Hi
>
> I write an application, which must to access 2 databases.
> 1st is main database for this application.
> 2nd database is used as main database by another application.
>
> Could you teach me how to write to access 2nd database?
> Since there is no access to the 2nd database only partially, I'm a
> little problem in an ad hoc way.
>
> _______________________________________________
> web-devel mailing list
> web-devel at haskell.org
> http://www.haskell.org/mailman/listinfo/web-devel
>



More information about the web-devel mailing list