summaryrefslogtreecommitdiff
path: root/Aktywator/Setting.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Aktywator/Setting.cs')
-rw-r--r--Aktywator/Setting.cs21
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)
+ {
+ }
+ }
+ }
}
}