Something wrong datasource recno lazarus / 16-Databases ---------------------------------------------------------------------- eldonfsr · 2017-10-04 18:48 I have a table and i wanna to know what is the position suppos must be like that RegAct := SQLQMovsParts.DataSource.DataSet.RecNo; but give me 0 never the position of recno what i doing wrong. ---------------------------------------------------------------------- GAN · 2017-10-04 23:19 Use your query not the dataset, because: http://lazarus- ccr.sourceforge.net/docs/fcl/db/tdataset.recno.html Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i RegAct := SQLQMovsParts.RecNo ---------------------------------------------------------------------- fpcoder · 2017-10-04 23:42 Like GAN said. TDataSource.Dataset is implemented as a TDataSet. Your TSQLQuery is assigned to it, but you would need a cast to access the RecNo property since it is not implemented in TDataSet: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i (DataSource1.DataSet as TSQLQuery).RecNo; ---------------------------------------------------------------------- LacaK · 2017-10-08 08:16 GetRecNo and SetRecNo are virtual in TDataSet. so they can be and are overriden in TDataSet descendants, so there is no need to cast TDataSource.TDataSet Why you get always 0 for RecNo may depend on situation where you are trying to read RecNo ? (for example if you are inserting new record then RecNo of this new record is = 0) ---------------------------------------------------------------------- eldonfsr · 2017-10-11 00:42 ok thanks