if ADODataSet1.State<>dsinactive then 
ADODataSet1.Close ;
当执行到ADODataSet1.Close ;时,系统报错“bof 或 eof 有一个为真,或当前记录已被删除,操作需要一个当前记录!”