Redian新闻
>
Weblogic 8.1又一个问题---应该是有关JDBC的
avatar
Weblogic 8.1又一个问题---应该是有关JDBC的# Java - 爪哇娇娃
t*k
1
import java.io.*;
import java.sql.*;
import java.util.*;
import javax.ejb.*;
import javax.sql.*;
import weblogic.ejb.*;
import weblogic.jdbc.vendor.oracle.*;
private String updateBulletinReply(BulletinReplyInfo bulletinReplyInfo)
{
if (bulletinReplyInfo == null)
{
return null;
}

try
{
pts = con.prepareStatement(sql);
pts.setString(1,bulletinReplyInfo.getReplyManID());
pts.setTimestamp(2,new
avatar
m*t
2

Why don't you just do:
pts.setTimestamp(2, new java.sql.Timestamp(bulletinReplyInfo.getReplyTime()));

【在 t********k 的大作中提到】
: import java.io.*;
: import java.sql.*;
: import java.util.*;
: import javax.ejb.*;
: import javax.sql.*;
: import weblogic.ejb.*;
: import weblogic.jdbc.vendor.oracle.*;
: private String updateBulletinReply(BulletinReplyInfo bulletinReplyInfo)
: {
: if (bulletinReplyInfo == null)

avatar
t*k
3
As no match was found for constructor(java.util.Date) in type
java.sql.Timestamp
bulletinReplyInfo.getReplyTime() returns a value of java.util.Date;

java.sql.Timestamp(bulletinReplyInfo.getReplyTime()));

【在 m******t 的大作中提到】
:
: Why don't you just do:
: pts.setTimestamp(2, new java.sql.Timestamp(bulletinReplyInfo.getReplyTime()));

avatar
m*t
4

Argh - those parenthesis... Sorry.
No idea, then... I have been doing the same thing lately in similar settings
without any problem.
Which Oracle driver are you using?

【在 t********k 的大作中提到】
: As no match was found for constructor(java.util.Date) in type
: java.sql.Timestamp
: bulletinReplyInfo.getReplyTime() returns a value of java.util.Date;
:
: java.sql.Timestamp(bulletinReplyInfo.getReplyTime()));

avatar
t*k
5
我加载了Oracle 9i自带的的JDBC包

【在 m******t 的大作中提到】
:
: Argh - those parenthesis... Sorry.
: No idea, then... I have been doing the same thing lately in similar settings
: without any problem.
: Which Oracle driver are you using?

avatar
t*s
6
Haha, there are several packages. Make sure that you choose the right one.

settings

【在 t********k 的大作中提到】
: 我加载了Oracle 9i自带的的JDBC包
avatar
t*k
7
i am sure i have cchosen the correct one

【在 t****s 的大作中提到】
: Haha, there are several packages. Make sure that you choose the right one.
:
: settings

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。