dr(7) = "http://161.92.143.3/PST/display?id="& Cstr(dr(5)) & ".aspx"

解决方案 »

  1.   

    dr(7) = "http://161.92.143.3/PST/display.aspx?id="dr(5)
      

  2.   

    dr(7) = "http://161.92.143.3/PST/display.aspx?id="+dr(5)
      

  3.   

    dr(7) = "http://161.92.143.3/PST/display.aspx?id="& Cstr(dr(5)) 
      

  4.   

    dr(5)不是数值,是一个字符传,就像
    ("Select * from pbefile where lb = 'Plans'", DBConn)中的“Plans”一样,也就是pbefile表中的LB字段,要通过它去找ID的字段值,传递给display。
    简单的说dr(5)里的值都在表pbefile的LB字段中,是不能直接传递给display的啊
    可是我不知道怎么再通过访问数据库来得到它的ID,我知道select id from pbefile where lb = cstr(dr(5)) 但不知道怎么用,用什么方法
      

  5.   

    dr(7) = "http://161.92.143.3/PST/display.aspx?id="& Cstr(dr(5))
      

  6.   

    楼主应该多学习,首先不明白你说的话,其次你所做的也没有意义比如Session的用法上,还有,DateTable的自定义完全没有意义完全可以使用一个SQL语句实现select 表达式 as 列名 …… where ……表达式就可以实现你想要的功能例如:select id, lb as 'col1', bh as 'col2',……'http://161.92.143.3/PST/display.aspx?id'+id as 'col7' from ……
      

  7.   

    如果需要再次查询用一个select子句就可以了
      

  8.   

    dr(7) = "http://161.92.143.3/PST/display.aspx?id="+ getid(dr(5))private void getid(string aaa)
    {
    connection  .....
    去数据库,查出你要的
    return id
    }
      

  9.   

    唉,我才学了一个月不到,只好赶鸭子上架,先顶着,谁叫老板不招人呢。我又不是管这玩意的。
    BubbleInDiamond(钻石里的泡泡) :如果按我的方法做下去该怎么写呢?介意说明白点么?
      

  10.   

    2002pine(我爱你江南的雪儿) 谢谢,我写看看,呵呵。
      

  11.   

    不过这样,比较浪费资源.
    应在数据库中先做好一个view,或者用一个好的sql语句, 
    Select pbefile.* ,another.id from pbefile,another where pbefile.lb = 'Plans' and pbefile.dr5=another.dr5