+ moved empty databasename check to TSQLConnection

git-svn-id: trunk@1860 -
This commit is contained in:
joost 2005-12-01 21:25:56 +00:00
parent 4f4207fee5
commit 22ff909af8
3 changed files with 2 additions and 6 deletions

View File

@ -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,

View File

@ -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 + '''';

View File

@ -297,7 +297,8 @@ end;
procedure TSQLConnection.DoInternalConnect;
begin
// Empty abstract
if (DatabaseName = '') then
DatabaseError(SErrNoDatabaseName,self);
end;
procedure TSQLConnection.DoInternalDisconnect;