开发者

Error calling Locate() on DataSet

Consider the code below. I need to remove the error which is coming because of Locate. Please help me to do the same.

public virtual void updateZeroPointLast(Decimal bdID)
{
    if (!qdsErosionElSave.Open)
    {
        qdsErosionElSave.open();
    }
    // Locate the row to update
    DataRow dr = qdsErosionElSave.Tables["erosionelement"].NewRow();
    d开发者_运维知识库r["EL_ID"] = bdID;
    if (qdsErosionElSave.locate(dr, Locate.FIRST))
    {
        // Update qdsErosionElSave
        DateTime tsZeroPoint = qdsErosionElSave.getTimestamp("ZEROPOINT");
        Console.WriteLine(bdID + " " + tsZeroPoint.ToString());
        qdsErosionElSave.editRow();
        qdsErosionElSave.setTimestamp("ZEROPOINTLAST", tsZeroPoint);
        qdsErosionElSave.post();
    }
}

Thanks.


Is Locate.First null? I'd check that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜