[Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-21 Thread Neil.Lv
On Jan 22, 10:06 am, Naftoli Gugenheim wrote: > 'mvn clean' deletes them for you. > > - Got it, Thank you very much! Cheers, Neil -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send ema

Re: [Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-21 Thread Naftoli Gugenheim
'mvn clean' deletes them for you. - Neil.Lv wrote: Thanks guys very very much! I'm using the Windows XP, I reset the height buffer for the CMD now, and can see the full error message now. The code can work fine now ( it's so strange that I run this c

[Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-21 Thread Neil.Lv
Thanks guys very very much! I'm using the Windows XP, I reset the height buffer for the CMD now, and can see the full error message now. The code can work fine now ( it's so strange that I run this code on the another computer , and it's all OK... ) Maybe I need to delete all the targ

Re: [Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-21 Thread David Pollak
On Thu, Jan 21, 2010 at 9:29 AM, Neil.Lv wrote: > > The users table in the OneDB, and the hots table in the TwoDB, they > are separated! > > I have changed the method that like this: > ### > # I specify the TwoDB for hots table. > override def dbDefaultConnectionIdentifier = bootstrap.liftweb

Re: [Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-21 Thread Ross Mellgren
"It doesn't work" is not sufficient to diagnose. What behavior did you get, and what were you expecting? Were there any errors, log messages, exceptions, etc? If so, please copy them. Finally, if you have a reproducible test case please post it to github. I note earlier in the thread that you we

[Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-21 Thread Neil.Lv
The users table in the OneDB, and the hots table in the TwoDB, they are separated! I have changed the method that like this: ### # I specify the TwoDB for hots table. override def dbDefaultConnectionIdentifier = bootstrap.liftweb.TwoDB def getHots3(id : Long) = { DB.use(bootstrap.

Re: [Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-21 Thread David Pollak
What is wrong with: DB.use(FirstDB) { firstConnection => DB.use(SecondDB) { secondConnection => // do transactional query between two DBs here } } Note that DB.use nests such that the transaction will only be committed when the last DB.use block for a given ConnectionIdentifier is exited

[Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-21 Thread Neil.Lv
I have added the demo code on the Github now. ( Mabye it's a bug with DB.runQuery and DB.use in the two db vender ) Here is the address: http://github.com/anim510/two_db_demo Thanks very much! Cheers, Neil On Jan 21, 11:26 am, "Neil.Lv" wrote: >   My email is :   anim...@gmail.com

[Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-20 Thread Neil.Lv
My email is : anim...@gmail.com On Jan 21, 11:17 am, "Neil.Lv" wrote: > Mabye it's a bug with DB.runQuery and DB.use in the two db vender > > Two question: (problem) > > 1: I don't know why the HelloWorld snippet code will be execute 2 > times in this code. (See the HelloWorld.scala fil

[Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-20 Thread Neil.Lv
Mabye it's a bug with DB.runQuery and DB.use in the two db vender Two question: (problem) 1: I don't know why the HelloWorld snippet code will be execute 2 times in this code. (See the HelloWorld.scala file.) 2: The dbDefaultConnectionIdentifier method in the Model that it works fine when

[Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-20 Thread Neil.Lv
The DB.runQuery can works now, but the DB.prepareStatement also cant' work. Here is the test app address: http://github.com/anim510/two_db_demo Cheers, Neil On Jan 21, 1:16 am, "Neil.Lv" wrote: >    Thank you very much, > >    But it doesn't work yet, maybe because of using two db conn

[Lift] Re: How to use prepareStatement to select *** from DB (two db vender)?

2010-01-20 Thread Neil.Lv
Thank you very much, But it doesn't work yet, maybe because of using two db connections. I'll test it later again. On Jan 21, 12:44 am, Jeppe Nejsum Madsen wrote: > "Neil.Lv" writes: > > Hi all, > > >   I use two db connections in my app, and I want to use > > DB.prepareStatement to