[PB] replace function

  long ll_startPosition, ll_findLength, ll_repLength

    string ls_result, ls_temp ,originalString,findString,replacementString

   originalString = ls_vend_str

   findString = ","

   replacementString ="','"

    ll_findLength = len(findString)

    ll_repLength = len(replacementString)

    ls_result = originalString


    ll_startPosition = Pos(originalString, findString)

    ls_temp = originalString

    DO WHILE Pos(ls_temp,findString) > 0

        ls_temp = Mid(ls_result, ll_startPosition + ll_findLength)

        ls_result = Left(ls_result, ll_startPosition - 1) + replacementString + ls_temp

        //ll_startPosition = Pos(ls_result, findString)+ll_startPosition

ll_startPosition = len(Left(ls_result, ll_startPosition - 1) + replacementString)+Pos(ls_temp,findString)

    LOOP

ls_vend_str = "'"+ls_result+"'"

[DataSet Bug]無法啟用條件約束。一或多個資料列的值違反非 Null、唯一或外部索引鍵條件約束

在使用TableAdapter作Query時發生 1. 原因為有些資料欄位Query出來後為null值 但是該欄位在dbDataSet的屬性AllowDBNull為False 因此把該欄位(或乾脆把全部欄位屬性AllowDBNull改為True 2. maxLength 檢...