diff options
author | emkael <emkael@tlen.pl> | 2017-08-22 14:35:03 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2017-08-22 14:35:42 +0200 |
commit | 0d2b00ca675fdb80a944a4ba403d078d728fa087 (patch) | |
tree | 809aac598f3a63badd01d0c2b5ccc3c3f4a594d6 /Aktywator/Setting.cs | |
parent | c3be44ed94e61c3c4bb6a69f0db891580ee7a037 (diff) |
Convert BWS and add all required fields silently
Fixes #15
Diffstat (limited to 'Aktywator/Setting.cs')
-rw-r--r-- | Aktywator/Setting.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Aktywator/Setting.cs b/Aktywator/Setting.cs index d31a452..e981328 100644 --- a/Aktywator/Setting.cs +++ b/Aktywator/Setting.cs @@ -135,5 +135,26 @@ namespace Aktywator } return str.ToString(); } + + public void createField(Sql sql, bool setDefault = true) + { + try + { + sql.query(this.getAddColumnSql()); + } + catch (OleDbException) + { + } + if (setDefault) + { + try + { + sql.query(this.getSetDefaultSql()); + } + catch (OleDbException) + { + } + } + } } } |