这是因为 按照你的条件 agentprice.cpbm=product.cpbm and agentprice.dlbm=agent.dlbm 
在表 agent 里根本没有符合条件的记录.
所以显示为Null ..
建议你看看 两个表的关系用什么关联的 , 设置好where 条件.

解决方案 »

  1.   

    取不出来的都是什么类型的?换成数字试试
    rs.getInt(1);
    .....
      

  2.   

    rs.getInt(1);
    rs.getInt(2);
    rs.getInt(3);
    rs.getInt(4);
    试试
      

  3.   

    你把sql语句直接在数据库里执行呢,什么结果?
      

  4.   

    在数据库中执行:
    select agent.mc,agentprice.cpbm,agentprice.dlbm from agent,agentprice 
    where agentprice.dlbm(+) = agent.dlbm
    结果为 mc  cpbm  dlbm
          北京
          上海
    select agent.mc,agentprice.cpbm,agentprice.dlbm from agent,agentprice 
    where agentprice.dlbm = agent.dlbm(+)
    结果为 mc cpbm  dlbm
              112   021
    agent表中有两条记录,agentprice表中有一条记录。
    没有加号的那一边都能正常显示,郁闷啊!