Dim dt As DataTable
Dim cmd As new SQLCommand
cmd.Connecttionname = "erp"
cmd.CommandText="select * from aeg00000 where centercode='0100' "
dt=cmd.ExecuteReader
DataTables("gride").fill("select a.planid,b.classa from {dt},a {gridc} b where a.itemcode=b.itemcode",True)
gridc ,gride为内部表
[此贴子已经被作者于2010-11-25 10:50:33编辑过]