003. xfnTransExecColl

xfnTransExecColl 함수

구문

반환값

참고

예제

코드

'Connection 객체 없이 트랜잭션이 필요한 여러 SQL 실행

Dim strSQL As String

Dim strSQLs As xProperties

Dim conn As ADODB.Connection

Set strSQLs = xbasCalls.xfnNew_xProperties

strSQL = "SELECT * FROM xtCodes"

strSQLs.AddWithoutName strSQL

strSQL = "SELECT * FROM tWorkParticulars"

strSQLs.AddWithoutName strSQL

If Not xfnTransExecColl(strSQLs) Then

    xsbErrMsg "데이터 처리에 실패했습니다."

End If

'Connection 객체 포함하여 실행

Dim strSQL As String

Dim strSQLs As xProperties

Dim conn As ADODB.Connection

Set strSQLs = xbasCalls.xfnNew_xProperties

Set conn = CurrentProject.Connection

strSQL = "SELECT * FROM xtCodes"

strSQLs.AddWithoutName strSQL

strSQL = "SELECT * FROM tWorkParticulars"

strSQLs.AddWithoutName strSQL

If Not xfnTransExecColl(strSQLs, conn) Then

    xsbErrMsg "데이터 처리에 실패했습니다."

End If