|
分類:[VB.NET]
それはSELECT文を何個も書けということですか?
何個も書いても何故か一番始めのSQL文しか反映されず、うまくいきません。
Private Sub btn_ok_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_ok.Click Dim Fom3 As New Form_choice01 Dim dSet As DataSet = New DataSet("t_商品") Dim dTbl As DataTable Dim dAdp As SqlClient.SqlDataAdapter Dim scn As SqlClient.SqlConnection = _ New SqlClient.SqlConnection("Persist Security Info=False" _ & ";Integrated Security=SSPI;Database=pachinko") dAdp = New SqlClient.SqlDataAdapter("SELECT name FROM goods_master WHERE code = 001", scn) dAdp.Fill(dSet, "t_商品") Fom3.btn_name_01.DataBindings.Add("Text", dSet.Tables("t_商品"), "name")
dAdp = New SqlClient.SqlDataAdapter("SELECT name FROM goods_master WHERE code = 002", scn) dAdp.Fill(dSet, "t_商品") Fom3.btn_name_02.DataBindings.Add("Text", dSet.Tables("t_商品"), "name")
|