dbf.
phone=
"+1(240)123456";
91cout <<
"Insert failed!"<< endl;
98dbf.
phone=
"(240)234567";
102cout <<
"Insert failed!"<< endl;
112cout <<
"Insert failed!"<< endl;
136cout <<
"NULL"<< endl;
138cout << (
const char*) rec.
first_name<< endl;
143cout <<
"NULL"<< endl;
145cout << (
const char*) rec.
last_name<< endl;
150cout <<
"NULL"<< endl;
157cout <<
"NULL"<< endl;
159cout << (
const char*) rec.
phone<< endl;
179cout <<
"Record "<< person_id <<
" cannot be found."<< endl;
205d->SetUsageContext(
"bdb demo2",
206 "Demo2 application for BDB library");
221cout <<
"===================================="<< endl;
222cout <<
"Deleting record 3."<< endl;
230cout <<
"Error! DBD errno exception:"<< ex.what();
235cout <<
"Error! DBD library exception:"<< ex.what();
243 int main(
intargc,
const char* argv[])
Berkeley BDB file cursor.
BDB errno exception class.
String field type designed to work with C-strings (ASCIIZ)
void Init(void)
Initialize the application.
int Run(void)
Run the application.
const char * s_PhoneBookDBFileName
void PrintPhoneBookRecord(SPhoneBookDB &dbf, int person_id)
int main(int argc, const char *argv[])
void PrintRecord(const SPhoneBookDB &rec)
void DeletePhoneBookRecord(SPhoneBookDB &dbf, int person_id)
int AppMain(int argc, const char *const *argv, const char *const *envp=0, EAppDiagStream diag=eDS_Default, const char *conf=NcbiEmptyCStr, const string &name=NcbiEmptyString)
Main function (entry point) for the NCBI application.
virtual void SetupArgDescriptions(CArgDescriptions *arg_desc)
Setup the command line argument descriptions.
@ eNotNullable
Value cannot be null.
EBDB_ErrCode Delete(EIgnoreError on_error=eThrowOnError)
Delete record corresponding to the current key value.
void Open(const string &filename, EOpenMode open_mode, bool support_dirty_read=false, unsigned rec_len=0)
Open file with specified access mode.
EBDB_ErrCode Insert(EAfterWrite write_flag=eDiscardData)
Insert new record.
void BindKey(const char *field_name, CBDB_Field *key_field, size_t buf_size=0)
void BindData(const char *field_name, CBDB_Field *data_field, size_t buf_size=0, ENullable is_null=eNullable)
EBDB_ErrCode
BDB Return codes.
EBDB_ErrCode Fetch()
Fetches the record corresponding to the current key value.
@ eCreate
implies 'eReadWrite' too
bool IsNull() const
Return TRUE if field is NULL.
const string & GetName() const
Return symbolic name for the field.
void SetDiagPostFlag(EDiagPostFlag flag)
Set the specified flag (globally).
EDiagSev SetDiagPostLevel(EDiagSev post_sev=eDiag_Error)
Set the threshold severity for posting the messages.
@ eDPF_File
File name (not full path)
@ eDiag_Warning
Warning message.
int32_t Int4
4-byte (32-bit) signed integer
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
Defines command line argument related classes.
CBDB_FieldString first_name
CBDB_FieldString last_name
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4