dbwritepage

Description

Write a page of binary data to the server.

WARNING! Use this routine only if you are absolutely sure you know what you are doing!

Syntax

RETCODE dbwritepage(dbproc, dbname, pageno, size, buf)
 
DBPROCESS    *dbproc;
char                   *dbname;
DBINT                pageno;
DBINT                size;
BYTE                  buf[];

Parameters

dbproc

A pointer to the DBPROCESS structure that provides the connection for a particular front-end/server process. It contains all the information that DB-Library uses to manage communications and data between the front end and server.

dbname

The name of the database of interest.

pageno

The number of the database page to be written.

size

The number of bytes to be written to the server. Currently, Adaptive Server database pages are 2048 bytes long.

buf

A pointer to a buffer that holds the data to be written.

Returns

SUCCEED or FAIL.

Usage

dbwritepage writes a page of binary data to the server. This routine is useful primarily for examining and repairing damaged database pages. After calling dbwritepage, the DBPROCESS may contain some error or informational messages from the server. These messages may be accessed through a user-supplied message handler.

See also

dbmsghandle, dbreadpage