只能取得主键的值,其他字段都是null,数据库中都是有值的,可能是什么原因阿,在线等
String querySql1 = "select sid,area,co,tel,fax,email from ServiceRepresentatives " ;
// + " order by area ";
Connection conn = null ;
dbConn dbconn = new dbConn();
try
{
conn = dbconn.getConnection() ;
// Statement stmt = conn.createStatement();
// ResultSet V_rst = stmt.executeQuery(querySql1);
PreparedStatement pstat = conn.prepareStatement( querySql1 ) ;
ResultSet V_rst = pstat.executeQuery() ;
while( V_rst.next() )
{
RepresentativeForm V_RepresentativeForm = new RepresentativeForm();
System.out.println( V_rst.getString(1) );
System.out.println( V_rst.getString(2 ) );
System.out.println( V_rst.getString(3 ) );
System.out.println( V_rst.getString(4 ) );
System.out.println( V_rst.getString(5 ) );
System.out.println( V_rst.getString(6 ) );
//V_RepresentativeForm.setSID ( V_rst.getString( "sid " ) );
&nb