mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 16:59:20 +02:00
* Possibility to add charset in SQL connection dialog
git-svn-id: trunk@20755 -
This commit is contained in:
parent
2bfcf73b02
commit
51437d9019
@ -1,15 +1,15 @@
|
|||||||
object SQLConnectionForm: TSQLConnectionForm
|
object SQLConnectionForm: TSQLConnectionForm
|
||||||
Left = 549
|
Left = 549
|
||||||
Height = 177
|
Height = 215
|
||||||
Top = 454
|
Top = 454
|
||||||
Width = 314
|
Width = 345
|
||||||
ActiveControl = EHostName
|
ActiveControl = EHostName
|
||||||
BorderIcons = [biSystemMenu]
|
BorderIcons = [biSystemMenu]
|
||||||
BorderStyle = bsDialog
|
BorderStyle = bsDialog
|
||||||
Caption = 'Connect to a database'
|
Caption = 'Connect to a database'
|
||||||
ClientHeight = 177
|
ClientHeight = 215
|
||||||
ClientWidth = 314
|
ClientWidth = 345
|
||||||
LCLVersion = '0.9.25'
|
LCLVersion = '0.9.27'
|
||||||
object LEHostName: TLabel
|
object LEHostName: TLabel
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 23
|
Height = 23
|
||||||
@ -58,35 +58,47 @@ object SQLConnectionForm: TSQLConnectionForm
|
|||||||
Layout = tlCenter
|
Layout = tlCenter
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
|
object LCharset: TLabel
|
||||||
|
Left = 36
|
||||||
|
Height = 21
|
||||||
|
Top = 143
|
||||||
|
Width = 46
|
||||||
|
Alignment = taRightJustify
|
||||||
|
AutoSize = False
|
||||||
|
Caption = '&Charset'
|
||||||
|
FocusControl = ECharset
|
||||||
|
Layout = tlCenter
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
object EHostName: TEdit
|
object EHostName: TEdit
|
||||||
Left = 89
|
Left = 89
|
||||||
Height = 23
|
Height = 24
|
||||||
Top = 15
|
Top = 15
|
||||||
Width = 216
|
Width = 247
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object EDatabaseName: TEdit
|
object EDatabaseName: TEdit
|
||||||
Left = 89
|
Left = 89
|
||||||
Height = 23
|
Height = 24
|
||||||
Top = 43
|
Top = 43
|
||||||
Width = 216
|
Width = 247
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
object EUserName: TEdit
|
object EUserName: TEdit
|
||||||
Left = 89
|
Left = 89
|
||||||
Height = 23
|
Height = 24
|
||||||
Top = 74
|
Top = 74
|
||||||
Width = 216
|
Width = 247
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
object EPassword: TEdit
|
object EPassword: TEdit
|
||||||
Left = 89
|
Left = 89
|
||||||
Height = 23
|
Height = 24
|
||||||
Top = 105
|
Top = 105
|
||||||
Width = 216
|
Width = 247
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
EchoMode = emPassword
|
EchoMode = emPassword
|
||||||
PasswordChar = '*'
|
PasswordChar = '*'
|
||||||
@ -94,12 +106,17 @@ object SQLConnectionForm: TSQLConnectionForm
|
|||||||
end
|
end
|
||||||
object BPButtons: TButtonPanel
|
object BPButtons: TButtonPanel
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 42
|
Height = 38
|
||||||
Top = 135
|
Top = 171
|
||||||
Width = 302
|
Width = 333
|
||||||
Align = alBottom
|
|
||||||
AutoSize = True
|
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
ShowButtons = [pbOK, pbCancel]
|
ShowButtons = [pbOK, pbCancel]
|
||||||
end
|
end
|
||||||
|
object ECharset: TEdit
|
||||||
|
Left = 92
|
||||||
|
Height = 24
|
||||||
|
Top = 140
|
||||||
|
Width = 84
|
||||||
|
TabOrder = 5
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -34,10 +34,12 @@ type
|
|||||||
|
|
||||||
TSQLConnectionForm = class(TForm)
|
TSQLConnectionForm = class(TForm)
|
||||||
BPButtons: TButtonPanel;
|
BPButtons: TButtonPanel;
|
||||||
|
ECharset: TEdit;
|
||||||
EHostName: TEdit;
|
EHostName: TEdit;
|
||||||
EDatabaseName: TEdit;
|
EDatabaseName: TEdit;
|
||||||
EUserName: TEdit;
|
EUserName: TEdit;
|
||||||
EPassword: TEdit;
|
EPassword: TEdit;
|
||||||
|
LCharset: TLabel;
|
||||||
LEUserName: TLabel;
|
LEUserName: TLabel;
|
||||||
LEPassword: TLabel;
|
LEPassword: TLabel;
|
||||||
LEHostName: TLabel;
|
LEHostName: TLabel;
|
||||||
@ -55,6 +57,7 @@ type
|
|||||||
Property DatabaseName : String Index 1 Read GetString Write SetString;
|
Property DatabaseName : String Index 1 Read GetString Write SetString;
|
||||||
Property UserName : String Index 2 Read GetString Write SetString;
|
Property UserName : String Index 2 Read GetString Write SetString;
|
||||||
Property Password : String Index 3 Read GetString Write SetString;
|
Property Password : String Index 3 Read GetString Write SetString;
|
||||||
|
Property Charset : String Index 4 Read GetString Write SetString;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -86,6 +89,7 @@ begin
|
|||||||
DatabaseName:=L.Values[KeyDatabaseName];
|
DatabaseName:=L.Values[KeyDatabaseName];
|
||||||
UserName:=L.Values[KeyUserName];
|
UserName:=L.Values[KeyUserName];
|
||||||
Password:=XorDecode(KeyEncode,L.Values[KeyPassword]);
|
Password:=XorDecode(KeyEncode,L.Values[KeyPassword]);
|
||||||
|
Charset:=L.Values[KeyCharset];
|
||||||
end;
|
end;
|
||||||
if (ShowModal=mrOK) then
|
if (ShowModal=mrOK) then
|
||||||
begin
|
begin
|
||||||
@ -95,6 +99,7 @@ begin
|
|||||||
L.Values[KeyDatabaseName]:=DatabaseName;
|
L.Values[KeyDatabaseName]:=DatabaseName;
|
||||||
L.Values[KeyUserName]:=UserName;
|
L.Values[KeyUserName]:=UserName;
|
||||||
L.Values[KeyPassword]:=XorEncode(KeyEncode,Password);
|
L.Values[KeyPassword]:=XorEncode(KeyEncode,Password);
|
||||||
|
L.Values[KeyCharset]:=Charset;
|
||||||
Result:=L.CommaText;
|
Result:=L.CommaText;
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
@ -117,6 +122,7 @@ begin
|
|||||||
1 : Result:=EDatabaseName.Text;
|
1 : Result:=EDatabaseName.Text;
|
||||||
2 : Result:=EUserName.Text;
|
2 : Result:=EUserName.Text;
|
||||||
3 : Result:=EPassword.Text;
|
3 : Result:=EPassword.Text;
|
||||||
|
4 : Result:=ECharSet.Text;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -132,6 +138,7 @@ begin
|
|||||||
1 : EDatabaseName.Text:=AValue;
|
1 : EDatabaseName.Text:=AValue;
|
||||||
2 : EUserName.Text:=AValue;
|
2 : EUserName.Text:=AValue;
|
||||||
3 : EPassword.Text:=AValue;
|
3 : EPassword.Text:=AValue;
|
||||||
|
4 : ECharset.Text:=Avalue;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user