something like this should work but it doesnt. buf_property is the name of the table i am trying to read from and PropertyDetails is just a declaration. loSourceData and loDestData refer to units that we created at work. Now Prop_Seq_no, Property_id and Property_name are the details that i want to retrive from the table. I am actually copying from loSourceData to loDestData info stored in buf_property<br /><br />Your response will be highly appreciated.<br /><br /><br />{copying buf_property }<br />if PropertyDetails then<br />begin<br />loSourceData := loSourcePart2.DatasetByName('buf_property');<br />loDestData := loDestPart2.DatasetByName('buf_property');<br />if assigned(loSourceData) and not loSourceData.IsEmpty then<br />begin<br />loSourceData.first;<br /> while not loSourceData.Eof do<br /> begin<br /> if not (loDestData.State in [dsInsert, dsEdit]) then<br /> loDestData.Insert;<br /><br /> loDestData.FieldByName('Prop_Seq_No').AsInteger := loSourceData.FieldByName('Prop_Seq_No').AsInteger;<br /> loDestData.FieldByName('Property_Id').AsInteger := loSourceData.FieldByName('Property_Id').AsInteger;<br /> loDestdata.FieldByName('Property_Name').AsString := loSourcedata.FieldByName('Property_Name').AsString;<br /> <br /> loSourceData.Next;<br /> end;<br />end;<br />end;<br /><br />
</div>
</div>