Postgre 데이터 불러오는 중 오류 발생 #6

Closed
opened 2025-06-17 11:51:20 +09:00 by kje97 · 0 comments
Owner
Private Function stateCodeRun_API() As Boolean
    Try
        Const colCount As Int16 = 4

        DBCmd = "select it.code,it.name,io.expected_out_count,io.id from order_details od join items it on it.id = od.item_id join order_sheets os on os.id = od.order_sheet_id join item_outflows io on io.order_detail_id = od.id where os.code = '" & playCode & "' and od.deleted_at is null and io.state = 'registered';"
        If pgDBQueryReader(DBCmd) Then
            Dim RowCount As Int16 = (pgDataQuery.Length / colCount) - 1
            Dim dataSetCount As Int32 = 0
            ReDim prodArray(itemCode.id, RowCount)

            For row = 0 To RowCount
                For col = 0 To colCount - 1
                    Select Case col
                        Case directData.code
                            prodArray(itemCode.code, row) = pgDataQuery(dataSetCount)
                        Case directData.name
                            prodArray(itemCode.name, row) = pgDataQuery(dataSetCount)
                        Case directData.count
                            prodArray(itemCode.count, row) = pgDataQuery(dataSetCount)
                        Case directData.id
                            prodArray(itemCode.id, row) = pgDataQuery(dataSetCount)
                        Case Else
                            MsgBox("잘못된 경로 개입입니다. useAPIDirect !", vbCritical)
                            Return False
                    End Select

                    dataSetCount += 1
                Next

                prodArray(itemCode.chkCount, row) = 0
                prodArray(itemCode.serialNum, row) = Nothing

                nowFullCount += prodArray(itemCode.count, row)

            Next

            Return True
        Else
            errorOut("데이터오류")
            errorGen("데이터가 존재하지 않습니다. 데이터를 확인하여 주십시오.")
            Return False
        End If
    Catch ex As Exception
        errorOut("데이터오류")
        errorGen("Postgre 데이터 불러오는 중 오류 발생 !! : " & ex.Message)
        Return False
    End Try

End Function
``` Private Function stateCodeRun_API() As Boolean Try Const colCount As Int16 = 4 DBCmd = "select it.code,it.name,io.expected_out_count,io.id from order_details od join items it on it.id = od.item_id join order_sheets os on os.id = od.order_sheet_id join item_outflows io on io.order_detail_id = od.id where os.code = '" & playCode & "' and od.deleted_at is null and io.state = 'registered';" If pgDBQueryReader(DBCmd) Then Dim RowCount As Int16 = (pgDataQuery.Length / colCount) - 1 Dim dataSetCount As Int32 = 0 ReDim prodArray(itemCode.id, RowCount) For row = 0 To RowCount For col = 0 To colCount - 1 Select Case col Case directData.code prodArray(itemCode.code, row) = pgDataQuery(dataSetCount) Case directData.name prodArray(itemCode.name, row) = pgDataQuery(dataSetCount) Case directData.count prodArray(itemCode.count, row) = pgDataQuery(dataSetCount) Case directData.id prodArray(itemCode.id, row) = pgDataQuery(dataSetCount) Case Else MsgBox("잘못된 경로 개입입니다. useAPIDirect !", vbCritical) Return False End Select dataSetCount += 1 Next prodArray(itemCode.chkCount, row) = 0 prodArray(itemCode.serialNum, row) = Nothing nowFullCount += prodArray(itemCode.count, row) Next Return True Else errorOut("데이터오류") errorGen("데이터가 존재하지 않습니다. 데이터를 확인하여 주십시오.") Return False End If Catch ex As Exception errorOut("데이터오류") errorGen("Postgre 데이터 불러오는 중 오류 발생 !! : " & ex.Message) Return False End Try End Function ```
kje97 closed this issue 2025-06-19 10:35:14 +09:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jionmt-sw/shpmt-OrderPackingProcessor#6
No description provided.