Database interface objects  close()

Chapter 5: General Objects and Methods

begin()

Description

Begins a unit of work. An explicit way for users to control units of work; however, the users are responsible for committing or rolling back their own work.

Syntax

begin();

Return value

Always returns 1.

Usage

Pointer to object

Object

pdbi->begin();

inline Str = “insert into dltable(ID, LNAME) values(6, ‘Scotty’)”; my_dbi.begin(); my_dbi.setStmt(“inline_stmt”); my_dbi.exec(); my_dbi.commit(); my_dbi.deinitialize();

or

inlineStr = “insert into dltable(ID, LNAME) values(5, ‘Sha’)”; my_dbi.begin(); my_dbi.setStmt(“inline_stmt”); my_dbi.exec(); my_dbi.rollback();





Copyright © 2005. Sybase Inc. All rights reserved. close()

View this book as PDF