NextResult

כלמנסע

New member
NextResult

ב DataReader יש את המתודה NextResult, שמאפשרת לעבור לסט הנתונים הבא במקרה של מספר סטים חוזרים בעקבות T-SQL. האם יש משהו מקביל לזה ב DataSet?
 

gilad g

New member
אתה מתכוון ל-DataAdapter../images/Emo35.gif

כן
כשה-SelectCommand של ה-DataAdapter מחזיר יותר מסט נתונים אחד, הוא פשוט אוטומטית שם כמה טבלאות ב-DataSet. מתוך ה-MSDN:
If the DataAdapter encounters multiple result sets, it will create multiple tables in the DataSet. The tables will be given an incremental default name of TableN, starting with "Table" for Table0. If a table name is passed as an argument to the Fill method, the tables will be given an incremental default name of TableNameN, starting with "TableName" for TableName0.​
 
למעלה