Skip to Content
0

Matrix - invalid column number

May 20, 2017 at 06:26 AM

61

avatar image
strQryString = "Select U_DISPORD,Code U_QSTID, U_QUESTION, U_ANSMOD,U_ANSWER,CASE WHEN U_ANSMOD = 'COMBOBOX' THEN 'SELECT' Else U_ANSWER End As U_ANSID from B1_StageDB.dbo.[@JCB_SRV_CRMQ] Where U_TRNSTYP = '" & sTrnsType & "' And U_LOCKED = 'N' Order by U_DISPORD "
            End If
            oRecordset.DoQuery(strQryString)
            If oRecordset.RecordCount > 0 Then
                oRecordset.MoveFirst()
                Dim iRow As Integer = 0
                While Not (oRecordset.EoF)
                    ' Dim strCol As String = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzpqrstuvwxyz" + Cnt.ToString()
                    Dim strCol As String = oRecordset.Fields.Item("U_QUESTION").Value.ToString().Trim()
                    Dim strAns As String = oRecordset.Fields.Item("U_ANSWER").Value
                    Dim strArr() As String
                    'If strCol.Length > 40 Then
                    '    strCol = strCol.Substring(0, 39) + "]"
                    'End If
                    oGridQuest = oForm.Items.Item("GD2").Specific
                    oHashTable.Add(iHashKey, oRecordset.Fields.Item("U_QSTID").Value)
                    oGridQuest.DataTable.Columns.Add(strCol.ToString(), SAPbouiCOM.BoFieldsType.ft_AlphaNumeric, 200)
                    If oRecordset.Fields.Item("U_ANSMOD").Value = "COMBOBOX" Then
                        ''oGridQuest.Columns.Item(strCol).Width = 100
                        oGridQuest.Columns.Item(strCol).Type = SAPbouiCOM.BoGridColumnType.gct_ComboBox
                        strArr = strAns.Split("|")
                        Try
                            If strArr.Count > 0 Then
                                For iCount As Integer = 0 To strArr.Count - 1
                                    oGridQuest.Columns.Item(strCol).ValidValues.Add(strArr(iCount), strArr(iCount))
                                Next
                            End If
                        Catch
                        End Try
                    Else
                        oGridQuest.Columns.Item(4).Type = SAPbouiCOM.BoGridColumnType.gct_EditText
                       
error through- Matrix -Invalid column Number but i am use grid in this programm.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers