From: <jcm...@us...> - 2006-02-05 14:08:28
|
Revision: 580 Author: jcmoraisjr Date: 2006-02-05 06:07:57 -0800 (Sun, 05 Feb 2006) ViewCVS: http://svn.sourceforge.net/instantobjects?rev=580&view=rev Log Message: ----------- Inserted fields for user name, password, sql role, character set and db library name for UIB broker. (FR # 1424520) Modified Paths: -------------- trunk/Source/Brokers/UIB/InstantUIB.pas trunk/Source/Brokers/UIB/InstantUIBConnectionDefEdit.dfm trunk/Source/Brokers/UIB/InstantUIBConnectionDefEdit.pas Modified: trunk/Source/Brokers/UIB/InstantUIB.pas =================================================================== --- trunk/Source/Brokers/UIB/InstantUIB.pas 2006-02-05 13:12:11 UTC (rev 579) +++ trunk/Source/Brokers/UIB/InstantUIB.pas 2006-02-05 14:07:57 UTC (rev 580) @@ -49,8 +49,10 @@ type TInstantUIBConnectionDef = class(TInstantRelationalConnectionDef) private + FCharacterSet: TCharacterSet; + FConnectionString: string; + FLibraryName: string; FLoginPrompt: Boolean; - FConnectionString: string; FOptions: TInstantUIBOptions; FParams: string; protected @@ -62,7 +64,9 @@ constructor Create(Collection: TCollection); override; function Edit: Boolean; override; published + property CharacterSet: TCharacterSet read FCharacterSet write FCharacterSet default csNONE; property ConnectionString: string read FConnectionString write FConnectionString; + property LibraryName: string read FLibraryName write FLibraryName; property LoginPrompt: Boolean read FLoginPrompt write FLoginPrompt default True; property Options: TInstantUIBOptions read FOptions write FOptions; property Params: string read FParams write FParams; @@ -164,6 +168,8 @@ constructor TInstantUIBConnectionDef.Create(Collection: TCollection); begin inherited; + FCharacterSet := csNONE; + FLibraryName := 'gds32.dll'; FLoginPrompt := True; FOptions := DefaultInstantUIBOptions; end; @@ -173,6 +179,8 @@ begin Result := TJvUIBDataBase.Create(AOwner); try + Result.CharacterSet := CharacterSet; + Result.LibraryName := LibraryName; Result.Params.Text := Params; Result.DatabaseName := ConnectionString; Result.SQLDialect := 3; Modified: trunk/Source/Brokers/UIB/InstantUIBConnectionDefEdit.dfm =================================================================== --- trunk/Source/Brokers/UIB/InstantUIBConnectionDefEdit.dfm 2006-02-05 13:12:11 UTC (rev 579) +++ trunk/Source/Brokers/UIB/InstantUIBConnectionDefEdit.dfm 2006-02-05 14:07:57 UTC (rev 580) @@ -1,9 +1,9 @@ object InstantUIBConnectionDefEditForm: TInstantUIBConnectionDefEditForm - Left = 320 - Top = 199 + Left = 324 + Top = 202 BorderStyle = bsDialog Caption = 'UIB Connection' - ClientHeight = 336 + ClientHeight = 373 ClientWidth = 362 Color = clBtnFace Font.Charset = DEFAULT_CHARSET @@ -18,7 +18,7 @@ TextHeight = 13 object BottomBevel: TBevel Left = 0 - Top = 299 + Top = 336 Width = 362 Height = 2 Align = alBottom @@ -28,60 +28,100 @@ Left = 0 Top = 0 Width = 362 - Height = 299 + Height = 336 Align = alClient BevelOuter = bvNone TabOrder = 0 object ConnectionStringLabel: TLabel Left = 16 - Top = 12 + Top = 16 Width = 84 Height = 13 Caption = '&Connection String' FocusControl = ConnectionStringEdit end - object StreamFormatLabel: TLabel + object UserNameLabel: TLabel Left = 16 - Top = 248 - Width = 53 + Top = 80 + Width = 51 Height = 13 - Caption = 'Blob &format' - FocusControl = StreamFormatComboBox + Caption = 'User &name' + FocusControl = UserNameEdit end + object PasswordLabel: TLabel + Left = 16 + Top = 120 + Width = 46 + Height = 13 + Caption = 'Pass&word' + FocusControl = PasswordEdit + end + object SQLRoleLabel: TLabel + Left = 16 + Top = 160 + Width = 46 + Height = 13 + Caption = 'S&QL Role' + FocusControl = SQLRoleEdit + end + object CharacterSetLabel: TLabel + Left = 16 + Top = 200 + Width = 63 + Height = 13 + Caption = 'C&haracter set' + FocusControl = CharacterSetComboBox + end + object LibraryNameLabel: TLabel + Left = 16 + Top = 240 + Width = 60 + Height = 13 + Caption = 'Li&brary name' + FocusControl = LibraryNameComboBox + end object ParamsLabel: TLabel - Left = 16 - Top = 76 + Left = 136 + Top = 80 Width = 95 Height = 13 Caption = 'Connection &Settings' FocusControl = ParamsEditor end + object StreamFormatLabel: TLabel + Left = 16 + Top = 280 + Width = 53 + Height = 13 + Caption = 'Blob &format' + FocusControl = StreamFormatComboBox + end object Label1: TLabel Left = 136 - Top = 248 + Top = 280 Width = 62 Height = 13 - Caption = 'Id Data Type' + Caption = 'Id &Data Type' FocusControl = IdDataTypeComboBox end object Label2: TLabel Left = 256 - Top = 248 + Top = 280 Width = 32 Height = 13 - Caption = 'Id Size' + Caption = 'Id Si&ze' FocusControl = IdDataTypeComboBox end object ConnectionStringEdit: TEdit Left = 16 - Top = 28 + Top = 32 Width = 305 Height = 21 TabOrder = 0 end object ConnectionStringButton: TButton Left = 321 - Top = 28 + Top = 32 Width = 21 Height = 21 Caption = '...' @@ -90,57 +130,103 @@ end object StreamFormatComboBox: TComboBox Left = 16 - Top = 264 + Top = 296 Width = 113 Height = 21 Style = csDropDownList ItemHeight = 13 Sorted = True - TabOrder = 5 + TabOrder = 10 end object UseDelimitedIdentsCheckBox: TCheckBox Left = 16 - Top = 54 + Top = 56 Width = 150 Height = 17 Caption = '&Use delimited identifiers' TabOrder = 2 end object ParamsEditor: TMemo - Left = 17 + Left = 136 Top = 96 - Width = 328 - Height = 149 - TabOrder = 4 + Width = 209 + Height = 181 + TabOrder = 9 end object IdDataTypeComboBox: TComboBox Left = 136 - Top = 264 + Top = 296 Width = 113 Height = 21 Style = csDropDownList ItemHeight = 13 - TabOrder = 6 + TabOrder = 11 end object IdSizeEdit: TEdit Left = 256 - Top = 264 + Top = 296 Width = 89 Height = 21 - TabOrder = 7 + TabOrder = 12 end object LoginPromptCheckBox: TCheckBox Left = 196 - Top = 54 + Top = 56 Width = 150 Height = 17 Caption = '&Login Prompt' TabOrder = 3 end + object UserNameEdit: TEdit + Left = 16 + Top = 96 + Width = 113 + Height = 21 + TabOrder = 4 + OnChange = UserNameEditChange + end + object PasswordEdit: TEdit + Left = 16 + Top = 136 + Width = 113 + Height = 21 + TabOrder = 5 + OnChange = PasswordEditChange + end + object SQLRoleEdit: TEdit + Left = 16 + Top = 176 + Width = 113 + Height = 21 + TabOrder = 6 + OnChange = SQLRoleEditChange + end + object CharacterSetComboBox: TComboBox + Left = 16 + Top = 216 + Width = 113 + Height = 21 + Style = csDropDownList + ItemHeight = 13 + TabOrder = 7 + OnChange = CharacterSetComboBoxChange + end + object LibraryNameComboBox: TComboBox + Left = 16 + Top = 256 + Width = 113 + Height = 21 + ItemHeight = 13 + TabOrder = 8 + OnChange = SQLRoleEditChange + Items.Strings = ( + 'gds32.dll' + 'fbclient.dll') + end end object BottomPanel: TPanel Left = 0 - Top = 301 + Top = 338 Width = 362 Height = 35 Align = alBottom Modified: trunk/Source/Brokers/UIB/InstantUIBConnectionDefEdit.pas =================================================================== --- trunk/Source/Brokers/UIB/InstantUIBConnectionDefEdit.pas 2006-02-05 13:12:11 UTC (rev 579) +++ trunk/Source/Brokers/UIB/InstantUIBConnectionDefEdit.pas 2006-02-05 14:07:57 UTC (rev 580) @@ -16,12 +16,12 @@ * for the specific language governing rights and limitations under the * License. * - * The Original Code is: Andrea Petrelli + * The Original Code is: InstantObjects UIB Support * * The Initial Developer of the Original Code is: Andrea Petrelli * * Contributor(s): - * Nando Dessena + * Nando Dessena, Joao Morais * * ***** END LICENSE BLOCK ***** *) @@ -59,9 +59,24 @@ IdSizeEdit: TEdit; Label2: TLabel; LoginPromptCheckBox: TCheckBox; + UserNameLabel: TLabel; + PasswordLabel: TLabel; + SQLRoleLabel: TLabel; + CharacterSetLabel: TLabel; + UserNameEdit: TEdit; + PasswordEdit: TEdit; + SQLRoleEdit: TEdit; + CharacterSetComboBox: TComboBox; + LibraryNameLabel: TLabel; + LibraryNameComboBox: TComboBox; procedure ConnectionStringButtonClick(Sender: TObject); procedure FormCreate(Sender: TObject); + procedure UserNameEditChange(Sender: TObject); + procedure PasswordEditChange(Sender: TObject); + procedure SQLRoleEditChange(Sender: TObject); + procedure CharacterSetComboBoxChange(Sender: TObject); private + procedure AssignCharacterSetItems(AItems: TStrings); function GetIsValid: Boolean; procedure UpdateControls; public @@ -75,10 +90,19 @@ {$R *.DFM} uses - InstantPersistence, InstantClasses, InstantConsts; + InstantPersistence, InstantClasses, InstantConsts, jvuiblib; { TInstantUIBConnectionDefEditForm } +procedure TInstantUIBConnectionDefEditForm.AssignCharacterSetItems( + AItems: TStrings); +var + I: TCharacterSet; +begin + for I := low(TCharacterSet) to high(TCharacterSet) do + AItems.Add(CharacterSetStr[I]); +end; + procedure TInstantUIBConnectionDefEditForm.ConnectionStringButtonClick( Sender: TObject); begin @@ -99,6 +123,7 @@ begin AssignInstantStreamFormat(StreamFormatComboBox.Items); AssignInstantDataTypeStrings(IdDataTypeComboBox.Items); + AssignCharacterSetItems(CharacterSetComboBox.Items); IdDataTypeComboBox.ItemIndex := Ord(dtString); IdSizeEdit.Text := IntToStr(InstantDefaultFieldSize); UpdateControls; @@ -119,6 +144,11 @@ UseDelimitedIdentsCheckBox.Checked := UIBUseDelimitedIdents in Options; LoginPromptCheckBox.Checked := LoginPrompt; ParamsEditor.Lines.Text := ConnectionDef.Params; + UserNameEdit.Text := ParamsEditor.Lines.Values['user_name']; + PasswordEdit.Text := ParamsEditor.Lines.Values['password']; + SQLRoleEdit.Text := ParamsEditor.Lines.Values['sql_role_name']; + CharacterSetComboBox.ItemIndex := Ord(CharacterSet); + LibraryNameComboBox.Text := LibraryName; IdDataTypeComboBox.ItemIndex := Ord(IdDataType); IdSizeEdit.Text := IntToStr(IdSize); end; @@ -137,6 +167,8 @@ Options := Options + [UIBUseDelimitedIdents]; LoginPrompt := LoginPromptCheckBox.Checked; ConnectionDef.Params := ParamsEditor.Lines.Text; + CharacterSet := TCharacterSet(CharacterSetComboBox.ItemIndex); + LibraryName := LibraryNameComboBox.Text; IdDataType := TInstantDataType(IdDataTypeComboBox.ItemIndex); IdSize := StrToInt(IdSizeEdit.Text); end; @@ -146,4 +178,28 @@ begin end; +procedure TInstantUIBConnectionDefEditForm.UserNameEditChange( + Sender: TObject); +begin + ParamsEditor.Lines.Values['user_name'] := UserNameEdit.Text; +end; + +procedure TInstantUIBConnectionDefEditForm.PasswordEditChange( + Sender: TObject); +begin + ParamsEditor.Lines.Values['password'] := PasswordEdit.Text; +end; + +procedure TInstantUIBConnectionDefEditForm.SQLRoleEditChange( + Sender: TObject); +begin + ParamsEditor.Lines.Values['sql_role_name'] := SQLRoleEdit.Text; +end; + +procedure TInstantUIBConnectionDefEditForm.CharacterSetComboBoxChange( + Sender: TObject); +begin + ParamsEditor.Lines.Values['lc_ctype'] := CharacterSetComboBox.Text; +end; + end. |
From: <mot...@us...> - 2006-08-18 06:20:46
|
Revision: 705 Author: mottadelli Date: 2006-08-17 23:20:38 -0700 (Thu, 17 Aug 2006) ViewCVS: http://svn.sourceforge.net/instantobjects?rev=705&view=rev Log Message: ----------- Add uses missing after refactoring Modified Paths: -------------- trunk/Source/Brokers/UIB/InstantUIB.pas trunk/Source/Brokers/UIB/InstantUIBConnectionDefEdit.pas Modified: trunk/Source/Brokers/UIB/InstantUIB.pas =================================================================== --- trunk/Source/Brokers/UIB/InstantUIB.pas 2006-08-17 10:20:58 UTC (rev 704) +++ trunk/Source/Brokers/UIB/InstantUIB.pas 2006-08-18 06:20:38 UTC (rev 705) @@ -37,7 +37,8 @@ uses Classes, Db, jvuib, jvuibdataset, jvuiblib, SysUtils, - InstantPersistence, InstantClasses, InstantCommand; + InstantPersistence, InstantBrokers, InstantClasses, + InstantCommand, InstantMetadata, InstantTypes; type TInstantUIBOption = (uibUseDelimitedIdents); Modified: trunk/Source/Brokers/UIB/InstantUIBConnectionDefEdit.pas =================================================================== --- trunk/Source/Brokers/UIB/InstantUIBConnectionDefEdit.pas 2006-08-17 10:20:58 UTC (rev 704) +++ trunk/Source/Brokers/UIB/InstantUIBConnectionDefEdit.pas 2006-08-18 06:20:38 UTC (rev 705) @@ -37,7 +37,7 @@ uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - StdCtrls, ExtCtrls, InstantUIB; + StdCtrls, ExtCtrls, InstantUIB, InstantTypes; type TInstantUIBConnectionDefEditForm = class(TForm) |