.TH GDI_SAVEPOINT 3 "8/19/93 (v16.3)"
.ig
% ptroff -man gdi_savepoint.3
SccsID=@(#)gdi_savepoint.3	16.3 8/19/93
..
.SH NAME
.PP
gdi_savepoint \- set a savepoint
.SH SYNOPSIS
.PP
.nf
.ta 8 16
.B include "libgdi.h"
.sp
.B int
.B gdi_savepoint (conn, channo, sname)
\fBdbConn	*conn;\fP	/* (i) database connection */
\fBint	channo;\fP	/* (i) channel number */
\fBchar	*sname;\fP	/* (i) savepoint name */
.fi
.SH DESCRIPTION
.PP
A database transaction is a statement, or statements, treated as an atomic
unit.  gdi_savepoint() identifies a point in a transaction to which a
process can later rollback with the \fIrollback to savepoint
savepoint_name\fP statement.
.PP
To rollback to a named savepoint, the process must build a text string
containing the entire SQL statement,
then execute the statement with a call to gdi_submit().
.PP
A call to gdi_rollback() or gdi_commit() negates all savepoints.
.PP
Note that SYBASE transaction management is different from INGRES and ORACLE.
.SH ARGUMENTS
.PP
.TP 12
.B conn
The database connector
.TP 12
.B channo
Setting a savepoint involves a SQL command that must be executed on a
channel.  For SYBASE, it sets a savepoint only for activity on that channel
since transactions are handled at the DBPROCESS level, not the database
connection level.  For INGRES and ORACLE it sets a savepoint at the dbConn
level because transactions are at the database connection level.
.SH DIAGNOSTICS
.PP
gdi_savepoint() returns one of the following status values.
.TP 12
.B GDI_SUCCESS
Savepoint succeeded.
.TP 12
.B GDI_FAILURE
Savepoint failed; possibly the connection dropped.
.SH FILE
.PP
gdi_tran.c
.SH NOTES
.PP
Not implemented in SYBASE or INGRES yet.
.SH SEE ALSO
.PP
.BR gdi_commit (3),
.BR gdi_rollback (3),
.BR gdi_submit (3)
.SH AUTHOR
.PP
B. MacRitchie, SAIC Geophysical Systems Operation, Open Systems Division

