dbf.
phone=
"+1(240)123456";
92cout <<
"Insert failed!"<< endl;
99dbf.
phone=
"(240)234567";
103cout <<
"Insert failed!"<< endl;
113cout <<
"Insert failed!"<< endl;
126cout <<
"NULL"<< endl;
128cout << (
const char*) rec.
first_name<< endl;
133cout <<
"NULL"<< endl;
135cout << (
const char*) rec.
last_name<< endl;
140cout <<
"NULL"<< endl;
147cout <<
"NULL"<< endl;
149cout << (
const char*) rec.
phone<< endl;
170 unsigned intrecs_fetched = 0;
172cout <<
"===================================="<< endl;
176cout <<
"===================================="<< endl;
177cout <<
"Records found:"<< recs_fetched << endl;
199d->SetUsageContext(
"bdb demo1",
200 "Demo1 application for BDB library");
214cout <<
"Error! DBD errno exception:"<< ex.what();
219cout <<
"Error! DBD library exception:"<< ex.what();
227 int main(
intargc,
const char* argv[])
Berkeley BDB file cursor.
BDB errno exception class.
String field type designed to work with C-strings (ASCIIZ)
Berkeley DB file cursor class.
void Init(void)
Initialize the application.
int Run(void)
Run the application.
const char * s_PhoneBookDBFileName
int main(int argc, const char *argv[])
void PrintRecord(const SPhoneBookDB &rec)
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.
void SetCondition(ECondition cond_from, ECondition cond_to=eNotSet)
Set search condition(type of interval)
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(EFetchDirection fdir=eDefault)
Fetch record.
@ 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