Re: [sqlite] HELP: SQLException getErrorCode vs gerErrorMessage()

2011-06-08 Thread Sridhar Polavarapu
ne with Java/JDBC experience (which i dont have) may be > able to help you. > > Martin > > > Am 08.06.2011 17:37, schrieb Sridhar Polavarapu: >> I am on windows 7 and this is my test code >> >> try >> { >> Statement sta

Re: [sqlite] HELP: SQLException getErrorCode vs gerErrorMessage()

2011-06-08 Thread Sridhar Polavarapu
what interface are you using? what OS? > SQLException is not a part of the sqlite library, so obviously you use > an additional layer. > > Martin > > Am 08.06.2011 16:44, schrieb Sridhar Polavarapu: >> Appreciate if anyone can help me. >> >> Thanks >> Sridhar &

Re: [sqlite] HELP: SQLException getErrorCode vs gerErrorMessage()

2011-06-08 Thread Sridhar Polavarapu
Appreciate if anyone can help me. Thanks Sridhar On 08-06-2011 16:16, Sridhar Polavarapu wrote: > Hi > > I am using getErrorCode() of SQLException to see if the exception is > due to any database lock. I all the time get Errorcode to be 0 even > though the getMessage is retu

[sqlite] HELP: SQLException getErrorCode vs gerErrorMessage()

2011-06-08 Thread Sridhar Polavarapu
Hi I am using getErrorCode() of SQLException to see if the exception is due to any database lock. I all the time get Errorcode to be 0 even though the getMessage is returning different messages. Can anyone let me know if there is some thing that i need to do to get the error codes correctly ?

Re: [sqlite] HELP: sqlite queries execute faster in sqlite manager addon but take a lot of time to execute using a java program

2011-06-06 Thread Sridhar Polavarapu
Changing the driver helped in improving the performance drastically. Sridhar On 03-06-2011 20:05, Sridhar Polavarapu wrote: > This is not any update or insert statement. This is just a select > statement. Will that help if i change the driver ? I am currently > using sqlitejdbc

Re: [sqlite] HELP : how to use datetime('column', 'localtime') as a part of sql string

2011-06-06 Thread Sridhar Polavarapu
Thanks Pavel for your replies. The reason looks to be the driver I am using to connect sqlite. I have changed it to use the driver from xerial and it is working fine now. Sridhar On 03-06-2011 12:00, Sridhar Polavarapu wrote: > Here is the code of my TestStatusDate > > public static

[sqlite] HELP: sqlite queries execute faster in sqlite manager addon but take a lot of time to execute using a java program

2011-06-03 Thread Sridhar Polavarapu
This is not any update or insert statement. This is just a select statement. Will that help if i change the driver ? I am currently using sqlitejdbc-v056.jar Thanks Sridhar On 03-06-2011 18:59, Sridhar Polavarapu wrote: > Hi > > One of my sqlite query executes faster in sqlite manager

[sqlite] sqlite queries execute faster in sqlite manager addon but take a lot of time to execute using a java program

2011-06-03 Thread Sridhar Polavarapu
Hi One of my sqlite query executes faster in sqlite manager( firefox addon ) but take a lot of time to execute using a java program. Here is the snippet PreparedStatement mStatement; ResultSet mResults; CachedRowSetImpl impl=null; Connection mconn = null;

Re: [sqlite] HELP : how to use datetime('column', 'localtime') as a part of sql string

2011-06-02 Thread Sridhar Polavarapu
And your TestStatusDate code is? > > I'd bet now that the problem is in the way you get that time from > jdbc. It can convert the time back to utc for you, although it looks a > little strange that it converts one date and doesn't convert other > one... > > > Pa

Re: [sqlite] HELP : how to use datetime('column', 'localtime') as a part of sql string

2011-06-02 Thread Sridhar Polavarapu
except executes this > query? Run this mini-program, see what it returns. Then from the same > shell prompt run sqlite3 command line utility and execute this query > there, see if results are different. If they are show us full text of > java mini-program, we will try to find the pro

Re: [sqlite] HELP : how to use datetime('column', 'localtime') as a part of sql string

2011-06-02 Thread Sridhar Polavarapu
I have verified my locale and default time zone in the same program.The values are correct and it is not UTC timezone. Any help appreciated. Sridhar On 02-06-2011 19:34, Sridhar Polavarapu wrote: > The returned value is displayed to the user. We are not storing back > the returned

Re: [sqlite] HELP : how to use datetime('column', 'localtime') as a part of sql string

2011-06-02 Thread Sridhar Polavarapu
gt; something here ? > Looks like your java program runs with a different locale than SQLite > Manager. I'm not sure why it thinks that you are in a UTC timezone. > Maybe there's something in starting scripts or in initialization code > of this program? > > > Pavel > &g

[sqlite] HELP : how to use datetime('column', 'localtime') as a part of sql string

2011-06-02 Thread Sridhar Polavarapu
Hi I am preparing a string sql query as follows String jobQuery = "SELECT j.jobId, c.channelName , datetime(j.jobCreateDate,'localtime') as jobCreateDate, j.jobStatus, CASE WHEN j.jobQuality='md' THEN 'Medium' WHEN j.jobQuality='hi' THEN 'High' WHEN j.jobQuality='lo' THEN 'Low' ELSE 'Unsp