on 08-07-2009 9:57 AM
Hi All,
I've problems in inserting the Date value into java dictionary table (Oracle is the backend). i'm getting the below error: "type check error: new value (element number 2) is not assignable to column". what is the format it accepts while inserting date?
i've done almost all the possible ways to insert the date into dictionary table. plz suggest me if there are any other ways or i'm i missing anything?
tnx,
-JB
Hi,
Which type of date object you are using?
java.util.Date or java.sql.Date;
For backends such as SAP R/3 accept only java.sql.Date they don't accept java.util.Date. Just check this too. You can check in import statements which type of Date is being used.
You can initialize it as
Date today = new Date(System.currentTimeMillis());
regards,
Siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Siva,
thanks for your comments. i'm using java.sql.Date only, where ever required to insert into DB. i guess this is the problem with OpenSQL (Open JDBC) framework which is not accepting any kind of date format while inserting.
and when i print the insert statement the value portion looks like : "... VALUES (1,(2009 - 😎 - 7)", dont understand wt is that??
i've just tried "Date today = new Date(System.currentTimeMillis());"
its giving the same error it gave me before, below is the error:
type check error: new value (element number 2(SMALLINT)) is not assignable to column >>SDATE<<(DATE)
i hope this error will give you some idea toward the solution, i'm tried with all the options. even PrepareStatements are not supported by Open JDBC framework.
tnx,
-JB
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.