You've already forked lazarus-ccr
tvplanit: Alternative code to r8279.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8280 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -405,14 +405,6 @@ var
|
||||
autocommit: Boolean;
|
||||
fieldnames: TStrings;
|
||||
begin
|
||||
if not ContactsTable.Active then
|
||||
begin
|
||||
ContactsTable.Open;
|
||||
// If field "Department" exists then it is a v1.05 table, and there's nothing to do.
|
||||
if ContactsTable.Fields.FindField('Department') <> nil then
|
||||
exit;
|
||||
end;
|
||||
|
||||
autocommit := FConnection.AutoCommit;
|
||||
ContactsTable.Close;
|
||||
list := TStringList.Create;
|
||||
@ -635,8 +627,13 @@ begin
|
||||
FConnection.Connected := AValue;
|
||||
|
||||
if FConnection.Connected and TablesExist then begin
|
||||
FContactsTable.Open;
|
||||
// If field "Department" does not exist then it is an old table and must be reworked.
|
||||
if ContactsTable.Fields.FindField('Department') = nil then
|
||||
begin
|
||||
FixContactsTable;
|
||||
FContactsTable.Open;
|
||||
end;
|
||||
FEventsTable.Open;
|
||||
FResourceTable.Open;
|
||||
FTasksTable.Open;
|
||||
|
Reference in New Issue
Block a user