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
2
votes
1 answer

Delphi - How to free Memory from a TDataSet?

D2010, Win7 64bit. Hello, I have a buttonClick event with needs to process a TDataSet opened in another routine... GetDBGenericData. The function GetDBGenericData returns a TDataSet. This routine basically takes a tQuery component, sets it's SQL…
user1009073
  • 3,160
  • 7
  • 40
  • 82
2
votes
2 answers

How use TDataset and Dll with Delphi

I'd like create a dll to import data from a file (different format, for example csv, txt, xls, ...). My idea is this: the dll load the data with her "engine" then send this data to my application so my application can show them inside a grid. This…
Martin
  • 1,065
  • 1
  • 17
  • 36
2
votes
1 answer

How do I change TColumn properties programmatically prior to showing a DBGrid at runtime from a Delphi TDBGrid descendant?

I have descended a class from TDBGrid, and I want it to be able to remember any modifications that a particular user makes to the column order and column width. And, I want to be able to do this entirely within the grid itself. I do not want to have…
Cary Jensen
  • 3,751
  • 3
  • 32
  • 55
2
votes
2 answers

How to internally process filtered tDataSet records not to be shown on tDBGrid the result

In the following tFDMemTable I try to sum value of records whose ID field starting letter A. A1, A2 and the result should be 4. type TForm1 = class(TForm) FDMemTable1: TFDMemTable; DBGrid1: TDBGrid; DataSource1: TDataSource; …
SHIN JaeGuk
  • 494
  • 1
  • 5
  • 14
2
votes
2 answers

How can I move data from TDataSet to TClientDataSet? I need XML representation of the data

How can I easily move data from TDataSet to TClientDataSet? I need XML representation of the data in TClientDataSet.XMLData property.
Dmitry
  • 14,306
  • 23
  • 105
  • 189
2
votes
4 answers

Avoiding Duplicate Column Name Additions in a TDataSet

I am dynamically adding fields to a TDataSet using the following code: while not ibSQL.Eof do fieldname := Trim(ibSql.FieldByName('columnnameofchange').AsString); TDataSet.FieldDefs.Add(fieldname , ftString, 255); end Problem is that I might…
Rick cf
  • 134
  • 12
2
votes
0 answers

When filtering a Delphi TDataSet is there a difference between the NULL and BLANK keywords?

When using the Filter property of TDataSet I enter the following filters: 'State <> ''CA'' or State = BLANK' 'State <> ''CA'' or State = NULL' Does BLANK mean empty but not null or are they equivalent or are there other differences between these…
Hobo Joe
  • 181
  • 14
2
votes
4 answers

How do I declare a TField as nullable?

I'm setting up an ADO-based client dataset, and when I try to insert a null value into a TIntegerField, on Post I get Project raised exception class EDatabaseError with message 'Non-nullable column cannot be updated to Null'. I know I've seen a way…
Mason Wheeler
  • 82,511
  • 50
  • 270
  • 477
2
votes
2 answers

How to use TDataSet.DisableControls with Master/Detail datasets?

Calling TDataSet.DisableControls disables the link between master/detail datasets. Is there another way to disable updating data-aware controls without affecting the master/detail relationship? I know I can set individual component's DataSource to…
iMan Biglari
  • 4,674
  • 1
  • 38
  • 83
1
vote
0 answers

Locate jumping to wrong record

I have the weirdest of problems: a Dataset.Locate which SAYS he found a record and jumps to it, BUT the record doesn't fit the criteria. Here's my code: procedure TFZoekEmp.edtZoekNaamEmpChange(Sender: TObject); var lFound:boolean; begin …
Jur
  • 520
  • 2
  • 18
1
vote
0 answers

TTeeGrid at runtime creation gets slower as the number of columns increases

I am creating TTeeGrid (TDataSet descendant) at runtime supplied by API. I noticed that as the number of columns increases, the performance decreases. Meaning, the time of creating TTeeGrid is getting slower. I am developing firemonkey app here and…
RickyBelmont
  • 619
  • 4
  • 11
1
vote
1 answer

How to pass DataSet: TDataSet as procedure parameter

I am setting up a new procedure which will show a message after executing a query. I am using the "AfterOpen" Event where i have to pass the "DataSet: TDataSet" parameter. procedure Tf_SeznamDluzniku.ShowInfoMessage(DataSet: TDataSet; info :…
user3540118
  • 65
  • 1
  • 9
1
vote
2 answers

Why not tDataSet.Append automatically call Post

Delphi tDataSet.Append seems not to call Post. In its reference it says Dataset methods that change the dataset state, such as Edit, Insert, or Append, or that move from one record to another, such as First, Last, Next, and Prior automatically…
SHIN JaeGuk
  • 494
  • 1
  • 5
  • 14
1
vote
1 answer

C++Builder - cannot cast from 'AnsiString' to 'TObject'

I have a problem with converting a string variable to TObject. I have a query that returns two columns to me. In the first column I have varchar values that I translate into strings, and in the second column I have int values. I want to fill a…
1
vote
2 answers

How do I determine when a record is inserted in a TDataSet?

I am writing a grid control that will display the contents of either a TDataSet or a TObjectList. When you only need to support TDataSet, things are quite simple: Link to the dataset via a TDataLink descendant. When painting the contents of the…
Cobus Kruger
  • 8,338
  • 3
  • 61
  • 106