Questions tagged [tdataset]

tdataset is the base class for all dataset components. Defined in the DB.pas unit, it represents data in rows and columns.

55 questions
1
vote
1 answer

Best way to swap two records in TDataset Delphi?

New to delphi and database programming in general but am curious if there is a better way to swap records in a TDataset? I have read through some help and cant find any obvious methods. Currently I have a procedure implemented to move records down…
wfoster
  • 781
  • 10
  • 23
1
vote
0 answers

Does TDataset call OnFilterRecord?

The documentation on Delphi's TDataset.OnFilterRecord and TDataset.Filtered states: Occurs only when a record is fetched from a DB or when the Filtered property is set to True. Write an OnFilterRecord event handler to specify for each record in a…
dummzeuch
  • 10,975
  • 4
  • 51
  • 158
1
vote
2 answers

How do i get a TDataset to store empty string instead of null?

I have a required field in my database (NOT NULL), but empty strings are allowed. How do I get a delphi TDataset to work with this? With the required property of the field object set to either true or false it still seems to be trying to store null…
srayner
  • 1,799
  • 4
  • 23
  • 39
1
vote
1 answer

Copy record from one Table to another not working

I am using the BDE and flat Tables. I have two identical Tables, tblOne and tblTwo I am trying to copy the data from one table to the other. Not the entire DB, just one specific Record using this: function Tdm.CopyRecord(var tblFrom,tblTo : TTable)…
user2175495
1
vote
1 answer

Refresh dataset when applying a filter

I have an TRxQuery in Delphi 5 (which descends from TQuery) bound to a grid. I'm adding a filter edit box and want to filter the grid as the user types. Is there a way to filter the dataset without closing and reopening the query as this causes an…
Will Calderwood
  • 4,393
  • 3
  • 39
  • 64
0
votes
1 answer

Using VCL components to display very large datasets in a grid

My C++ CAD application maintains logs of the user's modeling operations so that they can be unapplied and reapplied. Any particular project may contain just a few operations or it may contain hundreds of thousands of operations. I already have my…
Jeff Wilhite
  • 1,687
  • 13
  • 21
0
votes
1 answer

TDataSet EOF loop logic doesn't seem to match what is documented

I found Using the Eof and Bof Properties when searching on how to loop through a TDataSet. However, I find that the Eof becomes true when the last record is retrieved via Next() instead of after retrieval of a non-existent record, as documented. …
user3161924
  • 1,849
  • 18
  • 33
0
votes
0 answers

How to show encoded Unicode string from JSON to TDBGrid?

Using Embarcadero C++Builder XE3 with Indy TIdHTTP component. From some API, I get a String response: {"Items":[{"Id":"jp-lp|o4nfz4IB6j9TcSaTQGxD","Type":"Container","Text":"106-0031 \u6771\u4EAC\u90FD \u6E2F\u533A…
0
votes
0 answers

How can i append record to TAdoQuery without clearing its fields?

I am using TAdoQuery with BatchOptimistic lock type. If the select command has some fields that are calculated on database server the returned fields has property ReadOnly = true, so i must change them to false so i can modify them in my query. I am…
0
votes
3 answers

TDataset --> Pointer to rows cols matrix?

I am writing a windows application in Lazarus/FreePascal (like Delphi). I have a TDataset object that is populated by 5000 rows, 2 columns of numerical values. I need to pass this data to a C function that I am importing statically from a .dll…
Mike Furlender
  • 3,869
  • 5
  • 47
  • 75
0
votes
2 answers

Updateing dataset

Lets say I have 2 datasets: A and B, that have the same columns. I want to get the 'distance path' - minimal operations needed to be done, to change datasets A to B. I can assume, that A and B contain only in few differences and I'm looking for…
Margus
  • 19,694
  • 14
  • 55
  • 103
0
votes
1 answer

How can I read a whole record at once from a TDataSet?

I am fetching data from a mySQL database using a query (actually a TMyQuery from Devart, inherited from a TDataSet). Usually I process one field at a time inside a while not eof loop using fieldbyname(). As some processing is complex I'd like…
user2834566
  • 775
  • 9
  • 22
0
votes
2 answers

How to assign TFDMemtable AfterPost and AfterDelete events on runtime?

I have a DataModule shared by several forms and in that I built a procedure to processing a TFDMemtable passed as parameter. In order to process it I must to disable the events AfterPost and AfterDelete and when conclude processing I have to enable…
JRG
  • 513
  • 9
  • 23
0
votes
1 answer

How to get TableName of a DataSet?

How do I get the TableName of a DataSet? I tried this: var Tblname: string; begin Tblname := DBGrid1.DataSource.DataSet.TableName; //it is not working //DataSet.TableName is protected end;
Djemoui
  • 77
  • 7
0
votes
1 answer

Delphi, Master-Detail with DetailFields in the where condition (not in select-part)

I am using master-detail connection to show a list of assigned columns of a detail-table. In addition i want to show a second grid with not assigned detail columns Example Master-Table t_human: idHU, nameHU (like John, Oscar, ...) Detail-Table…