Public Member Functions | List of all members
BtrieveClient Class Reference

The Btrieve client class. More...

#include <btrieveCpp.h>

Public Member Functions

 BtrieveClient (int serviceAgentIdentifier, int clientIdentifier)
 
 BtrieveClient ()
 
 ~BtrieveClient ()
 
Btrieve::StatusCode CollectionClose (BtrieveCollection *btrieveCollection)
 Close a collection. More...
 
Btrieve::StatusCode CollectionCreate (const char *collectionName)
 Create a collection. More...
 
Btrieve::StatusCode CollectionDelete (const char *collectionName)
 Delete a collection. More...
 
Btrieve::StatusCode CollectionOpen (BtrieveCollection *btrieveCollection, const char *collectionName)
 Open a collection. More...
 
Btrieve::StatusCode CollectionRename (const char *existingCollectionName, const char *newCollectionName)
 Rename a collection. More...
 
Btrieve::StatusCode ContinuousOperationBegin (const char *pathNames)
 Begin continuous operation. More...
 
Btrieve::StatusCode ContinuousOperationBegin (const wchar_t *pathNames)
 Begin continuous operation. More...
 
Btrieve::StatusCode ContinuousOperationEnd (const char *pathNames)
 End continuous operation. More...
 
Btrieve::StatusCode ContinuousOperationEnd (const wchar_t *pathNames)
 End continuous operation. More...
 
Btrieve::StatusCode FileClose (BtrieveFile *btrieveFile)
 Close a file. More...
 
Btrieve::StatusCode FileCreate (BtrieveFileAttributes *btrieveFileAttributes, const char *fileName, Btrieve::CreateMode createMode, Btrieve::LocationMode locationMode=Btrieve::LOCATION_MODE_NO_PREFERENCE)
 Create a file. More...
 
Btrieve::StatusCode FileCreate (BtrieveFileAttributes *btrieveFileAttributes, BtrieveIndexAttributes *btrieveIndexAttributes, const char *fileName, Btrieve::CreateMode createMode, Btrieve::LocationMode locationMode=Btrieve::LOCATION_MODE_NO_PREFERENCE)
 Create a file. More...
 
Btrieve::StatusCode FileCreate (BtrieveFileAttributes *btrieveFileAttributes, const wchar_t *fileName, Btrieve::CreateMode createMode, Btrieve::LocationMode locationMode=Btrieve::LOCATION_MODE_NO_PREFERENCE)
 Create a file. More...
 
Btrieve::StatusCode FileCreate (BtrieveFileAttributes *btrieveFileAttributes, BtrieveIndexAttributes *btrieveIndexAttributes, const wchar_t *fileName, Btrieve::CreateMode createMode, Btrieve::LocationMode locationMode=Btrieve::LOCATION_MODE_NO_PREFERENCE)
 Create a file. More...
 
Btrieve::StatusCode FileDelete (const char *fileName)
 Delete a file. More...
 
Btrieve::StatusCode FileDelete (const wchar_t *fileName)
 Delete a file. More...
 
Btrieve::StatusCode FileOpen (BtrieveFile *btrieveFile, const char *fileName, const char *ownerName, Btrieve::OpenMode openMode, Btrieve::LocationMode locationMode=Btrieve::LOCATION_MODE_NO_PREFERENCE)
 Open a file. More...
 
Btrieve::StatusCode FileOpen (BtrieveFile *btrieveFile, const wchar_t *fileName, const char *ownerName, Btrieve::OpenMode openMode, Btrieve::LocationMode locationMode=Btrieve::LOCATION_MODE_NO_PREFERENCE)
 Open a file. More...
 
Btrieve::StatusCode FileRename (const char *existingFileName, const char *newFileName)
 Rename a file. More...
 
Btrieve::StatusCode FileRename (const wchar_t *existingFileName, const wchar_t *newFileName)
 Rename a file. More...
 
int GetClientIdentifier ()
 Get the client identifier. More...
 
const char * GetCurrentDirectory (Btrieve::DiskDrive diskDrive)
 Get the current directory. More...
 
Btrieve::StatusCode GetCurrentDirectory (Btrieve::DiskDrive diskDrive, char *currentDirectory, int currentDirectorySize)
 Get the current directory. More...
 
Btrieve::StatusCode GetCurrentDirectory (Btrieve::DiskDrive diskDrive, wchar_t *currentDirectory, int currentDirectorySize)
 Get the current directory. More...
 
Btrieve::StatusCode GetLastStatusCode ()
 Get the last status code. More...
 
int GetServiceAgentIdentifier ()
 Get the service agent identifier. More...
 
Btrieve::StatusCode GetVersion (BtrieveVersion *btrieveVersion, BtrieveFile *btrieveFile=NULL)
 Get the version. More...
 
Btrieve::StatusCode Login (const char *databaseURI)
 Login. More...
 
Btrieve::StatusCode Login (const wchar_t *databaseURI)
 Login. More...
 
Btrieve::StatusCode Logout (const char *databaseURI)
 Logout. More...
 
Btrieve::StatusCode Logout (const wchar_t *databaseURI)
 Logout. More...
 
Btrieve::StatusCode Reset ()
 Reset. More...
 
Btrieve::StatusCode SetCurrentDirectory (const char *currentDirectory)
 Set the current directory. More...
 
Btrieve::StatusCode SetCurrentDirectory (const wchar_t *currentDirectory)
 Set the current directory. More...
 
Btrieve::StatusCode Stop ()
 Stop. More...
 
Btrieve::StatusCode TransactionAbort ()
 Abort a transaction. More...
 
Btrieve::StatusCode TransactionBegin (Btrieve::TransactionMode transactionMode, Btrieve::LockMode lockMode=Btrieve::LOCK_MODE_NONE)
 Begin a transaction. More...
 
Btrieve::StatusCode TransactionEnd ()
 End a transaction. More...
 

Detailed Description

The Btrieve client class.

Examples:
bfileattributes.cpp, bfileinformation.cpp, bfilter.cpp, bindexattributes.cpp, bkeyonly.cpp, block.cpp, bpercentage.cpp, btest.cpp, btestappend.cpp, btestbulk.cpp, btestchunk.cpp, btestvlr.cpp, and bversion.cpp.

Constructor & Destructor Documentation

◆ BtrieveClient() [1/2]

BtrieveClient::BtrieveClient ( int  serviceAgentIdentifier,
int  clientIdentifier 
)
Parameters
[in]serviceAgentIdentifierThe service agent identifier.
[in]clientIdentifierThe client identifier.
Snippet
BtrieveClient btrieveClient(0x4232, 0);

◆ BtrieveClient() [2/2]

BtrieveClient::BtrieveClient ( )

◆ ~BtrieveClient()

BtrieveClient::~BtrieveClient ( )

Member Function Documentation

◆ CollectionClose()

Btrieve::StatusCode BtrieveClient::CollectionClose ( BtrieveCollection *  btrieveCollection)

Close a collection.

Parameters
[in]btrieveCollectionThe Btrieve collection.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ CollectionCreate()

Btrieve::StatusCode BtrieveClient::CollectionCreate ( const char *  collectionName)

Create a collection.

Parameters
[in]collectionNameThe collection name.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ CollectionDelete()

Btrieve::StatusCode BtrieveClient::CollectionDelete ( const char *  collectionName)

Delete a collection.

Parameters
[in]collectionNameThe collection name.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ CollectionOpen()

Btrieve::StatusCode BtrieveClient::CollectionOpen ( BtrieveCollection *  btrieveCollection,
const char *  collectionName 
)

Open a collection.

Parameters
[out]btrieveCollectionThe Btrieve collection.
[in]collectionNameThe collection name.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ CollectionRename()

Btrieve::StatusCode BtrieveClient::CollectionRename ( const char *  existingCollectionName,
const char *  newCollectionName 
)

Rename a collection.

Parameters
[in]existingCollectionNameThe existing collection name.
[in]newCollectionNameThe new collection name.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ ContinuousOperationBegin() [1/2]

Btrieve::StatusCode BtrieveClient::ContinuousOperationBegin ( const char *  pathNames)

Begin continuous operation.

Parameters
[in]pathNamesThe path names.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ ContinuousOperationBegin() [2/2]

Btrieve::StatusCode BtrieveClient::ContinuousOperationBegin ( const wchar_t *  pathNames)

Begin continuous operation.

Parameters
[in]pathNamesThe path names.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ ContinuousOperationEnd() [1/2]

Btrieve::StatusCode BtrieveClient::ContinuousOperationEnd ( const char *  pathNames)

End continuous operation.

Parameters
[in]pathNamesThe path names.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ ContinuousOperationEnd() [2/2]

Btrieve::StatusCode BtrieveClient::ContinuousOperationEnd ( const wchar_t *  pathNames)

End continuous operation.

Parameters
[in]pathNamesThe path names.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ FileClose()

Btrieve::StatusCode BtrieveClient::FileClose ( BtrieveFile btrieveFile)

Close a file.

Parameters
[in]btrieveFileThe Btrieve file.
Snippet
// If FileClose() fails.
if ((status = btrieveClient->FileClose(btrieveFile)) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveClient::FileClose():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString
Examples:
bfileattributes.cpp, bfileinformation.cpp, bfilter.cpp, bindexattributes.cpp, bkeyonly.cpp, block.cpp, bpercentage.cpp, btest.cpp, btestappend.cpp, btestbulk.cpp, btestchunk.cpp, and btestvlr.cpp.

◆ FileCreate() [1/4]

Btrieve::StatusCode BtrieveClient::FileCreate ( BtrieveFileAttributes btrieveFileAttributes,
const char *  fileName,
Btrieve::CreateMode  createMode,
Btrieve::LocationMode  locationMode = Btrieve::LOCATION_MODE_NO_PREFERENCE 
)

Create a file.

Parameters
[in]btrieveFileAttributesThe file attributes.
[in]fileNameThe file name.
[in]createModeThe create mode.
[in]locationModeThe location mode.
Snippet
// If FileCreate() fails.
if ((status = btrieveClient->FileCreate(&btrieveFileAttributes, btrieveFileName, Btrieve::CREATE_MODE_OVERWRITE)) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveClient::FileCreate():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString
Examples:
bfileattributes.cpp, bfilter.cpp, bindexattributes.cpp, bkeyonly.cpp, block.cpp, bpercentage.cpp, btest.cpp, btestappend.cpp, btestbulk.cpp, btestchunk.cpp, and btestvlr.cpp.

◆ FileCreate() [2/4]

Btrieve::StatusCode BtrieveClient::FileCreate ( BtrieveFileAttributes btrieveFileAttributes,
BtrieveIndexAttributes btrieveIndexAttributes,
const char *  fileName,
Btrieve::CreateMode  createMode,
Btrieve::LocationMode  locationMode = Btrieve::LOCATION_MODE_NO_PREFERENCE 
)

Create a file.

Parameters
[in]btrieveFileAttributesThe file attributes.
[in]btrieveIndexAttributesThe index attributes.
[in]fileNameThe file name.
[in]createModeThe create mode.
[in]locationModeThe location mode.
Snippet
// If FileCreate() fails.
if ((status = btrieveClient->FileCreate(&btrieveFileAttributes, &btrieveIndexAttributes, btrieveFileName, Btrieve::CREATE_MODE_OVERWRITE)) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveClient::FileCreate():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ FileCreate() [3/4]

Btrieve::StatusCode BtrieveClient::FileCreate ( BtrieveFileAttributes btrieveFileAttributes,
const wchar_t *  fileName,
Btrieve::CreateMode  createMode,
Btrieve::LocationMode  locationMode = Btrieve::LOCATION_MODE_NO_PREFERENCE 
)

Create a file.

Parameters
[in]btrieveFileAttributesThe file attributes.
[in]fileNameThe file name.
[in]createModeThe create mode.
[in]locationModeThe location mode.
Snippet
// If FileCreate() fails.
if ((status = btrieveClient->FileCreate(&btrieveFileAttributes, btrieveFileName, Btrieve::CREATE_MODE_OVERWRITE)) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveClient::FileCreate():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ FileCreate() [4/4]

Btrieve::StatusCode BtrieveClient::FileCreate ( BtrieveFileAttributes btrieveFileAttributes,
BtrieveIndexAttributes btrieveIndexAttributes,
const wchar_t *  fileName,
Btrieve::CreateMode  createMode,
Btrieve::LocationMode  locationMode = Btrieve::LOCATION_MODE_NO_PREFERENCE 
)

Create a file.

Parameters
[in]btrieveFileAttributesThe file attributes.
[in]btrieveIndexAttributesThe index attributes.
[in]fileNameThe file name.
[in]createModeThe create mode.
[in]locationModeThe location mode.
Snippet
// If FileCreate() fails.
if ((status = btrieveClient->FileCreate(&btrieveFileAttributes, &btrieveIndexAttributes, btrieveFileName, Btrieve::CREATE_MODE_OVERWRITE)) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveClient::FileCreate():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ FileDelete() [1/2]

Btrieve::StatusCode BtrieveClient::FileDelete ( const char *  fileName)

Delete a file.

Parameters
[in]fileNameThe file name.
Snippet
// If FileDelete() fails.
if ((status = btrieveClient->FileDelete(btrieveFileName)) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveClient::FileDelete():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString
Examples:
bfileattributes.cpp, bfilter.cpp, bindexattributes.cpp, bkeyonly.cpp, block.cpp, bpercentage.cpp, btest.cpp, btestappend.cpp, btestbulk.cpp, btestchunk.cpp, and btestvlr.cpp.

◆ FileDelete() [2/2]

Btrieve::StatusCode BtrieveClient::FileDelete ( const wchar_t *  fileName)

Delete a file.

Parameters
[in]fileNameThe file name.
Snippet
// If FileDelete() fails.
if ((status = btrieveClient->FileDelete(btrieveFileName)) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveClient::FileDelete():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ FileOpen() [1/2]

Btrieve::StatusCode BtrieveClient::FileOpen ( BtrieveFile btrieveFile,
const char *  fileName,
const char *  ownerName,
Btrieve::OpenMode  openMode,
Btrieve::LocationMode  locationMode = Btrieve::LOCATION_MODE_NO_PREFERENCE 
)

Open a file.

Parameters
[out]btrieveFileThe Btrieve file.
[in]fileNameThe file name.
[in]ownerNameThe owner name.
[in]openModeThe open mode.
[in]locationModeThe location mode.
Snippet
// If FileOpen() fails.
if ((status = btrieveClient->FileOpen(btrieveFile, btrieveFileName, NULL, Btrieve::OPEN_MODE_NORMAL)) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveClient::FileOpen():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString
Examples:
bfileattributes.cpp, bfileinformation.cpp, bfilter.cpp, bindexattributes.cpp, bkeyonly.cpp, block.cpp, bpercentage.cpp, btest.cpp, btestappend.cpp, btestbulk.cpp, btestchunk.cpp, and btestvlr.cpp.

◆ FileOpen() [2/2]

Btrieve::StatusCode BtrieveClient::FileOpen ( BtrieveFile btrieveFile,
const wchar_t *  fileName,
const char *  ownerName,
Btrieve::OpenMode  openMode,
Btrieve::LocationMode  locationMode = Btrieve::LOCATION_MODE_NO_PREFERENCE 
)

Open a file.

Parameters
[out]btrieveFileThe Btrieve file.
[in]fileNameThe file name.
[in]ownerNameThe owner name.
[in]openModeThe open mode.
[in]locationModeThe location mode.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ FileRename() [1/2]

Btrieve::StatusCode BtrieveClient::FileRename ( const char *  existingFileName,
const char *  newFileName 
)

Rename a file.

Parameters
[in]existingFileNameThe existing file name.
[in]newFileNameThe new file name.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ FileRename() [2/2]

Btrieve::StatusCode BtrieveClient::FileRename ( const wchar_t *  existingFileName,
const wchar_t *  newFileName 
)

Rename a file.

Parameters
[in]existingFileNameThe existing file name.
[in]newFileNameThe new file name.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ GetClientIdentifier()

int BtrieveClient::GetClientIdentifier ( )

Get the client identifier.

Return values
>= 0The client identifier.
-1An error has occurred. Use BtrieveClient::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error.

◆ GetCurrentDirectory() [1/3]

const char* BtrieveClient::GetCurrentDirectory ( Btrieve::DiskDrive  diskDrive)

Get the current directory.

Note
This method is not thread safe. The string returned will be overwritten on subsequent calls.
Parameters
[in]diskDriveThe disk drive. Non-Windows based systems must use DISK_DRIVE_DEFAULT.
Return values
!= NULLThe current directory.
NULLAn error has occurred.

◆ GetCurrentDirectory() [2/3]

Btrieve::StatusCode BtrieveClient::GetCurrentDirectory ( Btrieve::DiskDrive  diskDrive,
char *  currentDirectory,
int  currentDirectorySize 
)

Get the current directory.

Note
The method is available only in C++.
Parameters
[in]diskDriveThe disk drive. Non-Windows based systems must use DISK_DRIVE_DEFAULT.
[out]currentDirectoryThe current directory.
[in]currentDirectorySizeThe current directory size.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ GetCurrentDirectory() [3/3]

Btrieve::StatusCode BtrieveClient::GetCurrentDirectory ( Btrieve::DiskDrive  diskDrive,
wchar_t *  currentDirectory,
int  currentDirectorySize 
)

Get the current directory.

Parameters
[in]diskDriveThe disk drive. Non-Windows based systems must use DISK_DRIVE_DEFAULT.
[out]currentDirectoryThe current directory.
[in]currentDirectorySizeThe current directory size.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ GetLastStatusCode()

Btrieve::StatusCode BtrieveClient::GetLastStatusCode ( )

Get the last status code.

Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ GetServiceAgentIdentifier()

int BtrieveClient::GetServiceAgentIdentifier ( )

Get the service agent identifier.

Return values
>= 0The service agent identifier.
-1An error has occurred. Use BtrieveClient::GetLastStatusCode to determine the Btrieve::StatusCode associated with any error.

◆ GetVersion()

Btrieve::StatusCode BtrieveClient::GetVersion ( BtrieveVersion btrieveVersion,
BtrieveFile btrieveFile = NULL 
)

Get the version.

Parameters
[out]btrieveVersionThe version.
[in]btrieveFileThe Btrieve file.
Snippet
// If GetVersion() fails.
if ((status = btrieveClient->GetVersion(&btrieveVersion)) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveClient::GetVersion():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString
Examples:
bversion.cpp.

◆ Login() [1/2]

Btrieve::StatusCode BtrieveClient::Login ( const char *  databaseURI)

Login.

Parameters
[in]databaseURIThe database uniform resource indicator.
Snippet
// If Login() fails.
if ((status = btrieveClient->Login(databaseURI)) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveClient::Login():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString
Examples:
bversion.cpp.

◆ Login() [2/2]

Btrieve::StatusCode BtrieveClient::Login ( const wchar_t *  databaseURI)

Login.

Parameters
[in]databaseURIThe database uniform resource indicator.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ Logout() [1/2]

Btrieve::StatusCode BtrieveClient::Logout ( const char *  databaseURI)

Logout.

Parameters
[in]databaseURIThe database uniform resource indicator.
Snippet
// If Logout() fails.
if ((status = btrieveClient->Logout(databaseURI)) != Btrieve::STATUS_CODE_NO_ERROR)
{
printf("Error: BtrieveClient::Logout():%d:%s.\n", status, Btrieve::StatusCodeToString(status));
goto leave;
}
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString
Examples:
bversion.cpp.

◆ Logout() [2/2]

Btrieve::StatusCode BtrieveClient::Logout ( const wchar_t *  databaseURI)

Logout.

Parameters
[in]databaseURIThe database uniform resource indicator.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ Reset()

Btrieve::StatusCode BtrieveClient::Reset ( )

Reset.

Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ SetCurrentDirectory() [1/2]

Btrieve::StatusCode BtrieveClient::SetCurrentDirectory ( const char *  currentDirectory)

Set the current directory.

Parameters
[in]currentDirectoryThe current directory.
Description
Current directory defaults to the current working directory.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ SetCurrentDirectory() [2/2]

Btrieve::StatusCode BtrieveClient::SetCurrentDirectory ( const wchar_t *  currentDirectory)

Set the current directory.

Parameters
[in]currentDirectoryThe current directory.
Description
Current directory defaults to the current working directory.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ Stop()

Btrieve::StatusCode BtrieveClient::Stop ( )

Stop.

Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ TransactionAbort()

Btrieve::StatusCode BtrieveClient::TransactionAbort ( )

Abort a transaction.

Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ TransactionBegin()

Btrieve::StatusCode BtrieveClient::TransactionBegin ( Btrieve::TransactionMode  transactionMode,
Btrieve::LockMode  lockMode = Btrieve::LOCK_MODE_NONE 
)

Begin a transaction.

Parameters
[in]transactionModeThe transaction mode.
[in]lockModeThe lock mode.
Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString

◆ TransactionEnd()

Btrieve::StatusCode BtrieveClient::TransactionEnd ( )

End a transaction.

Return values
= Btrieve::STATUS_CODE_NO_ERRORSuccess.
!= Btrieve::STATUS_CODE_NO_ERRORAn error has occurred.
See also
Btrieve::StatusCodeToString