mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 18:49:16 +02:00
* Better explanation of connection
git-svn-id: trunk@43585 -
This commit is contained in:
parent
bcee247240
commit
6a36bec296
@ -106,6 +106,7 @@ begin
|
|||||||
// Create with empty connection config.
|
// Create with empty connection config.
|
||||||
C:=FDisp.Connections.AddConnection('','','','','');
|
C:=FDisp.Connections.AddConnection('','','','','');
|
||||||
C.name:='connection';
|
C.name:='connection';
|
||||||
|
// Read connection settings if available
|
||||||
FN:=GetOptionValue('c', 'config');
|
FN:=GetOptionValue('c', 'config');
|
||||||
if FN='' then
|
if FN='' then
|
||||||
FN:='connection.ini';
|
FN:='connection.ini';
|
||||||
@ -113,12 +114,12 @@ begin
|
|||||||
C.LoadFromIniFile(FN,'database',[])
|
C.LoadFromIniFile(FN,'database',[])
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
// Try Default
|
// Or set in code.
|
||||||
C.ConnectionType:=TPQConnectionDef.TypeName;
|
C.ConnectionType:=TPQConnectionDef.TypeName;
|
||||||
C.DatabaseName:='fpctest';
|
C.DatabaseName:='fpctest';
|
||||||
C.HostName:='localhost';
|
C.HostName:='localhost';
|
||||||
C.UserName:='fpc';
|
C.UserName:='user';
|
||||||
C.Password:='Shimrod';
|
C.Password:='secret';
|
||||||
end;
|
end;
|
||||||
Result:=C;
|
Result:=C;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user