data-aware

Preferable way to write Delphi database apps with transactions & data-aware components

匆匆过客 提交于 2020-01-22 14:04:17
问题 What is the preferable way to write Delphi database applications using transactions and also data-aware components? I have to write a client app that access InnoDB tables, and do some master-detail kind of things inside transactions. After doing some research on transactions (from general point-of-view), then I humbly make a conclusion that non data-aware components and hand-coded SQL would be the "perfect match" of transactions; But the data-aware components wouldn't be. They don't seem to

Preferable way to write Delphi database apps with transactions & data-aware components

大城市里の小女人 提交于 2020-01-22 14:02:51
问题 What is the preferable way to write Delphi database applications using transactions and also data-aware components? I have to write a client app that access InnoDB tables, and do some master-detail kind of things inside transactions. After doing some research on transactions (from general point-of-view), then I humbly make a conclusion that non data-aware components and hand-coded SQL would be the "perfect match" of transactions; But the data-aware components wouldn't be. They don't seem to

How can I get a dataset of in-memory objects?

柔情痞子 提交于 2020-01-01 04:58:12
问题 Does anyone know of a TDataset descendant that works with Generics and RTTI, so that I can write code like this, and make use of data-aware components in the GUI? : ... ds:TDataset<TPerson>; ... procedure DoStuff; begin ds:=TDataset<TPerson>.create; ds.add(TPerson.Create('A.','Hitler',77)); ds.add(TPerson.Create('O.','Bin Laden',88)); end; This should be possible. The fielddefs can be created via RTTI because the exact type of the data is known. Values can also be automatically marshalled

Django: How-to convert naive datetime when time zone support is active?

喜夏-厌秋 提交于 2019-12-12 03:33:36
问题 I'm struggeling with Django and datetime. I have a datetime-string as this "Sun, 28 Aug 2016 11:42:00 +0200" - so from my point of view including timezone information "+0200" Then I convert it using this: date_published = time.strptime(date_published, "%a, %d %b %Y %H:%M:%S %z") It gives me this: time.struct_time(tm_year=2016, tm_mon=8, tm_mday=28, tm_hour=11, tm_min=42, tm_sec=0, tm_wday=6, tm_yday=241, tm_isdst=-1) Then I try to convert it like this: date_published = datetime.fromtimestamp

Are there any good free/cheap Delphi grid controls?

给你一囗甜甜゛ 提交于 2019-12-09 04:20:35
问题 I gave up on Delphi's DBGrid nearly a decade ago because it is simply no good. Since then, I have used Virtual TreeView which offers a lot of value but it has a few issues. Like the current state of development (e.g. None) and the fact that there is no good data-bound version. DevExpress's QuantumGrid is famous for the rich feature set but is really quite expensive. I reckon that its huge feature set is probably overkill for 95% of the general use cases for data-bound grid controls. Does

Is there a TDBComboBox equivalent that goes by ItemIndex?

霸气de小男生 提交于 2019-12-08 02:41:43
问题 In the helpfile entry for TDBComboBox, it says that the text of the selected option becomes the new value for the field. Is there any similar control that goes by ItemIndex instead of text? (To represent an enumerated type, for example.) 回答1: Try the TDBLookupComboBox. Check out the ListField, DataField and KeyField properties. 回答2: You can fill TDBComboBox items with numbers ('0, '1', '2', ...), but set DBComboBox1.Style to csOwnerDrawFixed and write OnItemDraw event. Something like this:

Is there a TDBComboBox equivalent that goes by ItemIndex?

感情迁移 提交于 2019-12-06 08:31:17
In the helpfile entry for TDBComboBox, it says that the text of the selected option becomes the new value for the field. Is there any similar control that goes by ItemIndex instead of text? (To represent an enumerated type, for example.) Try the TDBLookupComboBox. Check out the ListField, DataField and KeyField properties. You can fill TDBComboBox items with numbers ('0, '1', '2', ...), but set DBComboBox1.Style to csOwnerDrawFixed and write OnItemDraw event. Something like this: procedure TForm1.DBComboBox1DrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState);

How can I get a dataset of in-memory objects?

青春壹個敷衍的年華 提交于 2019-12-03 12:51:46
Does anyone know of a TDataset descendant that works with Generics and RTTI, so that I can write code like this, and make use of data-aware components in the GUI? : ... ds:TDataset<TPerson>; ... procedure DoStuff; begin ds:=TDataset<TPerson>.create; ds.add(TPerson.Create('A.','Hitler',77)); ds.add(TPerson.Create('O.','Bin Laden',88)); end; This should be possible. The fielddefs can be created via RTTI because the exact type of the data is known. Values can also be automatically marshalled back and forth, so you can both view and edit data that's in a class or a record. I hate having to write a

Preferable way to write Delphi database apps with transactions & data-aware components

烈酒焚心 提交于 2019-12-03 12:27:07
What is the preferable way to write Delphi database applications using transactions and also data-aware components? I have to write a client app that access InnoDB tables, and do some master-detail kind of things inside transactions. After doing some research on transactions (from general point-of-view), then I humbly make a conclusion that non data-aware components and hand-coded SQL would be the "perfect match" of transactions; But the data-aware components wouldn't be. They don't seem to be made for each other. I have the real need to use transactions, but on the other hand I could not just

Using Delphi data-aware components - pros and cons [closed]

不羁岁月 提交于 2019-12-03 05:13:42
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 3 years ago . I want to know your opinion about using data-aware components in projects. Which are the 'strength' and 'weak' points of developing applications(win32 and web), by using Delphi and data-aware components(from Delphi's standard suite or third-party)? Using FireBird I've worked