更新时间:2023-02-04 10:02:23
IDataReader.Read()
返回bool
,如果读取了一行,则为true
.
您需要获取该行中第一个字段的值.这是执行此操作的一种方法:
IDataReader.Read()
returns abool
which istrue
if a row was read.
You need to get the value of the first field in that row. Here is one way to do that:
int maxId = dr2.GetInt32( 0 );
尼克
Nick