Re: nulls in prepared statement

2011-07-20 Thread Peter Ondruška
Eclipselink or Hibernate might help if you want less ugly code. Dne 20.7.2011 23:38 "Tomcat Programmer" napsal(a): > > >> >> You must explicitly set value to null: >> >> if (cobj.getPartNo()==null) pstmt.setNull(1, java.sql.Types.VARCHAR); >> else pstmt.setString(1,cobj.getPartNo()); >> > > Hi Pet

Re: nulls in prepared statement

2011-07-20 Thread Tomcat Programmer
> > You must explicitly set value to null: > > if (cobj.getPartNo()==null) pstmt.setNull(1, java.sql.Types.VARCHAR); > else pstmt.setString(1,cobj.getPartNo()); >  Hi Peter, thanks for responding but I am aware of this as I indicated in my post. You realize how tedious this will be with any sig

Re: nulls in prepared statement

2011-07-20 Thread Tomcat Programmer
>  > It's not an exact match, but your description sounds VERY close to > https://issues.apache.org/jira/browse/DERBY-1938 >  > What version of Derby are you using? > > If you are in fact encountering DERBY-1938, can you upgrade to 10.8 and > see if your results are better? > Yes Bryan, I agr

Need some advice on preventing concurrent access while truncating tables

2011-07-20 Thread Bergquist, Brett
I am implementing a poor man's data partitioning scheme. I have tables for each week of the year (ie. NPA_RESULTS_WEEK_1, NPA_RESULTS_WEEK_2, .. etc). I have a view NPA_RESULTS that joins these tables back together for read-only access. I have a Java Persistence Application (JPA) that is ins