| each |  |
| example principle | ... The goal of this application is to build a dictionary from sequential files provided by the webster dictionnary. Each sequential file is associated to a letter : wb_a, wb_b, .... wb_z. Sequential files should installed in a subdirectory ("dictionary") of your application. The program will buil... |
| example stat | ... Read/Write operations per second, each operation includes the following actions: ... |
| realisamdoc constr | .... There is an instance of a realisam object for each database you need in the same program. ... |
| easier |  |
| realisamdoc overview | ...RealIsam uses the object-oriented technology for a faster and easier development and to simplify the source code. ... |
| edfile- |  |
| example start | ...ProcessMessages(); // Get Number of Files to Index strcpy(tmp,edFile->Text.c_str()); nbf=atoi(tmp); nbf--; if (nbf... |
| edfile |  |
| example include | ...16; TLabel *Label17; TLabel *lRecords; TLabel *lKeys; TCheckBox *cb; TLabel *Label18; TEdit *edFile; TLabel *Label20; TLabel *RK; TLabel *Label22; TButton *btBackup; TButton *btRestore; TBeve... |
| elapsed |  |
| example backup | ...Caption = AnsiString(nbisam); gettime(&t); nbsec2 = t.ti_hour*3600+t.ti_min*60 + t.ti_sec; int elapsed = nbsec2-nbsec1; lElap->Caption = AnsiString(elapsed); First(); Screen->Cursor = oldCursor; Beep(); EnableButtons(); Application->MessageBoxA("Backup Done","RealIsam",MB... |
| example backup | ...Caption = AnsiString(elapsed); First(); Screen->Cursor = oldCursor; Beep(); EnableButtons(); Application->MessageBoxA("Backup Done","RealIsam",MB_OK); } //--------------------------------------------------------------------------- ... |
| example restore | ...Caption = AnsiString(nbk); gettime(&t); nbsec2 = t.ti_hour*3600+t.ti_min*60 + t.ti_sec; int elapsed = nbsec2-nbsec1; lElap->Caption = AnsiString(elapsed); First(); Screen->Cursor = oldCursor; Beep(); EnableButtons(); Application->MessageBoxA("Restorati... |
| example restore | ...Caption = AnsiString(elapsed); First(); Screen->Cursor = oldCursor; Beep(); EnableButtons(); Application->MessageBoxA("Restoration Done","RealIsam",MB_OK); } //--------------------------------------------------------------------------- ... |
| example start | ...*3600+t.ti_min*60 + t.ti_sec; hund2 = nbsec2*100 + t.ti_hund; float diff = float(hund2-hund1); sprintf(tmp,"%.02f",diff/100.0); int elapsed = nbsec2-nbsec1; lElap->Caption = AnsiString(tmp); // elapsed); // Close ReOpen if (CheckBox1->Checked==true) { strcpy(name,d... |
| example start | ...Caption = AnsiString(tmp); // elapsed); // Close ReOpen if (CheckBox1->Checked==true) { strcpy(name,dict_directory);strcat(name,"dict"); rc = dict->CloseReopen(name,120,"ndx","dat"); //120 = 128 - 8 rc = dict->SetIndexMode(INDEX,multi); rc = dict->SetIndexMode(INDEX+1... |
| else |  |
| example add | ...WriteRecord(buffer,strlen(buffer)+1); } } else // Key does not exist { recdata=dict->GetNewRecordNumber(); rc = dict->WriteKey(INDEX,Key,recdata); rc = dict->WriteRecord(buffer,strlen(buffer)+1); } StatusBar1->SimpleText="Entry Added"; } //-... |
| example add | ...RewriteRecord(str, strlen(str)+1,recdata); } else { recdata=dict->GetNewRecordNumber(); rc = dict->WriteKey(INDEX,Key,recdata); rc = dict->WriteRecord(buffer,strlen(buffer)+1); } } else // Key does not exist { re... |
| example backup | ...Checked==true) multi=1; else multi=0; Screen->Cursor = crHourGlass; strcpy(tmp,lIndex->Caption.c_str()); INDEX=atoi(tmp); DisableButtons(); eWord->Text==""; mWord->Clear(); gettime(&t); nbsec1 = t.ti_hour*3600+t.ti_min*60 + t.ti_sec; nbrecords=0; nbseq=0; nbisam=0; rc = d... |
| example backup | ...</I>) "); strcat(html,buffer); strcat(html,"</P>\n"); fputs(html,fp); nbseq++; } else // extract concatenated items { p1=buffer; p=strchr(p1,'\r'); while (p) { *... |
| example formcreate | ...Checked==false; else cb->Checked=true; // GetVersion Number dict->Version(tmp); MainForm->Caption = "Alpes Software - " + AnsiString(tmp); // Get Number of Keys rc = dict->NumberOfKeys(INDEX); lKeys->Caption = AnsiString(rc); if (rc) First(); } //------------------------------... |
| example restore | ...Checked==true) multi=1; else multi=0; dict->CloseEngine(); // delete isam files strcpy(name,dict_directory);strcat(name,"dict.ndx"); rc = unlink (name); strcpy(name,dict_directory);strcat(name,"dict.dat"); rc =unlink (name); Screen->Cursor = crHourGlass; DisableButtons(); eWor... |
| example restore | ...0) { nbisam++; IndexBuffer(buffer); } else nbrecords=nbrecords; Application->ProcessMessages(); } fclose(fp); int nbk = dict->NumberOfKeys(INDEX); StatusBar1->SimpleText = "Number of Keys: " + AnsiString(nbk); lRecords->Caption = AnsiString(nbi... |
| example search | ...SetTextBuf(buffer); } } else { mWord->SetTextBuf("Word Not Found"); } M_recdata=recdata; strcpy(M_Key,RetKey); } ... |
| example start | ...Checked==true) multi=1; else multi=0; strcpy(tmp,"Indexation will delete and rebuild the dictionary, OK ? "); if (Application->MessageBoxA(tmp,"Isam Dictionary",MB_YESNO)==IDNO) return; rc=dict->CloseEngine(); // delete isam files strcpy(tmp,dict_directory);strcat(tmp,"dict.ndx"); ... |
| example stat | ...-Concatenate definition if No duplicate Key option is set, else store definition in record ... |
| realisamdoc deletekey | ...DeleteRecord(recdata); } else .............. ... |
| realisamdoc getnew | ...WriteKey(0,key,recdata); // index 0 if (!rc) { error / duplicate key... } else { // data are stored in buffer rc = db1->WriteRecord(buffer,strlen(buffer)); .............. } ................. // end rc = db1->CloseEngine(); rc = db2->Clos... |
| realisamdoc readdirect | ...ReadRecord(buffer,recdata); buffer[rc]=0; ............. } else ............ ... |
| realisamdoc readfirst | ...ReadRecord(buffer,recdata); buffer[rc]=0; ............. } else ............ // another example : sequential reading of a file rc = db->ReadFirstKey(0,RetKey,&recdata); while (rc) { rc=db->ReadRecord(buffer,recdata); // processs the record ..................... |
| realisamdoc readlast | ...ReadRecord(buffer,recdata); buffer[rc]=0; ............. } else ............ ... |
| realisamdoc readrecord | ...ReadRecord(buffer,&recdata); buffer[rc]=0; // to end with a 0x00 .......................... } else ................ ... |
| realisamdoc recordlength | ...RecordLength(recdata); if (len) { buffer = malloc(len+2); .... } else { ... empty ...} } .......... ... |
| realisamdoc writerecord | ...WriteRecord(buffer,strlen(buffer)+1); ....... } else ............. ... |
| empty |  |
| realisamdoc readfirst | ...1 if correct (index not empty) ... |
| realisamdoc readfirst | ...0 if the index is empty ... |
| realisamdoc readlast | ...rc = 1 : correct (key found, index not empty) ... |
| realisamdoc readlast | ...rc = 0 : error or index empty ... |
| realisamdoc readnext | ...rc = 0 : error or empty index, or over end of the index ... |
| realisamdoc readprev | ...rc = 0 : error or empty index, or under first key ... |
| realisamdoc recordlength | ...RecordLength(recdata); if (len) { buffer = malloc(len+2); .... } else { ... empty ...} } .......... ... |
| enable |  |
| example enablebuttons | ... Enable Buttons... |
| index_summary item55 | ...Enable Buttons... |
| enablebuttons |  |
| example backup | ...Cursor = oldCursor; Beep(); EnableButtons(); Application->MessageBoxA("Backup Done","RealIsam",MB_OK); } //--------------------------------------------------------------------------- ... |
| example duplicate | ...Cursor = oldCursor; EnableButtons(); Application->MessageBoxA("Duplication Finished","RealIsam",MB_OK); } //--------------------------------------------------------------------------- ... |
| example enablebuttons | ... void __fastcall TMainForm::EnableButtons() { btStart->Enabled = true; btFirst->Enabled = true; btLast->Enabled = true; btNext->Enabled = true; btPrev->Enabled = true; btSearch->Enabled = true; btBackup->Enabled=true; btRestore->Enabled=true; btDupl->Enabled=true; btClear->E... |
| example include | ... *tag, int posdeb); int __fastcall IndexBuffer(char *buff); void __fastcall Search(); void __fastcall First(); void __fastcall EnableButtons(); void __fastcall DisableButtons(); public: // User declarations __fastcall TMainForm(TComponent* Owner); }; //-----------... |
| example restore | ...MessageBoxA("File DICT.txt not Found","File Not Found",MB_OK); EnableButtons(); Screen->Cursor = oldCursor; return; } nbrecords=0; nbisam=0; // read sequential data while (!feof(fp)) { buffer[0]=0; fgets(buffer,BUF_LEN,f... |
| example restore | ...Cursor = oldCursor; Beep(); EnableButtons(); Application->MessageBoxA("Restoration Done","RealIsam",MB_OK); } //--------------------------------------------------------------------------- ... |
| example start | ...MessageBoxA(html,"File Not Found",MB_OK); EnableButtons(); Screen->Cursor = oldCursor; return; } // read sequential data while (!feof(fp)) { tmp[0]=0; fgets(buffer,BUF_LEN,fp); // IndexBuffer(buffer); Applic... |
| example start | ...Cursor = oldCursor; Beep(); EnableButtons(); Application->MessageBoxA("Indexation Finished","RealIsam",MB_OK); } //--------------------------------------------------------------------------- ... |
| enabled |  |
| example disablebuttons | ...Enabled = false; btFirst->Enabled = false; btLast->Enabled = false; btNext->Enabled = false; btPrev->Enabled = false; btSearch->Enabled = false; btBackup->Enabled=false; btRestore->Enabled=false; btDupl->Enabled=false; btClear->Enabled=false; btAdd->Enabled=false; btUpdate->En... |
| example disablebuttons | ...Enabled=false; btAdd->Enabled=false; btUpdate->Enabled=false; btDelete->Enabled=false; } ... |
| example disablebuttons | ...Enabled=false; btUpdate->Enabled=false; btDelete->Enabled=false; } ... |
| example disablebuttons | ...Enabled=false; btDelete->Enabled=false; } ... |
| example disablebuttons | ...Enabled = false; btLast->Enabled = false; btNext->Enabled = false; btPrev->Enabled = false; btSearch->Enabled = false; btBackup->Enabled=false; btRestore->Enabled=false; btDupl->Enabled=false; btClear->Enabled=false; btAdd->Enabled=false; btUpdate->Enabled=false; btDelete->Ena... |
| example disablebuttons | ...Enabled = false; btNext->Enabled = false; btPrev->Enabled = false; btSearch->Enabled = false; btBackup->Enabled=false; btRestore->Enabled=false; btDupl->Enabled=false; btClear->Enabled=false; btAdd->Enabled=false; btUpdate->Enabled=false; btDelete->Enabled=false; } ... |
| example disablebuttons | ...Enabled = false; btPrev->Enabled = false; btSearch->Enabled = false; btBackup->Enabled=false; btRestore->Enabled=false; btDupl->Enabled=false; btClear->Enabled=false; btAdd->Enabled=false; btUpdate->Enabled=false; btDelete->Enabled=false; } ... |
| example disablebuttons | ...Enabled = false; btSearch->Enabled = false; btBackup->Enabled=false; btRestore->Enabled=false; btDupl->Enabled=false; btClear->Enabled=false; btAdd->Enabled=false; btUpdate->Enabled=false; btDelete->Enabled=false; } ... |
| example disablebuttons | ...Enabled=false; } ... |
| example disablebuttons | ...Enabled = false; btBackup->Enabled=false; btRestore->Enabled=false; btDupl->Enabled=false; btClear->Enabled=false; btAdd->Enabled=false; btUpdate->Enabled=false; btDelete->Enabled=false; } ... |
| example disablebuttons | ...Enabled=false; btRestore->Enabled=false; btDupl->Enabled=false; btClear->Enabled=false; btAdd->Enabled=false; btUpdate->Enabled=false; btDelete->Enabled=false; } ... |
| example disablebuttons | ...Enabled=false; btDupl->Enabled=false; btClear->Enabled=false; btAdd->Enabled=false; btUpdate->Enabled=false; btDelete->Enabled=false; } ... |
| example disablebuttons | ...Enabled=false; btClear->Enabled=false; btAdd->Enabled=false; btUpdate->Enabled=false; btDelete->Enabled=false; } ... |
| example enablebuttons | ...Enabled = true; btBackup->Enabled=true; btRestore->Enabled=true; btDupl->Enabled=true; btClear->Enabled=true; btAdd->Enabled=true; btUpdate->Enabled=true; btDelete->Enabled=true; } ... |
| example enablebuttons | ...Enabled=true; btRestore->Enabled=true; btDupl->Enabled=true; btClear->Enabled=true; btAdd->Enabled=true; btUpdate->Enabled=true; btDelete->Enabled=true; } ... |
| example enablebuttons | ...Enabled=true; btDupl->Enabled=true; btClear->Enabled=true; btAdd->Enabled=true; btUpdate->Enabled=true; btDelete->Enabled=true; } ... |
| example enablebuttons | ...Enabled=true; btClear->Enabled=true; btAdd->Enabled=true; btUpdate->Enabled=true; btDelete->Enabled=true; } ... |
| example enablebuttons | ...Enabled=true; btAdd->Enabled=true; btUpdate->Enabled=true; btDelete->Enabled=true; } ... |
| example enablebuttons | ...Enabled=true; btUpdate->Enabled=true; btDelete->Enabled=true; } ... |
| example enablebuttons | ...Enabled=true; btDelete->Enabled=true; } ... |
| example enablebuttons | ...Enabled=true; } ... |
| example enablebuttons | ...Enabled = true; btFirst->Enabled = true; btLast->Enabled = true; btNext->Enabled = true; btPrev->Enabled = true; btSearch->Enabled = true; btBackup->Enabled=true; btRestore->Enabled=true; btDupl->Enabled=true; btClear->Enabled=true; btAdd->Enabled=true; btUpdate->Enabled=true;... |
| example enablebuttons | ...Enabled = true; btLast->Enabled = true; btNext->Enabled = true; btPrev->Enabled = true; btSearch->Enabled = true; btBackup->Enabled=true; btRestore->Enabled=true; btDupl->Enabled=true; btClear->Enabled=true; btAdd->Enabled=true; btUpdate->Enabled=true; btDelete->Enabled=true; ... |
| example enablebuttons | ...Enabled = true; btNext->Enabled = true; btPrev->Enabled = true; btSearch->Enabled = true; btBackup->Enabled=true; btRestore->Enabled=true; btDupl->Enabled=true; btClear->Enabled=true; btAdd->Enabled=true; btUpdate->Enabled=true; btDelete->Enabled=true; } ... |
| example enablebuttons | ...Enabled = true; btPrev->Enabled = true; btSearch->Enabled = true; btBackup->Enabled=true; btRestore->Enabled=true; btDupl->Enabled=true; btClear->Enabled=true; btAdd->Enabled=true; btUpdate->Enabled=true; btDelete->Enabled=true; } ... |
| example enablebuttons | ...Enabled = true; btSearch->Enabled = true; btBackup->Enabled=true; btRestore->Enabled=true; btDupl->Enabled=true; btClear->Enabled=true; btAdd->Enabled=true; btUpdate->Enabled=true; btDelete->Enabled=true; } ... |
| end |  |
| realisamdoc close | ... 512 !! if (!rc) { error db2 ... } // end proceesing rc = db1->CloseEngine(); rc = db2->CloseEngine(); ... |
| realisamdoc deletekey | ...OpenEngine("Applic",504,"ndx","dat"); ................ // end of procedure db->CloseEngine(); ....................... ................. // procedure int rc, recdata; char ReturnKey[100]; rc = db->ReadDirectKey(1,"microsoft",ReturnKey,&recdata); if (rc) { rc=db->DeleteKey(1,... |
| realisamdoc getnew | ...WriteRecord(buffer,strlen(buffer)); .............. } ................. // end rc = db1->CloseEngine(); rc = db2->CloseEngine(); ... |
| realisamdoc readfirst | ...ReadNextKey(RetKey,&recdata); // rc = 0 if end of file (last key of index) } ................... ... |
| realisamdoc readnext | ...rc = 0 : error or empty index, or over end of the index ... |
| realisamdoc readnext | ...OpenEngine("Applic",504,"ndx","dat"); ................ // end of processing db->CloseEngine(); ....................... ................. // procedure int rc, recdata; char ReturnKey[100]; // sequentiel reading of an index rc = db->ReadFirstKey(0,ReturnKey,&recdata); while (rc) ... |
| realisamdoc readprev | ...OpenEngine("Applic",504,"ndx","dat"); ................ // end of process db->CloseEngine(); ....................... ................. // procedure int rc, recdata; char ReturnKey[100]; // example : read a file in the reverse order // buffer is supposed to be allocated rc = db->... |
| realisamdoc readrecord | ...ReadRecord(buffer,&recdata); buffer[rc]=0; // to end with a 0x00 .......................... } else ................ ... |
| realisamdoc setindex | ...SetIndexMode(0,UNIQUE_KEYS); if (!rc) { error db2 ... } // End rc = db1->CloseEngine(); rc = db2->CloseEngine(); ... |
| realisamdoc writekey | ...WriteKey(1,"politics",recdata); // on index 1 , duplicate keys allowed ................. // End processing rc = db1->CloseEngine(); rc = db2->CloseEngine(); ... |
| ended |  |
| realisamdoc writerecord | ...osition previously defined by a call to GetNewRecordNumber. Data can be text or binary. Length is a parameter to provide . For characters strings ended with 0x00, the developer can insert the last byte 0x00, or can insert it when the program read the data. ... |
| endif |  |
| example include | ...---------------------------- extern PACKAGE TMainForm *MainForm; //--------------------------------------------------------------------------- #endif ... |
| realisamdoc include | ... #ifndef __REALISAM_H #define __REALISAM_H #ifdef __cplusplus extern "C" { #endif class _export realisam { public: realisam(void); ~realisam(void); int OpenEngine(char *FileName,short BlockSize,char *ndx, char*dat); int CloseEngine(void); int SetIndexMode(short Index,... |
| realisamdoc include | ...eteIsam(char *indexname,char *dataname); int CloseReopen(char *FileName,short BlockSize,char *ndx, char *dat); }; #ifdef __cplusplus } #endif #endif ... |
| realisamdoc include | ...char *indexname,char *dataname); int CloseReopen(char *FileName,short BlockSize,char *ndx, char *dat); }; #ifdef __cplusplus } #endif #endif ... |
| engines |  |
| realisamdoc overview | ...Companion tools as words indexation and desindexation, local search engines, SQL interface are existing, but they are not integrated in the DLL ... |
| enough |  |
| realisamdoc readfirst | ... index number (0-63) Key is a pointer on a character string, large enough to receive the key (max = 250 characters) recdata is a pointer on the data record related to the key. ... |
| realisamdoc readlast | ...Key is a pointer on a character string, large enough to receive the value of the key (250 char . max) ... |
| realisamdoc readrecord | ...ead a data record. A character string pointer un pointeur is provided as a receiving buffer. The memory allocated for this transfer must be large enough to receive the data. If the length is totally unknown, a call to RecordLength function allows to allocate the right amount of memory. ReadRecor... |
| enter |  |
| example principle | ...Search for a word : Enter a Word and click on the "Search" button ... |
| entire |  |
| realisamdoc readrecord | ...he data. If the length is totally unknown, a call to RecordLength function allows to allocate the right amount of memory. ReadRecord restores the entire data written previously, including binary data. For character strings stored without a 0x00 terminator, it is recommended to terminate the string... |
| entries |  |
| example principle | ... : 176043 Entries ... |
| example principle | ... : Only 111730 Entries... |
| example principle | .... wb_z. Sequential files should installed in a subdirectory ("dictionary") of your application. The program will build an Isam database, where entries can be accessed directly or sequentially. ... |
| example stat | ...Entries... |
| entry |  |
| example add | ... Add an entry... |
| example add | ...SimpleText="Entry Added"; } //--------------------------------------------------------------------------- ... |
| example delete | ...SimpleText="Entry Deleted"; } //--------------------------------------------------------------------------- ... |
| example delete | ... Delete an Entry... |
| example principle | ...Add a New Entry ... |
| example principle | ...Update an Entry ... |
| example principle | ...Delete an Entry ... |
| example stat | ...-Extract Entry Word into Key ... |
| example update | ...SimpleText="Entry Updated"; } //--------------------------------------------------------------------------- ... |
| index_summary item51 | ...e an Entry... |
| index_summary item54 | ...n entry... |
| environment |  |
| realisamdoc overview | ...Environment : Windows 95,98,NT,2000,XP. ... |
| error |  |
| realisamdoc close | ...0 = Closing error ... |
| realisamdoc close | ... 512 !! if (!rc) { error db2 ... } // end proceesing rc = db1->CloseEngine(); rc = db2->CloseEngine(); ... |
| realisamdoc close | ... 256 ! if (!rc) { error db1 .... } rc = db2->OpenEngine("scripts",504,,"ndx","dat"); // 504 + 8 ==> 512 !! if (!rc) { error db2 ... } // end proceesing rc = db1->CloseEngine(); rc = db2->CloseEngine(); ... |
| realisamdoc closereopen | ...0 = Error opening files ... |
| realisamdoc deletekey | ...rc = 0 : error : Key not found ... |
| realisamdoc deleterecord | ...rc = 0 : Error (data number incorrect or ... |
| realisamdoc getnew | ... 256 ! if (!rc) { error db1 .... } rc = db1->SetIndexMode(0,UNIQUE_KEY); strcpy(key,"doc30134"); recdata = db1->GetNewRecordNumber(); rc = db1->WriteKey(0,key,recdata); // index 0 if (!rc) { error / duplicate key... } else { // data are stored in buffer rc = ... |
| realisamdoc getnew | ...0 = error. ... |
| realisamdoc getnew | ...WriteKey(0,key,recdata); // index 0 if (!rc) { error / duplicate key... } else { // data are stored in buffer rc = db1->WriteRecord(buffer,strlen(buffer)); .............. } ................. // end rc = db1->CloseEngine(); rc = db2->Clos... |
| realisamdoc open | ... 256 ! if (!rc) { error db1 .... } rc = db2->OpenEngine("scripts",504,"ndx","dat"); // 504 + 8 ==> 512 !! if (!rc) { error db2 ... } ... |
| realisamdoc open | ... 512 !! if (!rc) { error db2 ... } ... |
| realisamdoc open | ...0 = Error at opening files ... |
| realisamdoc readlast | ...rc = 0 : error or index empty ... |
| realisamdoc readnext | ...rc = 0 : error or empty index, or over end of the index ... |
| realisamdoc readprev | ...rc = 0 : error or empty index, or under first key ... |
| realisamdoc rewriterecord | ...rc = 0 : error ... |
| realisamdoc setindex | .... If the index was declared with a unique type of key, it returns an error when trying to write again the same key. For indexes with duplicate keys, there is no limit to the number of duplicate keys. If this function is not called, the default value is 0 (no duplicate keys). ... |
| realisamdoc setindex | ...SetIndexMode(0,UNIQUE_KEYS); if (!rc) { error db2 ... } // End rc = db1->CloseEngine(); rc = db2->CloseEngine(); ... |
| realisamdoc setindex | ... 256 ! if (!rc) { error db1 .... } rc = db1->SetIndexMode(0,UNIQUE_KEYS); rc = db1->SetIndexMode(1,DUPLICATE_KEYS); rc = db2->OpenEngine("scripts",504,,"ndx","dat"); // 504 + 8 ==> 512 !! rc = db2->SetIndexMode(0,UNIQUE_KEYS); if (!rc) { error db2 ... } // End rc = db1->Close... |
| realisamdoc writekey | ... 256 ! if (!rc) { error db1 .... } rc = db1->SetIndexMode(0,UNIQUE); rc = db1->SetIndexMode(1,DUPLICATE); rc = db2->OpenEngine("scripts",504,"ndx","dat"); // 504 + 8 ==> 512 !! rc = db2->SetIndexMode(0,UNIQUE); if (!rc) { error db2 ... } strcpy(key,"doc30134"); recdata = db1->Get... |
| realisamdoc writekey | ...WriteKey(0,key,recdata); // index 0 if (!rc) { error / duplicate key ... } rc = db1->WriteKey(1,"politics",recdata); // on index 1 , duplicate keys allowed ................. // End processing rc = db1->CloseEngine(); rc = db2->CloseEngine(); ... |
| realisamdoc writekey | ...SetIndexMode(0,UNIQUE); if (!rc) { error db2 ... } strcpy(key,"doc30134"); recdata = db1->GetNewRecordNumber(); rc = db1->WriteKey(0,key,recdata); // index 0 if (!rc) { error / duplicate key ... } rc = db1->WriteKey(1,"politics",recdata); // on index 1 , duplicate keys allowed... |
| eword- |  |
| example add | ...inForm::btAddClick(TObject *Sender) { char Key[MAX_KEY],RetKey[MAX_KEY]; int rc, recdata; char buffer[BUF_LEN],str[BUF_LEN]; strcpy(Key,eWord->Text.c_str()); if (strlen(Key)==0) { Application->MessageBoxA("Key not provided","RealIsam",MB_OK); return; } strlwr(Key... |
| example backup | ...Caption.c_str()); INDEX=atoi(tmp); DisableButtons(); eWord->Text==""; mWord->Clear(); gettime(&t); nbsec1 = t.ti_hour*3600+t.ti_min*60 + t.ti_sec; nbrecords=0; nbseq=0; nbisam=0; rc = dict->ReadFirstKey(INDEX,RetKey,&recdata); while (rc) { if (strlen(RetKey) > 30) A... |
| example clear | ... void __fastcall TMainForm::btClearClick(TObject *Sender) { eWord->Text=""; mWord->Clear(); } //--------------------------------------------------------------------------- ... |
| example first | ...Caption=AnsiString(RetKey); eWord->Text=AnsiString(RetKey); if (rc==1) { rc=dict->ReadRecord(buffer,recdata); M_recdata=recdata; strcpy(M_Key,RetKey); if (rc) mWord->SetTextBuf(buffer); } } void __fastcall TMainForm::btFirstClick(TObject *Sender) { First(); } /... |
| example last | ...Caption=AnsiString(RetKey); eWord->Text=AnsiString(RetKey); if (rc==1) { mWord->Clear(); rc=dict->ReadRecord(buffer,recdata); M_recdata=recdata; strcpy(M_Key,RetKey); if (rc) mWord->SetTextBuf(buffer); } } //---------------------------------------------------------... |
| example next | ...Caption=AnsiString(RetKey); eWord->Text=AnsiString(RetKey); if (rc==1) { mWord->Clear(); rc=dict->ReadRecord(buffer,recdata); M_recdata=recdata; strcpy(M_Key,RetKey); if (rc) mWord->SetTextBuf(buffer); } } //--------------------------------------------------------... |
| example prev | ...Caption=AnsiString(RetKey); eWord->Text=AnsiString(RetKey); if (rc==1) { mWord->Clear(); rc=dict->ReadRecord(buffer,recdata); M_recdata=recdata; strcpy(M_Key,RetKey); if (rc) mWord->SetTextBuf(buffer); } } //---------------------------------------------------------... |
| example restore | ...Cursor = crHourGlass; DisableButtons(); eWord->Text==""; mWord->Clear(); gettime(&t); nbsec1 = t.ti_hour*3600+t.ti_min*60 + t.ti_sec; strcpy(tmp,lIndex->Caption.c_str()); INDEX=atoi(tmp); if (INDEX ... |
| example search | ... void __fastcall TMainForm::Search() { int rc,recdata; char Key[MAX_KEY],RetKey[MAX_KEY]; char buffer[BUF_LEN]; char tmp[256]; if (eWord->Text=="") { mWord->Clear(); return; } INDEX=0; strcpy(Key,eWord->Text.c_str()); strlwr(Key); rc = dict->ReadDirectKey(INDEX,Key,RetKe... |
| example search | ...Clear(); return; } INDEX=0; strcpy(Key,eWord->Text.c_str()); strlwr(Key); rc = dict->ReadDirectKey(INDEX,Key,RetKey,&recdata); RK->Caption=AnsiString(RetKey); eWord->Text=AnsiString(RetKey); if (rc==1) { rc=dict->ReadRecord(buffer,recdata); if (rc) { ... |
| example search | ...Caption=AnsiString(RetKey); eWord->Text=AnsiString(RetKey); if (rc==1) { rc=dict->ReadRecord(buffer,recdata); if (rc) { mWord->Clear(); mWord->SetTextBuf(buffer); } } else { mWord->SetTextBuf("Word Not Found"); } M_recdata=recdata... |
| example start | ...Cursor = crHourGlass; DisableButtons(); eWord->Text=""; mWord->Clear(); RK->Caption = ""; lKeys->Caption = ""; lRecords->Caption=""; lElap->Caption=""; // GET INDEX VALUE; strcpy(tmp,lIndex->Caption.c_str()); INDEX=atoi(tmp); if (INDEX ... |
| example wordmouseup | ...GetSelTextBuf(tmp,100); if (strlen(tmp)==0) return; eWord->Text=AnsiString(tmp); Search(); } //--------------------------------------------------------------------------- ... |
| eword |  |
| example include | ...omponents TPageControl *PageControl1; TTabSheet *TabSheet2; TButton *btStart; TLabel *Label15; TEdit *eWord; TMemo *mWord; TLabel *lelapsed; TStatusBar *StatusBar1; TButton *btSearch; TLabel *lElap; T... |
| ewordkeyup |  |
| example include | ... Y); void __fastcall btBackupClick(TObject *Sender); void __fastcall btRestoreClick(TObject *Sender); void __fastcall eWordKeyUp(TObject *Sender, WORD &Key, TShiftState Shift); void __fastcall btUpdateClick(TObject *Sender); void __fastcall bt... |
| example searchword | ... void __fastcall TMainForm::eWordKeyUp(TObject *Sender, WORD &Key, TShiftState Shift) { if (Key==13) Search(); } //--------------------------------------------------------------------------- ... |
| example |  |
| example download | ...Download Example TestIsam.zip (6.2 MB)... |
| example include | ...time t2; int nbsec1,nbsec2,delta; realisam *dict; // working database realisam *dupli; // another instance for duplication example char base_directory[MAX_PATH]; char dict_directory[MAX_PATH]; int nbrecords; int multi; int INDEX; in... |
| index_summary item28 | ...Example Program... |
| realisamdoc close | ...Example :... |
| realisamdoc closereopen | ...Example :... |
| realisamdoc constr | ...Example :... |
| realisamdoc deleteisam | ...Example :... |
| realisamdoc deletekey | ...Example :... |
| realisamdoc deleterecord | ...Example :... |
| realisamdoc getindex | ...Example :... |
| realisamdoc getnew | ...Example :... |
| realisamdoc number | ...Example :... |
| realisamdoc open | ...Example :... |
| realisamdoc readdirect | ...Example :... |
| realisamdoc readfirst | ...Example :... |
| realisamdoc readfirst | ...ReadRecord(buffer,recdata); buffer[rc]=0; ............. } else ............ // another example : sequential reading of a file rc = db->ReadFirstKey(0,RetKey,&recdata); while (rc) { rc=db->ReadRecord(buffer,recdata); // processs the record ..................... |
| realisamdoc readlast | ...Example :... |
| realisamdoc readnext | ...Example :... |
| realisamdoc readprev | ...CloseEngine(); ....................... ................. // procedure int rc, recdata; char ReturnKey[100]; // example : read a file in the reverse order // buffer is supposed to be allocated rc = db->ReadLast(0,ReturnKey,&recdata); while (rc) { rc = db->ReadRecord(buffer,rec... |
| realisamdoc readprev | ...Example :... |
| realisamdoc readrecord | ...Example :... |
| realisamdoc recordlength | ...Example :... |
| realisamdoc rewriterecord | ...Example :... |
| realisamdoc setindex | ...Example :... |
| realisamdoc version | ...Example :... |
| realisamdoc writekey | ...Example :... |
| realisamdoc writerecord | ...Example :... |
| exe |  |
| example download | ... Files are packed in a ZIP file Borland DLL,or BPL are also incuded if you want to run the TESTISAM.EXE program without having the BCB development compiler. ... |
| example download | ...- testisam.exe ... |
| exist |  |
| example add | ...WriteRecord(buffer,strlen(buffer)+1); } } else // Key does not exist { recdata=dict->GetNewRecordNumber(); rc = dict->WriteKey(INDEX,Key,recdata); rc = dict->WriteRecord(buffer,strlen(buffer)+1); } StatusBar1->SimpleText="Entry Added"; } //-... |
| realisamdoc open | ... specified in the indx parameter,and the data file have the extension specified in the dat parameter. Realisam creates these files if they don't exist. Notice : always open / reopen the database with the same physical block size. ... |
| existing |  |
| realisamdoc number | ...This function provides the number of keys existing for a specified index. ... |
| realisamdoc overview | ...Companion tools as words indexation and desindexation, local search engines, SQL interface are existing, but they are not integrated in the DLL ... |
| realisamdoc writekey | ...0 = Key already existing (if duplicate keys not allowed) ... |
| exists |  |
| example add | ...ReadDirectKey(INDEX,Key,RetKey,&recdata); if (rc) // Exists if == 1 { if (multi==0) // Unique Keys : Concatenate definitions { rc=dict->ReadRecord(str,recdata); strcat(str,"\r\n"); strcat(str,buffer); rc = dict->RewriteRecord(str, strlen(s... |
| example stat | ...-Write Key if Key doesn't exists ... |
| exit1 |  |
| example include | ...TButton *btNext; TButton *btPrev; TButton *btFirst; TButton *btLast; TMainMenu *MainMenu1; TMenuItem *Exit1; TMenuItem *Exit2; TLabel *Label16; TLabel *Label17; TLabel *lRecords; TLabel *lKeys; TCheck... |
| exit2 |  |
| example include | ...Button *btPrev; TButton *btFirst; TButton *btLast; TMainMenu *MainMenu1; TMenuItem *Exit1; TMenuItem *Exit2; TLabel *Label16; TLabel *Label17; TLabel *lRecords; TLabel *lKeys; TCheckBox *cb; TLabel *L... |
| exit2click |  |
| example exit | ... void __fastcall TMainForm::Exit2Click(TObject *Sender) { Close(); } //--------------------------------------------------------------------------- ... |
| example include | ...*Sender); void __fastcall btLastClick(TObject *Sender); void __fastcall btPrevClick(TObject *Sender); void __fastcall Exit2Click(TObject *Sender); void __fastcall mWordMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y); ... |
| exit |  |
| example exit | ... Exit Routine... |
| index_summary item45 | ...Exit Routine... |
| extension |  |
| realisamdoc closereopen | ...Index file extension ... |
| realisamdoc closereopen | ...Data file extension ... |
| realisamdoc open | ...Open the index file and the data file associated to the database. The index file, will have the extension specified in the indx parameter,and the data file have the extension specified in the dat parameter. Realisam creates these files if they don't exist. Notice : always open / reopen the data... |
| realisamdoc open | ...d the data file associated to the database. The index file, will have the extension specified in the indx parameter,and the data file have the extension specified in the dat parameter. Realisam creates these files if they don't exist. Notice : always open / reopen the database with the same phy... |
| realisamdoc open | ... filename = filename, with no extension (this function opens or creates the Isam files , according the extension required) datalen = Data physical block length . This value is not the real data length, but an average size. realisam will write data in consecutive blocks of datalen + 8 bytes. If re... |
| realisamdoc open | ... filename = filename, with no extension (this function opens or creates the Isam files , according the extension required) datalen = Data physical block length . This value is not the real data length, but an average size. realisam will write data in consecutive blocks of datalen + 8 bytes. If re... |
| extern |  |
| example include | ...declarations __fastcall TMainForm(TComponent* Owner); }; //--------------------------------------------------------------------------- extern PACKAGE TMainForm *MainForm; //--------------------------------------------------------------------------- #endif ... |
| realisamdoc include | ... #ifndef __REALISAM_H #define __REALISAM_H #ifdef __cplusplus extern "C" { #endif class _export realisam { public: realisam(void); ~realisam(void); int OpenEngine(char *FileName,short BlockSize,char *ndx, char*dat); int CloseEngine(void); int SetIndexMode(short Index,... |
| extract |  |
| example backup | ... "); strcat(html,buffer); strcat(html,"</P>\n"); fputs(html,fp); nbseq++; } else // extract concatenated items { p1=buffer; p=strchr(p1,'\r'); while (p) { *p=0; p++; *... |
| example extractvalue | ... Extract Value Between XML tags... |
| example indexbuffer | ...ngth; char Key[MAX_KEY],RetKey[MAX_KEY]; int rc,recdata; char *p; char SKey[MAX_KEY]; int l,i; length=ExtractValue(str,buff,"P",0); // extract a paragraph ... |
| index_summary item35 | ...Extract Value Between XML tag... |
| realisamdoc overview | ... returns all these bytes when a reading operation is required. It is the responsability of the developer to organize records and to know how to extract the fields. Realisam is better adapted to store variable length text data like XML strings. ... |
| extractvalue |  |
| example extractvalue | ... int __fastcall TMainForm::ExtractValue(char *result, char *buff, char *tag, int posdeb) { char tmp[250]; char *p,*p1,*p2; int pos,l; result[0]=0; strcpy(tmp,"... |
| example include | ... int INDEX; int M_recdata; // memorizes data record pointer char M_Key[MAX_KEY]; // memorizes Key int __fastcall ExtractValue(char *result, char *buff, char *tag, int posdeb); int __fastcall IndexBuffer(char *buff); void __fastcall Search(); void __fastcal... |
| example indexbuffer | ..._LEN],definition[BUF_LEN]; int length; char Key[MAX_KEY],RetKey[MAX_KEY]; int rc,recdata; char *p; char SKey[MAX_KEY]; int l,i; length=ExtractValue(str,buff,"P",0); // extract a paragraph ... |