mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-17 12:39:25 +02:00
+ moved empty databasename check to TSQLConnection
git-svn-id: trunk@1860 -
This commit is contained in:
parent
4f4207fee5
commit
22ff909af8
@ -243,8 +243,6 @@ begin
|
||||
DPB := DPB + chr(isc_dpb_sql_role_name) + chr(Length(Role)) + Role;
|
||||
if Length(CharSet) > 0 then
|
||||
DPB := DPB + Chr(isc_dpb_lc_ctype) + Chr(Length(CharSet)) + CharSet;
|
||||
if (DatabaseName = '') then
|
||||
DatabaseError(SErrNoDatabaseName,self);
|
||||
|
||||
FSQLDatabaseHandle := nil;
|
||||
if isc_attach_database(@FStatus, Length(DatabaseName), @DatabaseName[1], @FSQLDatabaseHandle,
|
||||
|
@ -269,9 +269,6 @@ begin
|
||||
|
||||
inherited dointernalconnect;
|
||||
|
||||
if (DatabaseName = '') then
|
||||
DatabaseError(SErrNoDatabaseName,self);
|
||||
|
||||
FConnectString := '';
|
||||
if (UserName <> '') then FConnectString := FConnectString + ' user=''' + UserName + '''';
|
||||
if (Password <> '') then FConnectString := FConnectString + ' password=''' + Password + '''';
|
||||
|
@ -297,7 +297,8 @@ end;
|
||||
|
||||
procedure TSQLConnection.DoInternalConnect;
|
||||
begin
|
||||
// Empty abstract
|
||||
if (DatabaseName = '') then
|
||||
DatabaseError(SErrNoDatabaseName,self);
|
||||
end;
|
||||
|
||||
procedure TSQLConnection.DoInternalDisconnect;
|
||||
|
Loading…
Reference in New Issue
Block a user