프로젝트

일반

사용자정보

개정판 04133d37

ID04133d37791239a6bd56e46037e6fcb5afbef669
상위 e5f121b9
하위 66fb1230

gaqhf 이(가) 4년 이상 전에 추가함

dev issue #000 : fix sql server

Change-Id: I70cb6c0e539f8b33ad1b031e083ab293a1434468

차이점 보기:

DTI_PID/SPPIDConverter/DB/SPPID_DB.cs
172 172
                            {
173 173
                                cmd.Connection = conn;
174 174

  
175
                                cmd.CommandText = string.Format(CultureInfo.CurrentCulture, @"SELECT SP_SCHEMA_TYPE, USERNAME
175
                                cmd.CommandText = string.Format(CultureInfo.CurrentCulture, @"SELECT SP_SCHEMA_TYPE, USERNAME, DATA_BASE
176 176
                                                FROM {0}.T_DB_DATA DB_DATA 
177 177
                                                INNER JOIN {0}.T_ROOTITEM ROOTITEM ON DB_DATA.SP_ROOTITEMID = ROOTITEM.SP_ID 
178 178
                                                WHERE ROOTITEM.NAME = '{1}'", dbInfo.Site, dbInfo.SelectedPlant);
......
181 181
                                    DataTable dt = new DataTable();
182 182
                                    adapter.SelectCommand = cmd;
183 183
                                    adapter.Fill(dt);
184

  
184
                                    foreach (DataColumn item in dt.Columns)
185
                                        item.ColumnName = item.ColumnName.ToUpper();
186
                                    
185 187
                                    foreach (DataRow row in dt.Rows)
186 188
                                    {
187 189
                                        string sType = row["SP_SCHEMA_TYPE"].ToString();
......
189 191
                                        {
190 192
                                            case "SPPIDDATA_DICTIONARY":
191 193
                                                dbInfo.PlantPIDDic = row["USERNAME"].ToString();
194
                                                dbInfo.PlantPIDDic_DataBase = row["DATA_BASE"].ToString();
192 195
                                                break;
193 196
                                            case "DATA_DICTIONARY":
194 197
                                                dbInfo.PlantDic = row["USERNAME"].ToString();
198
                                                dbInfo.PlantDic_DataBase = row["DATA_BASE"].ToString();
195 199
                                                break;
196 200
                                            case "SPAPLANT":
197 201
                                                dbInfo.Plant = row["USERNAME"].ToString();
202
                                                dbInfo.Plant_DataBase = row["DATA_BASE"].ToString();
198 203
                                                break;
199 204
                                            case "SPPID":
200 205
                                                dbInfo.PlantPID = row["USERNAME"].ToString();
206
                                                dbInfo.PlantPID_DataBase = row["DATA_BASE"].ToString();
201 207
                                                break;
202 208
                                            default:
203 209
                                                break;
......
330 336
                }
331 337
                else if (dbInfo.DBType == "SQLSERVER")
332 338
                {
333
                    string connString = string.Format("server = {0}; uid = {1}; pwd = {2}; database = {3};", dbInfo.Service, dbInfo.DBUser, dbInfo.DBPassword, "ogpplant");
339
                    string connString = string.Format("server = {0}; uid = {1}; pwd = {2}; database = {3};", dbInfo.Service, dbInfo.DBUser, dbInfo.DBPassword, dbInfo.PlantPIDDic_DataBase);
334 340
                    using (SqlConnection conn = new SqlConnection(connString))
335 341
                    {
336 342
                        conn.Open();
......
400 406
                }
401 407
                else if (dbInfo.DBType == "SQLSERVER")
402 408
                {
403
                    string connString = string.Format("server = {0}; uid = {1}; pwd = {2}; database = {3};", dbInfo.Service, dbInfo.DBUser, dbInfo.DBPassword, "ogpplant");
409
                    string connString = string.Format("server = {0}; uid = {1}; pwd = {2}; database = {3};", dbInfo.Service, dbInfo.DBUser, dbInfo.DBPassword, dbInfo.PlantPIDDic_DataBase);
404 410
                    using (SqlConnection conn = new SqlConnection(connString))
405 411
                    {
406 412
                        conn.Open();

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)