GUI sin

//********************************************************************************
//기본 연결
//open()

database_test = CREATE transaction

database_test.DBMS = "MSS Microsoft SQL Server"
database_test.Database = "sample_database"
database_test.LogPass = "abcd1234"
database_test.ServerName = "192.168.1.100"
database_test.LogId = "sa"
database_test.AutoCommit = False
database_test.DBParm = ""

CONNECT USING database_test;

//Connection Check
IF database_test.SQLCode <> 0 THEN
   MessageBox( "database_test 연결 실패!", &
   "database_test 를 연결할 수 없습니다. ~r" + database_test.SQLErrText)
   RETURN
END IF



//********************************************************************************
//insert_after()
//sequence 번호 부여

SELECT ISNULL(MAX(SEQ), 0) + 1 INTO :nSEQ
FROM [TableName]
using database_test;



//********************************************************************************
//update()
//update check 및 rollback

IF This.update() = 1 THEN
   COMMIT USING database_test;
ELSE  
   ROLLBACK USING database_test;
END IF

RETURN TRUE



//********************************************************************************
//Declare Instance Varibles
//인스턴스 변수 선언

Transaction database_test

Comment +0