请问一下.net中DataReader如何嵌套?
while (sdr.Read())
{
storeid = sdr[0].ToString();
Storepi = sdr[1].ToString();
mobileinfoid = sdr[2].ToString();
MobileModel = sdr[3].ToString();
sdrAccessory = AccessoryStoreCmd.ExecuteReader();
while (sdrAccessory.Read())
{
AccessoryName += sdr[0];
AccessoryName += " ";
AccessoryName += sdr[1];
AccessoryName += " ";
}
}
------解决方案--------------------这样做会占用两个Connection,lz三思
------解决方案--------------------先用dataset