|
From: <na...@us...> - 2006-12-08 09:41:29
|
Revision: 735
http://svn.sourceforge.net/instantobjects/revision/?rev=735&view=rev
Author: nandod
Date: 2006-12-08 01:41:29 -0800 (Fri, 08 Dec 2006)
Log Message:
-----------
* fixed incomplete implementation of IdDataType and IdSize in the ADO broker.
Modified Paths:
--------------
trunk/Source/Brokers/ADO/InstantADOConnectionDefEdit.dfm
trunk/Source/Brokers/ADO/InstantADOConnectionDefEdit.pas
Modified: trunk/Source/Brokers/ADO/InstantADOConnectionDefEdit.dfm
===================================================================
--- trunk/Source/Brokers/ADO/InstantADOConnectionDefEdit.dfm 2006-12-08 09:40:42 UTC (rev 734)
+++ trunk/Source/Brokers/ADO/InstantADOConnectionDefEdit.dfm 2006-12-08 09:41:29 UTC (rev 735)
@@ -4,7 +4,7 @@
BorderStyle = bsDialog
Caption = 'ADO Connection'
ClientHeight = 242
- ClientWidth = 362
+ ClientWidth = 446
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@@ -19,7 +19,7 @@
object BottomBevel: TBevel
Left = 0
Top = 205
- Width = 362
+ Width = 446
Height = 2
Align = alBottom
Shape = bsBottomLine
@@ -27,7 +27,7 @@
object ClientPanel: TPanel
Left = 0
Top = 0
- Width = 362
+ Width = 446
Height = 205
Align = alClient
BevelOuter = bvNone
@@ -40,6 +40,22 @@
Caption = 'Blob &format'
FocusControl = StreamFormatComboBox
end
+ object Label1: TLabel
+ Left = 134
+ Top = 152
+ Width = 62
+ Height = 13
+ Caption = 'Id Data Type'
+ FocusControl = IdDataTypeComboBox
+ end
+ object Label2: TLabel
+ Left = 259
+ Top = 152
+ Width = 32
+ Height = 13
+ Caption = 'Id Size'
+ FocusControl = IdDataTypeComboBox
+ end
object DataLinkRadioButton: TRadioButton
Left = 16
Top = 16
@@ -97,7 +113,7 @@
object StreamFormatComboBox: TComboBox
Left = 32
Top = 168
- Width = 145
+ Width = 97
Height = 21
Style = csDropDownList
ItemHeight = 13
@@ -112,17 +128,33 @@
Caption = '&Login Prompt'
TabOrder = 6
end
+ object IdDataTypeComboBox: TComboBox
+ Left = 134
+ Top = 168
+ Width = 120
+ Height = 21
+ Style = csDropDownList
+ ItemHeight = 13
+ TabOrder = 8
+ end
+ object IdSizeEdit: TEdit
+ Left = 259
+ Top = 168
+ Width = 42
+ Height = 21
+ TabOrder = 9
+ end
end
object BottomPanel: TPanel
Left = 0
Top = 207
- Width = 362
+ Width = 446
Height = 35
Align = alBottom
BevelOuter = bvNone
TabOrder = 1
object OkButton: TButton
- Left = 204
+ Left = 288
Top = 6
Width = 75
Height = 25
@@ -133,7 +165,7 @@
TabOrder = 0
end
object CancelButton: TButton
- Left = 284
+ Left = 368
Top = 6
Width = 75
Height = 25
Modified: trunk/Source/Brokers/ADO/InstantADOConnectionDefEdit.pas
===================================================================
--- trunk/Source/Brokers/ADO/InstantADOConnectionDefEdit.pas 2006-12-08 09:40:42 UTC (rev 734)
+++ trunk/Source/Brokers/ADO/InstantADOConnectionDefEdit.pas 2006-12-08 09:41:29 UTC (rev 735)
@@ -24,8 +24,8 @@
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
- * Carlo Barazzetta: blob streaming in XML format (Part, Parts, References)
- * Carlo Barazzetta: Currency and LoginPrompt support
+ * Carlo Barazzetta, Nando Dessena
+ *
* ***** END LICENSE BLOCK ***** *)
unit InstantADOConnectionDefEdit;
@@ -52,6 +52,10 @@
StreamFormatLabel: TLabel;
StreamFormatComboBox: TComboBox;
LoginPromptCheckBox: TCheckBox;
+ Label1: TLabel;
+ IdDataTypeComboBox: TComboBox;
+ Label2: TLabel;
+ IdSizeEdit: TEdit;
procedure ConnectionStringButtonClick(Sender: TObject);
procedure DataLinkButtonClick(Sender: TObject);
procedure DataChanged(Sender: TObject);
@@ -67,10 +71,10 @@
implementation
-{$R *.DFM}
+{$R *.dfm}
uses
- ADODB, InstantPersistence, InstantClasses;
+ ADODB, InstantPersistence, InstantClasses, InstantTypes, InstantConsts;
{ TInstantADOConnDefEditForm }
@@ -94,7 +98,10 @@
procedure TInstantADOConnectionDefEditForm.FormCreate(Sender: TObject);
begin
- AssignInstantStreamFormat(StreamFormatComboBox.Items); //CB
+ AssignInstantStreamFormat(StreamFormatComboBox.Items);
+ AssignInstantDataTypeStrings(IdDataTypeComboBox.Items);
+ IdDataTypeComboBox.ItemIndex := Ord(dtString);
+ IdSizeEdit.Text := IntToStr(InstantDefaultFieldSize);
UpdateControls;
end;
@@ -121,9 +128,10 @@
DataLinkRadioButton.Checked := True;
DataLinkEdit.Text := LinkFileName;
end;
- //CB
StreamFormatComboBox.ItemIndex := Ord(BlobStreamFormat);
LoginPromptCheckBox.Checked := LoginPrompt;
+ IdDataTypeComboBox.ItemIndex := Ord(IdDataType);
+ IdSizeEdit.Text := IntToStr(IdSize);
end;
end;
@@ -136,9 +144,10 @@
ConnectionString := 'FILE NAME=' + DataLinkEdit.Text
else
ConnectionString := ConnectionStringEdit.Text;
- //CB
BlobStreamFormat := TInstantStreamFormat(StreamFormatComboBox.ItemIndex);
LoginPrompt := LoginPromptCheckBox.Checked;
+ IdDataType := TInstantDataType(IdDataTypeComboBox.ItemIndex);
+ IdSize := StrToInt(IdSizeEdit.Text);
end;
end;
|