'----- C1FlexGrid 表示 ----- Me.C1FlexGrid.Clear() Call GetDate(mDbcomnd.CrtDBobj, _ DsTG100.C1FlexGrid, Me.cmbkojyoCD.Key2) '----- データ 取得 ----- Public Shared Sub GetDate(ByRef i_dbobj As IDBobj, _ ByRef i_dt As DataTable, ByVal kojyoCD As String) Dim strSql As New System.Text.StringBuilder Dim da As SqlDataAdapter i_dt.Clear() 'SQL(取得したい文) strSql.AppendLine("SELECT ") strSql.AppendLine(" MainCD , TOKME , YAKCD_01 ,_ YAKCD_02 ,YAKCD_03 ,YAKCD_04 ,YAKCD_05 ") strSql.AppendLine(" FROM TGMR ") strSql.AppendLine(" WHERE kojyoCD = @kojyoCD") strSql.AppendLine(" ORDER BY MainCD ") i_dbobj.Command.CommandText = strSql.ToString i_dbobj.Params.Clear() i_dbobj.Params.Add(New SqlClient.SqlParameter_ ("@kojyoCD", kojyoCD)) da = New SqlDataAdapter_ (CType(i_dbobj.Command, SqlCommand)) da.Fill(i_dt) End Sub