001. xfnGetPKs

xfnGetPKs 함수

구문

반환값

참고

예제

코드

'키가 1개일 때

Dim strTableName As String

Dim objPKs As xProperties

Dim obj As xProperty

    

strTableName = "tWorkParticulars"

Set objPKs = xfnGetPKs(strTableName)

If objPKs.Count < 1 Then

    xsbErrMsg "PK가 존재 하지 않습니다."

End If

    

For Each obj In objPKs

    Debug.Print obj.Name & " : " & obj.Value

Next

'---------- 결과값 ----------------

PKName : PK_tWorkParticulars

N00002 : WorkParticularId

'키값이 2개 이상일 때,

Dim strTableName As String

Dim objPKs As xProperties

Dim obj As xProperty

    

strTableName = "xtCodes"

Set objPKs = xfnGetPKs(strTableName)

 

If objPKs.Count < 1 Then

    xsbErrMsg "PK가 존재 하지 않습니다."

End If

    

For Each obj In objPKs

    Debug.Print obj.Name & " : " & obj.Value

Next

'----------- 결과값 ----------

PKName : PK_xtCodes

N00002 : CodeBookID

N00003 : CodeNum