개정판 a03cde1e
dev issue #1227 : create opc table
Change-Id: I0d5b5770f33f55f6e1c285adf4d24ba43efc8ba6
DTI_PID/APIDConverter/DB/Project_DB.cs | ||
---|---|---|
17 | 17 |
public class Project_DB |
18 | 18 |
{ |
19 | 19 |
const string APID_SYMBOL_MAPPING_TABLE = "T_APID_SYMBOL_MAPPING"; |
20 |
const string APID_OPC_MAPPING_TABLE = "T_APID_OPC_MAPPING"; |
|
20 | 21 |
|
21 | 22 |
const string LineProperties_TABLE = "LineProperties"; |
22 | 23 |
const string LineTypes_TABLE = "LineTypes"; |
... | ... | |
78 | 79 |
cmd.CommandText = string.Format("CREATE TABLE {0} (UID TEXT PRIMARY KEY, NAME TEXT, APID_SYMBOL TEXT, DATA1 TEXT)", APID_SYMBOL_MAPPING_TABLE); |
79 | 80 |
cmd.ExecuteNonQuery(); |
80 | 81 |
} |
82 |
if (dt.Select(string.Format("NAME = '{0}'", APID_OPC_MAPPING_TABLE)).Length == 0) |
|
83 |
{ |
|
84 |
cmd.CommandText = string.Format("CREATE TABLE {0} (UID TEXT PRIMARY KEY, IN_SYMBOL TEXT, OUT_SYMBOL TEXT, Type INT)", APID_OPC_MAPPING_TABLE); |
|
85 |
cmd.ExecuteNonQuery(); |
|
86 |
} |
|
81 | 87 |
} |
82 | 88 |
} |
83 | 89 |
result = true; |
... | ... | |
115 | 121 |
cmd.CommandText = string.Format("CREATE TABLE {0} (UID varchar(255) PRIMARY KEY, NAME varchar(MAX), APID_SYMBOL varchar(MAX), DATA1 varchar(255))", APID_SYMBOL_MAPPING_TABLE); |
116 | 122 |
cmd.ExecuteNonQuery(); |
117 | 123 |
} |
118 |
|
|
124 |
if (dt.Select(string.Format("NAME = '{0}'", APID_OPC_MAPPING_TABLE)).Length == 0) |
|
125 |
{ |
|
126 |
cmd.CommandText = string.Format("CREATE TABLE {0} (UID varchar(255) PRIMARY KEY, IN_SYMBOL varchar(MAX), OUT_SYMBOL varchar(MAX), Type INT)", APID_OPC_MAPPING_TABLE); |
|
127 |
cmd.ExecuteNonQuery(); |
|
128 |
} |
|
119 | 129 |
} |
120 | 130 |
} |
121 | 131 |
result = true; |
내보내기 Unified diff