How can I use Two or more DBContection in One Processing?

Nov 27, 2008 at 2:09 AM
In my Programe,I want use two differ dbcontection in one processing.but DbEntry appear support one connection in once?
How can I do it?thanks a lot!
Nov 27, 2008 at 5:48 AM
Every time you do a db stuff it will new a dbconnection like:

User u = User.New().Init("tom");
u.Save(); // first connection
u.Name = "jerry";
u.Save(); // 2nd connection
u.Delete(); // 3rd connection
u.FindBySql("select * from Users"); // 4th connection

Every time it will new the connection, open it, process and close it.

If you want use the same connection/trasaction, you can call;


For your question, I don't think you need to do anything.
Nov 27, 2008 at 6:36 AM
Nov 27, 2008 at 6:39 AM
Nov 27, 2008 at 9:13 AM
So what you want is not multiple connection, it's multiple datasource: