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)) 但不知道怎么用,用什么方法
楼主应该多学习,首先不明白你说的话,其次你所做的也没有意义比如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 ……
("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)) 但不知道怎么用,用什么方法
{
connection .....
去数据库,查出你要的
return id
}
BubbleInDiamond(钻石里的泡泡) :如果按我的方法做下去该怎么写呢?介意说明白点么?
应在数据库中先做好一个view,或者用一个好的sql语句,
Select pbefile.* ,another.id from pbefile,another where pbefile.lb = 'Plans' and pbefile.dr5=another.dr5