質問編集履歴
1
ソース修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -12,23 +12,97 @@
|
|
12
12
|
|
13
13
|
```VB
|
14
14
|
|
15
|
-
|
15
|
+
''' <summary>
|
16
16
|
|
17
|
-
|
17
|
+
''' ライン名に値を設定する
|
18
18
|
|
19
|
-
'
|
19
|
+
''' </summary>
|
20
20
|
|
21
|
-
re
|
21
|
+
''' <param name="cmbDCSIdentifyName">値を設定するコンボボックスコントロール</param>
|
22
22
|
|
23
|
-
|
23
|
+
Private Sub setComboBox(ByVal cmbDCSIdentifyName As ComboBox)
|
24
24
|
|
25
|
-
|
25
|
+
Dim readData As Table = New Table()
|
26
26
|
|
27
|
-
|
27
|
+
Dim task As SelectLineTask = New SelectLineTask(-1)
|
28
28
|
|
29
|
-
i
|
29
|
+
Dim Table As Table = WrappingStatus()
|
30
30
|
|
31
|
+
Dim connector As MySQLConnector
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
Try
|
36
|
+
|
37
|
+
connector = New MySQLConnector("localhost", 3306, "xxxx", "xxxx", "INTEGRATED_INSPECTION")
|
38
|
+
|
39
|
+
Using con As New MySqlConnection(connector.CreateConnection())
|
40
|
+
|
41
|
+
con.Open()
|
42
|
+
|
43
|
+
con.BeginTransaction()
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
' SQL文構築
|
48
|
+
|
49
|
+
Dim selectSQL As String = OpenSelectSQL()
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
' SQLに変数をセット
|
54
|
+
|
55
|
+
Using cmd As MySqlCommand = New MySqlCommand(selectSQL, con)
|
56
|
+
|
57
|
+
task.PrepareParameter(cmd)
|
58
|
+
|
59
|
+
task.SetParameter(cmd, Table.rows.Item(0))
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
' 実行
|
64
|
+
|
65
|
+
Dim adapter As New MySqlDataAdapter(cmd)
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
Dim ds As DataSet = New DataSet
|
70
|
+
|
71
|
+
adapter.Fill(ds)
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
' 取得したデータの格納
|
78
|
+
|
79
|
+
readData.InsertAll(ds)
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
Dim i As Integer = 0
|
84
|
+
|
85
|
+
While (readData.rows.Count <= i)
|
86
|
+
|
87
|
+
cmbDCSIdentifyName.Items.Add(readData)
|
88
|
+
|
89
|
+
i += 1
|
90
|
+
|
31
|
-
End While
|
91
|
+
End While
|
92
|
+
|
93
|
+
End Using
|
94
|
+
|
95
|
+
End Using
|
96
|
+
|
97
|
+
Catch ex As MySqlException
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
Catch ex As IndexOutOfRangeException
|
102
|
+
|
103
|
+
End Try
|
104
|
+
|
105
|
+
End Sub
|
32
106
|
|
33
107
|
```
|
34
108
|
|