- 论坛徽章:
- 0
|
我有个问题很急,希望高手可以帮帮我!
首先,说一下我的环境:
数据库:informix 9.30.FC5,它的DBDATE=Y4MD/。
操作系统:HP-UNIX
中间件:Weblogic 8.1
然后,
我在java类里调用一条sql语句,例如:
select * from tb1 where rdate=?
现在这个?参数我不能确定是以什么形式进去的。
rdate是个日期类型的字段。
按理最终在数据库里应该是转换成YYYY/MM/DD的格式到数据库表里去匹配的。
可以确定的一点是,我的程序里是以"YYYYMMDD"的字符串形式给sql语句赋值的。
我有两套环境,测试环境1,测试环境2。
当然,两套环境的数据库、操作系统、中间件都是一样的。
现在,我的测试环境1可以执行那个类而不报错。
而测试环境2的却不行,我也不知道究竟哪里的配置出了问题,希望有高手可以指点指点!
我没多少分,希望大家不要介意!
也希望大家多给给意见!
谢谢了!
哦!差点忘了,数据库报的错误代码是 79802,该错误的具体描述如下:
-79802 Not enough tokens are specified in the string representation of a
date value.
This error occurs because the date string specified does not have the
minimum number of tokens or separators needed to form a valid date value
(composed of year, month, and day numerical parts). For example, 12/15/98
is a valid date string representation with the slash character as the
separator or token. But 12/1598 is not a valid date string representation,
because there are not enough separators or tokens. To fix the problem,
modify the date string representation to include a valid format for
separating the day, month, and year parts of a date value. |
|