| application |  |
| 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 principle | ...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 build an Isam database, where entries can be accessed directly or sequentially. ... |
| realisamdoc download | ..."realisam.h" is the header file to include in an application ... |
| realisamdoc download | ..."realisam.lib" is the library to link to the application ... |
| realisamdoc overview | ...RealIsam is a 32-bits DLL and can be interfaced to any 32 bits application developped under Win95,Win98, NT,XP. ... |
| realisamdoc overview | ...This software is in operation since 1996 in different kind of application : Text Retrieval, CGI Internet, databases to store HTML pages, scripts and HTML macros, XML records, with a very fast access time. Tests were conducted to store million of keys and records associated. ... |
| applications |  |
| realisamdoc overview | ...am is a tool used to manage files using the well known ISAM method (Indexed Sequential Access Method). This method is still very convenient for applications such as Internet, Intranet, Text database retrieval, when you need to store and get variable length documents at very high speed. ... |
| blocksize |  |
| realisamdoc closereopen | ...int CloseReopen(char *FileName,short BlockSize,char *ndx, char *dat); ... |
| realisamdoc include | ...us 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, short Value); int WriteRecord(char *pdata,int len); int R... |
| realisamdoc include | ... int Version(char *p); int GetIndexMode(int ndx); int DeleteIsam(char *indexname,char *dataname); int CloseReopen(char *FileName,short BlockSize,char *ndx, char *dat); }; #ifdef __cplusplus } #endif #endif ... |
| closeengine |  |
| example duplicate | ...CloseEngine(); First(); Screen->Cursor = oldCursor; EnableButtons(); Application->MessageBoxA("Duplication Finished","RealIsam",MB_OK); } //--------------------------------------------------------------------------- ... |
| example formclose | ...CloseEngine(); Action = caFree; } //--------------------------------------------------------------------------- ... |
| example restore | ...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(); eWord->Text==""; mWord->Clear(); gettime(&t); ... |
| example start | ...CloseEngine(); // delete isam files strcpy(tmp,dict_directory);strcat(tmp,"dict.ndx"); rc = unlink (tmp); strcpy(name,dict_directory);strcat(name,"dict.dat"); rc =unlink (name); Screen->Cursor = crHourGlass; DisableButtons(); eWord->Text=""; mWord->Clear(); RK->Caption... |
| index_summary item8 | ...CloseEngine... |
| realisamdoc close | ...CloseEngine... |
| realisamdoc close | ...CloseEngine(); db is the database pointer. ... |
| realisamdoc close | ...CloseEngine(); rc = db2->CloseEngine(); ... |
| realisamdoc close | ...CloseEngine(); ... |
| realisamdoc deletekey | ...CloseEngine(); ....................... ................. // procedure int rc, recdata; char ReturnKey[100]; rc = db->ReadDirectKey(1,"microsoft",ReturnKey,&recdata); if (rc) { rc=db->DeleteKey(1,"microsoft"); rc=db->DeleteRecord(recdata); } else .............. ... |
| realisamdoc getnew | ...CloseEngine(); rc = db2->CloseEngine(); ... |
| realisamdoc getnew | ...CloseEngine(); ... |
| realisamdoc include | ...t realisam { public: realisam(void); ~realisam(void); int OpenEngine(char *FileName,short BlockSize,char *ndx, char*dat); int CloseEngine(void); int SetIndexMode(short Index, short Value); int WriteRecord(char *pdata,int len); int RewriteRecord(char *pdata,int len, int Re... |
| realisamdoc readdirect | ...CloseEngine(); ....................... // procedure int rc; char RetKey[100]; int recdata; rc = db->ReadDirectKey(0,"microsoft",RetKey,&recdata); if (rc) // ok : key found { rc = db->ReadRecord(buffer,recdata); buffer[rc]=0; ............. } else .............. |
| realisamdoc readfirst | ...CloseEngine(); ....................... // procedure int rc; char RetKey[100]; int recdata; rc = db->ReadFirstKey(0,RetKey,&recdata); if (rc) // key found { rc = db->ReadRecord(buffer,recdata); buffer[rc]=0; ............. } else ............ // anoth... |
| realisamdoc readlast | ...CloseEngine(); ....................... // procedure int rc; char RetKey[100]; int recdata; rc = db->ReadLastKey(0,RetKey,&recdata); if (rc) // ok : key is found { rc = db->ReadRecord(buffer,recdata); buffer[rc]=0; ............. } else ............ ... |
| realisamdoc readnext | ...CloseEngine(); ....................... ................. // procedure int rc, recdata; char ReturnKey[100]; // sequentiel reading of an index rc = db->ReadFirstKey(0,ReturnKey,&recdata); while (rc) { rc=db->ReadRecord(buffer,recdata); // process buffer .................. |
| 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 setindex | ...CloseEngine(); rc = db2->CloseEngine(); ... |
| realisamdoc setindex | ...CloseEngine(); ... |
| realisamdoc writekey | ...CloseEngine(); rc = db2->CloseEngine(); ... |
| realisamdoc writekey | ...CloseEngine(); ... |
| realisamdoc writerecord | ...CloseEngine(); ....................... // procedure int rc; char RetKey[100]; int recdata; // new key to insert = "microsoft" // buffer contains the data recdata=db->GetNewRecordNumber(); rc = db->WriteKey(0,"microsoft",recdata); if (rc) // key insert ok { db->WriteRecor... |
| closereopen |  |
| example principle | ...CloseReopen after indexation ... |
| example start | ...CloseReopen(name,120,"ndx","dat"); //120 = 128 - 8 rc = dict->SetIndexMode(INDEX,multi); rc = dict->SetIndexMode(INDEX+1,multi); } StatusBar1->SimpleText = ""; First(); Screen->Cursor = oldCursor; Beep(); EnableButtons(); Application->MessageBoxA("Indexation Finished"... |
| index_summary item27 | ...CloseReopen... |
| realisamdoc closereopen | ...CloseReopen("Samples",248,"ndx","dat"); ... |
| realisamdoc closereopen | ...int CloseReopen(char *FileName,short BlockSize,char *ndx, char *dat); ... |
| realisamdoc closereopen | ...CloseReopen("c:\\Samples,248,"ndx","dat"); ... |
| realisamdoc include | ... RecordLength(int RecNumber); int Version(char *p); int GetIndexMode(int ndx); int DeleteIsam(char *indexname,char *dataname); int CloseReopen(char *FileName,short BlockSize,char *ndx, char *dat); }; #ifdef __cplusplus } #endif #endif ... |
| constructor |  |
| example main_header | ... Include and Constructor... |
| index_summary item34 | ...de and Constructor... |
| index_summary item6 | ...Constructor... |
| realisamdoc close | ... //APPLIC.H #include "realisam.h" ................... realisam *db1; realisam *db2; .................. //APPLIC.CPP // constructor or setup ................ db1 = new realisam(); db2 = new realisam(); ................ // routine int rc; rc = db1->OpenEngine("htmlfile",248,"... |
| realisamdoc closereopen | ... //APPLIC.H #include "realisam.h" ................... realisam *db; .................. //APPLIC.CPP // constructor ............... db = new realisam(); ................ // procedure int rc; ............... rc=db->CloseReopen("Samples",248,"ndx","dat"); ... |
| realisamdoc constr | ...constructor : new realisam... |
| realisamdoc constr | ... //APPLIC.H #include "realisam.h" ................... realisam *db1; realisam *db2; .................. //APPLIC.CPP // in constructor or setup ................ db1 = new realisam(); db2 = new realisam(); ................ ... |
| realisamdoc deletekey | ... //APPLIC.H #include "realisam.h" ................... realisam *db; .................. //APPLIC.CPP // constructor ................ db = new realisam(); id (db) rc=db->OpenEngine("Applic",504,"ndx","dat"); ................ // end of procedure db->CloseEngine(); ................ |
| realisamdoc deleterecord | ... //APPLIC.H #include "realisam.h" ................... realisam *db; .................. //APPLIC.CPP // constructor ................ db = new realisam(); ................ // procedure int rc; int recdata; char RetKey[100]; rc = db->ReadDirectKey(0,"microsoft",RetKey,&recda... |
| realisamdoc getindex | ... //APPLIC.H #include "realisam.h" ................... realisam *db; .................. //APPLIC.CPP // constructor ............... db = new realisam(); ................ // procedure int mode; ............... mode = db->GetIndexMode(12); ....................... ... |
| realisamdoc getnew | ... //APPLIC.H #include "realisam.h" ................... realisam *db; .................. //APPLIC.CPP // constructor ................ db = new realisam(); ................ // procedure int rc; int recdata; char key[30]; rc = db1->OpenEngine("htmlfile",248,"ndx","dat"); //... |
| realisamdoc number | ... //APPLIC.H #include "realisam.h" ................... realisam *db; .................. //APPLIC.CPP // constructor or setup ................ db = new realisam(); ................ // procedure int nb,rc,recdata; char Key[10]; .......... nb = db->NumberOfKeys(0); // for ind... |
| realisamdoc open | ... //APPLIC.H #include "realisam.h" ................... realisam *db1; realisam *db2; .................. //APPLIC.CPP // constructor or setup ................ db1 = new realisam(); db2 = new realisam(); ................ // your routine .... int rc; rc = db1->OpenEngine("h... |
| realisamdoc readdirect | ... //APPLIC.H #include "realisam.h" ................... realisam *db; .................. //APPLIC.CPP // constructor ................ db = new realisam(); ............... rc = db->OpenEngine("Applic",504,"ndx","dat"); ................ db->CloseEngine(); ....................... ... |
| realisamdoc readfirst | ... //APPLIC.H #include "realisam.h" ................... realisam *db; .................. //APPLIC.CPP // constructor or setup ................ db = new realisam(); ............... rc = db->OpenEngine("Applic",504,"ndx","dat"); ................ db->CloseEngine(); ....................... |
| realisamdoc readlast | ... //APPLIC.H #include "realisam.h" ................... realisam *db; .................. //APPLIC.CPP // constructor ................ db = new realisam(); ............... rc = db->OpenEngine("Applic",504,"ndx","dat"); ................ db->CloseEngine(); ....................... ... |
| realisamdoc readnext | ... //APPLIC.H #include "realisam.h" ................... realisam *db; .................. //APPLIC.CPP // constructor or setup ................ db = new realisam(); if (db) rc=db->OpenEngine("Applic",504,"ndx","dat"); ................ // end of processing db->CloseEngine(); ...... |
| realisamdoc readprev | ... //APPLIC.H #include "realisam.h" ................... realisam *db; .................. //APPLIC.CPP // constructor or setup ................ db = new realisam(); id (db) rc=db->OpenEngine("Applic",504,"ndx","dat"); ................ // end of process db->CloseEngine(); ............. |
| realisamdoc readrecord | ... //APPLIC.H #include "realisam.h" ................... realisam *db; .................. //APPLIC.CPP // constructor or setup ................ db = new realisam(); ................ // procedure int rc; int recdata; char ReturnKey[100]; char *buffer; buffer = mem_alloc(1000... |
| realisamdoc recordlength | ... //APPLIC.H #include "realisam.h" ................... realisam *db; .................. //APPLIC.CPP // constructor or setup ................ db = new realisam(); ................ // procedure int rc,len; int recdata; char RetKey[100]; rc = db->ReadDirectKey(0,"microsoft",... |
| realisamdoc rewriterecord | ... //APPLIC.H #include "realisam.h" ................... realisam *db; .................. //APPLIC.CPP // constructor or setup ................ db = new realisam(); ................ // procedure int rc; char buffer [500]; int recdata; char RetKey[100]; // read data rc = db... |
| realisamdoc setindex | ... //APPLIC.H #include "realisam.h" ................... realisam *db1; realisam *db2; .................. //APPLIC.CPP // constructor or setup ................ #define UNIQUE_KEYS 0 #define DUPLICATE_KEYS 1 db1 = new realisam(); db2 = new realisam(); ................. |
| realisamdoc version | ... //APPLIC.H #include "realisam.h" ................... realisam *db; .................. //APPLIC.CPP // constructor ............... db = new realisam(); ................ // procedure char ver[20]; ............... db->Version(ver); // ver stores the string "Version x.y" (... |
| realisamdoc writekey | ... //APPLIC.H #include "realisam.h" ................... realisam *db1; realisam *db2; .................. //APPLIC.CPP // constructor or setup ................ #define UNIQUE 0 #define DUPLICATE 1 db1 = new realisam(); db2 = new realisam(); ................ // Rou... |
| realisamdoc writerecord | ... //APPLIC.H #include "realisam.h" ................... realisam *db; .................. //APPLIC.CPP // constructor ................ db = new realisam(); ............... rc = db->OpenEngine("Applic",504,"ndx","dat"); ................ db->CloseEngine(); ....................... ... |
| deleteisam |  |
| index_summary item26 | ...DeleteIsam... |
| realisamdoc deleteisam | ...int DeleteIsam(char *indexname,char *dataname); ... |
| realisamdoc deleteisam | ...DeleteIsam(char *indexname, char *dataname); ... |
| realisamdoc deleteisam | ...DeleteIsam("c:\\samples.ndx","c:\\samples.dat"); ... |
| realisamdoc include | ...*RecNumber); int NumberOfKeys(short Index); int RecordLength(int RecNumber); int Version(char *p); int GetIndexMode(int ndx); int DeleteIsam(char *indexname,char *dataname); int CloseReopen(char *FileName,short BlockSize,char *ndx, char *dat); }; #ifdef __cplusplus } #endi... |
| deletekey |  |
| example delete | ...DeleteKey(INDEX,M_Key,M_recdata); rc=dict->DeleteRecord(M_recdata); First(); StatusBar1->SimpleText="Entry Deleted"; } //--------------------------------------------------------------------------- ... |
| index_summary item18 | ...DeleteKey... |
| realisamdoc deletekey | ...DeleteKey... |
| realisamdoc deletekey | ...DeleteKey(int Index,char *Key,int recdata); db is a database pointer. ... |
| realisamdoc deletekey | ...DeleteKey(1,"microsoft"); rc=db->DeleteRecord(recdata); } else .............. ... |
| realisamdoc include | ...Number); int ReadRecord(char *pdata,int RecNumber); int GetNewRecordNumber(); int WriteKey(short Index,char *Key,int RecNumber); int DeleteKey(short Index,char *Key,int RecNumber); int ReadFirstKey(short Index,char *ReturnKey,int *RecNumber); int ReadNextKey(char *ReturnKey ,int *... |
| deleterecord |  |
| example delete | ...DeleteRecord(M_recdata); First(); StatusBar1->SimpleText="Entry Deleted"; } //--------------------------------------------------------------------------- ... |
| index_summary item20 | ...DeleteRecord... |
| realisamdoc deletekey | ...DeleteRecord(recdata); } else .............. ... |
| realisamdoc deleterecord | ...DeleteRecord(int recnum); db is a database pointer. ... |
| realisamdoc deleterecord | ...DeleteRecord... |
| realisamdoc deleterecord | ...DeleteRecord(&recdata); ................. ... |
| realisamdoc include | ...tIndexMode(short Index, short Value); int WriteRecord(char *pdata,int len); int RewriteRecord(char *pdata,int len, int RecNumber); int DeleteRecord(int RecNumber); int ReadRecord(char *pdata,int RecNumber); int GetNewRecordNumber(); int WriteKey(short Index,char *Key,int RecNumber... |
| documentation |  |
| index_summary item1 | ...Documentation... |
| duplicate |  |
| example duplicate | ... Duplicate Isam Files... |
| example duplicate | ...recdata_dupli; dupli = new realisam(); char RetKey[MAX_KEY]; char buffer[BUF_LEN]; char tmp[250]; strcpy(tmp,"Do you want to build a duplicate dictionnary : files Dupli.ndx and Dupli.dat ? "); if (Application->MessageBoxA(tmp,"Isam Dictionary",MB_YESNO)==IDNO) return; TCursor... |
| example duplicate | ...SetIndexMode(INDEX,multi); // if MULTI == 1 duplicate key allowed // nbrecords=0; nbseq=0; nbisam=0; rc = dict->ReadFirstKey(INDEX,RetKey,&recdata); while (rc) { rc=dict->ReadRecord(buffer,recdata); recdata_dupli=dupli->GetNewRecordNumber(); rc = dupli->WriteKey(INDEX,Re... |
| example principle | ... Allow or Not Allow Duplicate Keys ... |
| example principle | ...Indexation with duplicate keys allowed... |
| example principle | ...Backup, Restore, Duplicate... |
| example principle | ...Duplicate database : Duplicate the Dict Database in the Dupli Database ... |
| example principle | ...Duplicate database : Duplicate the Dict Database in the Dupli Database ... |
| example restore | ...SetIndexMode(INDEX,multi); // if MULTI == 1 duplicate key allowed rc = dict->SetIndexMode(INDEX+1,multi); nbrecords=0; strcpy(name,dict_directory);strcat(name,"dict.txt"); fp = fopen(name,"r"); if (!fp) {Application->MessageBoxA("File DICT.txt not Found","File Not Found",MB_OK); ... |
| example start | ...SetIndexMode(INDEX,multi); // if MULTI == 1 duplicate key allowed rc = dict->SetIndexMode(INDEX+1,multi); nbrecords=0; // read contents of the 1-26 HTML Files (in alphabetic reverse order, just for fun) for (i=nbf;i>=0;i--) // for (i=0;i... |
| example stat | ...-Concatenate definition if No duplicate Key option is set, else store definition in record ... |
| index_summary item52 | ...Duplicate Isam Files... |
| realisamdoc deletekey | ...Delete a key in a specified index. The key and its related record number have to be provided as parameters (for duplicate keys, the function needs to know this association). ... |
| realisamdoc getindex | ...Int mode = 0 if unique keys, 1 if duplicate keys. ... |
| 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 overview | ...Unique or duplicate keys ... |
| realisamdoc setindex | ... Define is keys are unique or duplicate for a specified index. realisam allows 64 index per database, from ... |
| realisamdoc setindex | ... Index : index number (0 to 63) Value : 0 for non duplicate keys; 1 for duplicate keys ... |
| 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 | ... 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 | ...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 | ... Index : index number (0 to 63) Value : 0 for non duplicate keys; 1 for duplicate keys ... |
| realisamdoc writekey | ...lisam *db1; realisam *db2; .................. //APPLIC.CPP // constructor or setup ................ #define UNIQUE 0 #define DUPLICATE 1 db1 = new realisam(); db2 = new realisam(); ................ // Routine int rc; int recdata; char key[30]; rc = db1->OpenEng... |
| realisamdoc writekey | ...0 = Key already existing (if duplicate keys not allowed) ... |
| 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 | ...WriteKey(1,"politics",recdata); // on index 1 , duplicate keys allowed ................. // End processing rc = db1->CloseEngine(); rc = db2->CloseEngine(); ... |
| realisamdoc writekey | ...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->GetNewRecordNumber(); rc = db1->WriteKey(0,key,recdata); // index 0 if (!... |
| getindexmode |  |
| example formcreate | ...GetIndexMode(INDEX); if (multi==0) cb->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) Fir... |
| index_summary item25 | ...GetIndexMode... |
| realisamdoc getindex | ...int GetIndexMode(int ndx); ... |
| realisamdoc getindex | ...GetIndexMode(int Index); ... |
| realisamdoc getindex | ...GetIndexMode(12); ....................... ... |
| realisamdoc include | ...r *Key, char *ReturnKey, int *RecNumber); int NumberOfKeys(short Index); int RecordLength(int RecNumber); int Version(char *p); int GetIndexMode(int ndx); int DeleteIsam(char *indexname,char *dataname); int CloseReopen(char *FileName,short BlockSize,char *ndx, char *dat); }; ... |
| getnewrecordnumber |  |
| example add | ...GetNewRecordNumber(); rc = dict->WriteKey(INDEX,Key,recdata); rc = dict->WriteRecord(buffer,strlen(buffer)+1); } StatusBar1->SimpleText="Entry Added"; } //--------------------------------------------------------------------------- ... |
| example add | ...GetNewRecordNumber(); rc = dict->WriteKey(INDEX,Key,recdata); rc = dict->WriteRecord(buffer,strlen(buffer)+1); } } else // Key does not exist { recdata=dict->GetNewRecordNumber(); rc = dict->WriteKey(INDEX,Key,recdata); rc = ... |
| example duplicate | ...GetNewRecordNumber(); rc = dupli->WriteKey(INDEX,RetKey,recdata_dupli); rc = dupli->WriteRecord(buffer,strlen(buffer)+1); rc = dict->ReadNextKey(RetKey,&recdata); } dupli->CloseEngine(); First(); Screen->Cursor = oldCursor; EnableButtons(); Application->MessageBoxA... |
| index_summary item11 | ...GetNewRecordNumber... |
| realisamdoc getnew | ...GetNewRecordNumber... |
| realisamdoc getnew | ...GetNewRecordNumber(); rc = db1->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 = db... |
| realisamdoc getnew | ...GetNewRecordNumber(); db is the database pointer. ... |
| realisamdoc include | ... RewriteRecord(char *pdata,int len, int RecNumber); int DeleteRecord(int RecNumber); int ReadRecord(char *pdata,int RecNumber); int GetNewRecordNumber(); int WriteKey(short Index,char *Key,int RecNumber); int DeleteKey(short Index,char *Key,int RecNumber); int ReadFirstKey(short I... |
| realisamdoc number | ...GetNewRecordNumber(); rc = db->WriteKey(0,Key,recdata); if (rc) db->WriteRecord(buffer,strlen(buffer)+1); .............. ... |
| realisamdoc writekey | ...(0 to 63) Key : Key value recdata : pointer (address of the data record in the file .DAT. This value is provided when calling the function GetNewRecordNumber. ... |
| realisamdoc writekey | ...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 ................. // End processing rc = db1->CloseEngine(); rc = db2->CloseEngine(); ... |
| realisamdoc writerecord | ...Write a data record at a position 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. ... |
| realisamdoc writerecord | ...GetNewRecordNumber(); rc = db->WriteKey(0,"microsoft",recdata); if (rc) // key insert ok { db->WriteRecord(buffer,strlen(buffer)+1); ....... } else ............. ... |
| index |  |
| 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 add | ...WriteKey(INDEX,Key,recdata); rc = dict->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); ... |
| example add | ...WriteKey(INDEX,Key,recdata); rc = dict->WriteRecord(buffer,strlen(buffer)+1); } StatusBar1->SimpleText="Entry Added"; } //--------------------------------------------------------------------------- ... |
| 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 backup | ...ReadFirstKey(INDEX,RetKey,&recdata); while (rc) { if (strlen(RetKey) > 30) Application->MessageBoxA(RetKey,"Key Length > 30",MB_OK); rc=dict->ReadRecord(buffer,recdata); if (rc) { nbisam++; if (multi==1) { strcpy(html,"<P><B>"); str... |
| example delete | ...DeleteKey(INDEX,M_Key,M_recdata); rc=dict->DeleteRecord(M_recdata); First(); StatusBar1->SimpleText="Entry Deleted"; } //--------------------------------------------------------------------------- ... |
| example duplicate | ...WriteKey(INDEX,RetKey,recdata_dupli); rc = dupli->WriteRecord(buffer,strlen(buffer)+1); rc = dict->ReadNextKey(RetKey,&recdata); } dupli->CloseEngine(); First(); Screen->Cursor = oldCursor; EnableButtons(); Application->MessageBoxA("Duplication Finished","RealIsam",MB_O... |
| example duplicate | ...SetIndexMode(INDEX,multi); // if MULTI == 1 duplicate key allowed // nbrecords=0; nbseq=0; nbisam=0; rc = dict->ReadFirstKey(INDEX,RetKey,&recdata); while (rc) { rc=dict->ReadRecord(buffer,recdata); recdata_dupli=dupli->GetNewRecordNumber(); rc = dupli->WriteKey(INDEX,Re... |
| example duplicate | ...ReadFirstKey(INDEX,RetKey,&recdata); while (rc) { rc=dict->ReadRecord(buffer,recdata); recdata_dupli=dupli->GetNewRecordNumber(); rc = dupli->WriteKey(INDEX,RetKey,recdata_dupli); rc = dupli->WriteRecord(buffer,strlen(buffer)+1); rc = dict->ReadNextKey(RetKey,&recd... |
| example first | ... void __fastcall TMainForm::First() { int rc,recdata; char Key[MAX_KEY],RetKey[MAX_KEY]; char buffer[BUF_LEN]; char tmp[50]; INDEX=0; mWord->Clear(); rc = dict->ReadFirstKey(INDEX,RetKey,&recdata); RK->Caption=AnsiString(RetKey); eWord->Text=AnsiString(RetKey); if (rc==1... |
| example first | ...ReadFirstKey(INDEX,RetKey,&recdata); RK->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::btFirs... |
| example formcreate | ...GetIndexMode(INDEX); if (multi==0) cb->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) Fir... |
| example formcreate | ...()); strcpy(dict_directory,base_directory); strcat(dict_directory,"\\dictionary\\"); // REALISAM ALLOWS 64 INDEXES : Value from 0 to 63 INDEX=0; strcpy(name,dict_directory);strcat(name,"dict"); dict = new realisam(); rc = dict->OpenEngine(name,120,"ndx","dat"); //120 = 128 - ... |
| example formcreate | ...NumberOfKeys(INDEX); lKeys->Caption = AnsiString(rc); if (rc) First(); } //--------------------------------------------------------------------------- ... |
| example include | ...cation example char base_directory[MAX_PATH]; char dict_directory[MAX_PATH]; int nbrecords; int multi; int INDEX; int M_recdata; // memorizes data record pointer char M_Key[MAX_KEY]; // memorizes Key int __fastcall ExtractValue(char ... |
| example last | ...ReadLastKey(INDEX,RetKey,&recdata); RK->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 principle | ...Number of Files to index : 26-1 (26 = all letters of the alphabet) ... |
| example principle | ...Build also another Index (index 1) ... |
| example principle | ...Build also another Index (index 1) ... |
| example principle | ...First Key : Returns the first key of the index ... |
| example principle | ...Last Key : Returns the Last Key of the index ... |
| example principle | ...Next Key : Next Key in the index ... |
| example principle | ...Previous Key : Previous Key in the index ... |
| example principle | ...How to Build the Index... |
| example restore | ...SetIndexMode(INDEX,multi); // if MULTI == 1 duplicate key allowed rc = dict->SetIndexMode(INDEX+1,multi); nbrecords=0; strcpy(name,dict_directory);strcat(name,"dict.txt"); fp = fopen(name,"r"); if (!fp) {Application->MessageBoxA("File DICT.txt not Found","File Not Found",MB_OK); ... |
| example restore | ...Caption.c_str()); INDEX=atoi(tmp); if (INDEX ... |
| example restore | ...Caption.c_str()); INDEX=atoi(tmp); if (INDEX ... |
| example restore | ...MessageBoxA("Index Number Not Correct (0-63)","RealIsam",MB_OK); return; } // create a new database strcpy(name,dict_directory);strcat(name,"dict"); rc = dict->OpenEngine(name,120,"ndx","dat"); //120 = 128 - 8 rc = dict->SetIndexMode(INDEX,multi); // if MULTI == 1 duplicate key a... |
| example restore | ...NumberOfKeys(INDEX); StatusBar1->SimpleText = "Number of Keys: " + AnsiString(nbk); lRecords->Caption = AnsiString(nbisam); lKeys->Caption = AnsiString(nbk); gettime(&t); nbsec2 = t.ti_hour*3600+t.ti_min*60 + t.ti_sec; int elapsed = nbsec2-nbsec1; lElap->Caption... |
| example restore | ...SetIndexMode(INDEX+1,multi); nbrecords=0; strcpy(name,dict_directory);strcat(name,"dict.txt"); fp = fopen(name,"r"); if (!fp) {Application->MessageBoxA("File DICT.txt not Found","File Not Found",MB_OK); EnableButtons(); Screen->Cursor = oldCursor; ... |
| 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 | ...ReadDirectKey(INDEX,Key,RetKey,&recdata); RK->Caption=AnsiString(RetKey); eWord->Text=AnsiString(RetKey); if (rc==1) { rc=dict->ReadRecord(buffer,recdata); if (rc) { mWord->Clear(); mWord->SetTextBuf(buffer); } } else { mWord->SetTe... |
| example start | ...Caption=""; // GET INDEX VALUE; strcpy(tmp,lIndex->Caption.c_str()); INDEX=atoi(tmp); if (INDEX ... |
| example start | ...Caption.c_str()); INDEX=atoi(tmp); if (INDEX ... |
| example start | ...Caption.c_str()); INDEX=atoi(tmp); if (INDEX ... |
| example start | ...MessageBoxA("Index Number Not Correct (0-63)","RealIsam",MB_OK); return; } Application->ProcessMessages(); // Get Number of Files to Index strcpy(tmp,edFile->Text.c_str()); nbf=atoi(tmp); nbf--; if (nbf... |
| example start | ...SetIndexMode(INDEX,multi); // if MULTI == 1 duplicate key allowed rc = dict->SetIndexMode(INDEX+1,multi); nbrecords=0; // read contents of the 1-26 HTML Files (in alphabetic reverse order, just for fun) for (i=nbf;i>=0;i--) // for (i=0;i... |
| example start | ...SetIndexMode(INDEX+1,multi); nbrecords=0; // read contents of the 1-26 HTML Files (in alphabetic reverse order, just for fun) for (i=nbf;i>=0;i--) // for (i=0;i... |
| example start | ...ProcessMessages(); // Get Number of Files to Index strcpy(tmp,edFile->Text.c_str()); nbf=atoi(tmp); nbf--; if (nbf... |
| example start | ...NumberOfKeys(INDEX); lRecords->Caption = AnsiString(nbrecords); lKeys->Caption = AnsiString(nbk); gettime(&t); nbsec2 = t.ti_hour*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 = ... |
| example start | ...SetIndexMode(INDEX,multi); rc = dict->SetIndexMode(INDEX+1,multi); } StatusBar1->SimpleText = ""; First(); Screen->Cursor = oldCursor; Beep(); EnableButtons(); Application->MessageBoxA("Indexation Finished","RealIsam",MB_OK); } //----------------------------------------... |
| example start | ...SetIndexMode(INDEX+1,multi); } StatusBar1->SimpleText = ""; First(); Screen->Cursor = oldCursor; Beep(); EnableButtons(); Application->MessageBoxA("Indexation Finished","RealIsam",MB_OK); } //--------------------------------------------------------------------------- ... |
| realisamdoc close | ... Close the .NDX index file and the .DAT file ... |
| realisamdoc closereopen | ...Index file extension ... |
| realisamdoc deleteisam | ... Delete the index file and the data file. The programmer should provide the right full name for the index and the data file. After deleting these file, It is recommended to create a new database, and not try to access function through the old db pointer. ... |
| realisamdoc deleteisam | ... Delete the index file and the data file. The programmer should provide the right full name for the index and the data file. After deleting these file, It is recommended to create a new database, and not try to access function through the old db pointer. ... |
| realisamdoc deletekey | ...rc = -2 : index ... |
| realisamdoc deletekey | ...Delete a key in a specified index. The key and its related record number have to be provided as parameters (for duplicate keys, the function needs to know this association). ... |
| realisamdoc deletekey | ...DeleteKey(int Index,char *Key,int recdata); db is a database pointer. ... |
| realisamdoc deletekey | ...Index = index number ... |
| realisamdoc deletekey | ...Index = index number ... |
| realisamdoc getindex | ... Returns the value of the mode for a given index. ... |
| realisamdoc getindex | ...GetIndexMode(int Index); ... |
| realisamdoc getindex | ...Index Number (0 to 63) ... |
| 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 include | ...r); int ReadFirstKey(short Index,char *ReturnKey,int *RecNumber); int ReadNextKey(char *ReturnKey ,int *RecNumber); int ReadLastKey(short Index,char *ReturnKey,int *RecNumber); int ReadPrevKey(char *ReturnKey ,int *RecNumber); int ReadDirectKey(short Index,char *Key, char *ReturnKey,... |
| realisamdoc include | ...t RecNumber); int DeleteRecord(int RecNumber); int ReadRecord(char *pdata,int RecNumber); int GetNewRecordNumber(); int WriteKey(short Index,char *Key,int RecNumber); int DeleteKey(short Index,char *Key,int RecNumber); int ReadFirstKey(short Index,char *ReturnKey,int *RecNumber); ... |
| realisamdoc include | ... ReadRecord(char *pdata,int RecNumber); int GetNewRecordNumber(); int WriteKey(short Index,char *Key,int RecNumber); int DeleteKey(short Index,char *Key,int RecNumber); int ReadFirstKey(short Index,char *ReturnKey,int *RecNumber); int ReadNextKey(char *ReturnKey ,int *RecNumber); ... |
| realisamdoc include | ...rdNumber(); int WriteKey(short Index,char *Key,int RecNumber); int DeleteKey(short Index,char *Key,int RecNumber); int ReadFirstKey(short Index,char *ReturnKey,int *RecNumber); int ReadNextKey(char *ReturnKey ,int *RecNumber); int ReadLastKey(short Index,char *ReturnKey,int *RecNumbe... |
| realisamdoc include | ...); int ReadLastKey(short Index,char *ReturnKey,int *RecNumber); int ReadPrevKey(char *ReturnKey ,int *RecNumber); int ReadDirectKey(short Index,char *Key, char *ReturnKey, int *RecNumber); int NumberOfKeys(short Index); int RecordLength(int RecNumber); int Version(char *p); int ... |
| realisamdoc include | ...dPrevKey(char *ReturnKey ,int *RecNumber); int ReadDirectKey(short Index,char *Key, char *ReturnKey, int *RecNumber); int NumberOfKeys(short Index); int RecordLength(int RecNumber); int Version(char *p); int GetIndexMode(int ndx); int DeleteIsam(char *indexname,char *dataname); ... |
| realisamdoc number | ...This function provides the number of keys existing for a specified index. ... |
| realisamdoc number | ...NumberOfKeys(int index) db is a database pointer. ... |
| realisamdoc number | ...Index = Index Number ... |
| realisamdoc number | ...Index = Index Number ... |
| realisamdoc number | ...nb = number of keys in this index (>=0) ... |
| realisamdoc number | ...-2 : index number incorrect (... |
| realisamdoc number | ...NumberOfKeys(0); // for index 0 sprintf(Key,"%07d",nb+1000); recdata =db->GetNewRecordNumber(); rc = db->WriteKey(0,Key,recdata); if (rc) db->WriteRecord(buffer,strlen(buffer)+1); .............. ... |
| realisamdoc readdirect | ...Direct search of a key in a specified index, and acquisition of the data pointer associated. ... |
| realisamdoc readdirect | ...ReadDirectkey(int Index,char *Key,char *ReturnKey, int &recdata) db is the database pointer. ... |
| realisamdoc readdirect | ...Index = from 0 to 63 ... |
| realisamdoc readdirect | ...Key = Key to find in the index ... |
| realisamdoc readdirect | ...ReturnKey = Key found after searching the index. ... |
| realisamdoc readfirst | ...ReadNextKey(RetKey,&recdata); // rc = 0 if end of file (last key of index) } ................... ... |
| realisamdoc readfirst | ...1 if correct (index not empty) ... |
| realisamdoc readfirst | ...0 if the index is empty ... |
| realisamdoc readfirst | ...-2 if index > 63 or ... |
| realisamdoc readfirst | ...read the first key on a specified. This function allows to start to read the first key of a specified index. ... |
| realisamdoc readfirst | ...ReadFirstKey(int index,char *Key,int &recdata); db is a database pointer. ... |
| 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 | ...rc = 0 : error or index empty ... |
| realisamdoc readlast | ...rc = -2 : index number > 63 or ... |
| realisamdoc readlast | ... Read the last key of a specified index. ... |
| realisamdoc readlast | ...ReadLastkey(int Index,char *Key,int &recdata); db is a database pointer. ... |
| realisamdoc readlast | ...Index = index number ... |
| realisamdoc readlast | ...Index = index number ... |
| realisamdoc readlast | ...rc = 1 : correct (key found, index not empty) ... |
| realisamdoc readnext | ...Read the next key in the current index . This function is generally used after a call to ReadFirstKey or un ReadDirectKey. The index is not specified in the call. ... |
| realisamdoc readnext | ...rc = 0 : error or empty index, or over end of the index ... |
| realisamdoc readnext | ...rc = 0 : error or empty index, or over end of the index ... |
| realisamdoc readnext | ...Read the next key in the current index . This function is generally used after a call to ReadFirstKey or un ReadDirectKey. The index is not specified in the call. ... |
| realisamdoc readnext | ...CloseEngine(); ....................... ................. // procedure int rc, recdata; char ReturnKey[100]; // sequentiel reading of an index rc = db->ReadFirstKey(0,ReturnKey,&recdata); while (rc) { rc=db->ReadRecord(buffer,recdata); // process buffer .................. |
| realisamdoc readprev | ...Read the previous key in the current index ... |
| realisamdoc readprev | ...rc = 0 : error or empty index, or under first key ... |
| realisamdoc setindex | ...-1 Index number incorrect (... |
| realisamdoc setindex | ...SetIndexMode(int Index, int Value); db is a database pointer. ... |
| realisamdoc setindex | ... Index : index number (0 to 63) Value : 0 for non duplicate keys; 1 for duplicate keys ... |
| realisamdoc setindex | ... Index : index number (0 to 63) Value : 0 for non duplicate keys; 1 for duplicate keys ... |
| realisamdoc writekey | ...Write a key in an index of the database. A data record record address is associated with this key. ... |
| realisamdoc writekey | ...WriteKey(int Index, char *key, int recdata); db is a pointer on the database. ... |
| realisamdoc writekey | ... Index : index number (0 to 63) Key : Key value recdata : pointer (address of the data record in the file .DAT. This value is provided when calling the function GetNewRecordNumber. ... |
| realisamdoc writekey | ... Index : index number (0 to 63) Key : Key value recdata : pointer (address of the data record in the file .DAT. This value is provided when calling the function GetNewRecordNumber. ... |
| realisamdoc writekey | ...-2 = Index number incorrect (... |
| 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 | ...WriteKey(1,"politics",recdata); // on index 1 , duplicate keys allowed ................. // End processing rc = db1->CloseEngine(); rc = db2->CloseEngine(); ... |
| indexation |  |
| example indexbuffer | ... Buffer Indexation... |
| example principle | ...CloseReopen after indexation ... |
| example principle | ...and Click On "Start Indexation" ... |
| example principle | ...Indexation with duplicate keys allowed... |
| example principle | ...Indexation with unique keys... |
| 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 start | ... Indexation Routine... |
| example start | ...MessageBoxA("Indexation Finished","RealIsam",MB_OK); } //--------------------------------------------------------------------------- ... |
| example stat | ...Indexation time (sec)... |
| index_summary item38 | ...Indexation Routine... |
| index_summary item39 | ...r Indexation... |
| numberofkeys |  |
| example formcreate | ...NumberOfKeys(INDEX); lKeys->Caption = AnsiString(rc); if (rc) First(); } //--------------------------------------------------------------------------- ... |
| example restore | ...NumberOfKeys(INDEX); StatusBar1->SimpleText = "Number of Keys: " + AnsiString(nbk); lRecords->Caption = AnsiString(nbisam); lKeys->Caption = AnsiString(nbk); gettime(&t); nbsec2 = t.ti_hour*3600+t.ti_min*60 + t.ti_sec; int elapsed = nbsec2-nbsec1; lElap->Caption... |
| example start | ...NumberOfKeys(INDEX); lRecords->Caption = AnsiString(nbrecords); lKeys->Caption = AnsiString(nbk); gettime(&t); nbsec2 = t.ti_hour*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 = ... |
| index_summary item22 | ...NumberOfKeys... |
| realisamdoc number | ...NumberOfKeys... |
| realisamdoc number | ...NumberOfKeys(int index) db is a database pointer. ... |
| realisamdoc number | ...NumberOfKeys(0); // for index 0 sprintf(Key,"%07d",nb+1000); recdata =db->GetNewRecordNumber(); rc = db->WriteKey(0,Key,recdata); if (rc) db->WriteRecord(buffer,strlen(buffer)+1); .............. ... |
| openengine |  |
| example duplicate | ...OpenEngine(name,120,"ndx","dat"); //120 = 128 - 8 rc = dupli->SetIndexMode(INDEX,multi); // if MULTI == 1 duplicate key allowed // nbrecords=0; nbseq=0; nbisam=0; rc = dict->ReadFirstKey(INDEX,RetKey,&recdata); while (rc) { rc=dict->ReadRecord(buffer,recdata); recdata_dup... |
| example formcreate | ...OpenEngine(name,120,"ndx","dat"); //120 = 128 - 8 multi = dict->GetIndexMode(INDEX); if (multi==0) cb->Checked==false; else cb->Checked=true; // GetVersion Number dict->Version(tmp); MainForm->Caption = "Alpes Software - " + AnsiString(tmp); // Get Number of Keys rc = dict->N... |
| example restore | ...OpenEngine(name,120,"ndx","dat"); //120 = 128 - 8 rc = dict->SetIndexMode(INDEX,multi); // if MULTI == 1 duplicate key allowed rc = dict->SetIndexMode(INDEX+1,multi); nbrecords=0; strcpy(name,dict_directory);strcat(name,"dict.txt"); fp = fopen(name,"r"); if (!fp) {Application->Messa... |
| example start | ...OpenEngine(name,120,"ndx","dat"); //120 = 128 - 8 rc = dict->SetIndexMode(INDEX,multi); // if MULTI == 1 duplicate key allowed rc = dict->SetIndexMode(INDEX+1,multi); nbrecords=0; // read contents of the 1-26 HTML Files (in alphabetic reverse order, just for fun) for (i=nbf;i>=0;i--... |
| index_summary item7 | ...OpenEngine... |
| 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 | ...OpenEngine("htmlfile",248,"ndx","dat"); // 248 + 8 => 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... } el... |
| index |  |
| realisamdoc include | ...id); ~realisam(void); int OpenEngine(char *FileName,short BlockSize,char *ndx, char*dat); int CloseEngine(void); int SetIndexMode(short Index, short Value); int WriteRecord(char *pdata,int len); int RewriteRecord(char *pdata,int len, int RecNumber); int DeleteRecord(int RecNumbe... |
| 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 | ...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 overview | ...Variable length Keys, for any index. ... |
| realisamdoc setindex | ... Define is keys are unique or duplicate for a specified index. realisam allows 64 index per database, from ... |
| realisamdoc setindex | ... Define is keys are unique or duplicate for a specified index. realisam allows 64 index per database, from ... |
| 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). ... |
| indexation |  |
| realisamdoc overview | ...Companion tools as words indexation and desindexation, local search engines, SQL interface are existing, but they are not integrated in the DLL ... |
| numberofkeys |  |
| realisamdoc include | ...ber); int ReadPrevKey(char *ReturnKey ,int *RecNumber); int ReadDirectKey(short Index,char *Key, char *ReturnKey, int *RecNumber); int NumberOfKeys(short Index); int RecordLength(int RecNumber); int Version(char *p); int GetIndexMode(int ndx); int DeleteIsam(char *indexname,cha... |
| openengine |  |
| realisamdoc close | ...OpenEngine("scripts",504,,"ndx","dat"); // 504 + 8 ==> 512 !! if (!rc) { error db2 ... } // end proceesing rc = db1->CloseEngine(); rc = db2->CloseEngine(); ... |
| realisamdoc close | ...OpenEngine("htmlfile",248,"ndx","dat"); // 248 + 8 => 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 include | ...__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, short Value); int WriteRecor... |
| realisamdoc open | ...OpenEngine... |
| realisamdoc open | ...OpenEngine(char *filename,int datalen, char *indx,char *dat); db is a pointer on the database ... |
| realisamdoc open | ...OpenEngine("htmlfile",248,"ndx","dat"); // 248 + 8 => 256 ! if (!rc) { error db1 .... } rc = db2->OpenEngine("scripts",504,"ndx","dat"); // 504 + 8 ==> 512 !! if (!rc) { error db2 ... } ... |
| realisamdoc open | ...OpenEngine("scripts",504,"ndx","dat"); // 504 + 8 ==> 512 !! if (!rc) { error db2 ... } ... |
| realisamdoc readdirect | ...OpenEngine("Applic",504,"ndx","dat"); ................ db->CloseEngine(); ....................... // procedure int rc; char RetKey[100]; int recdata; rc = db->ReadDirectKey(0,"microsoft",RetKey,&recdata); if (rc) // ok : key found { rc = db->ReadRecord(buffer,recdata); ... |
| realisamdoc readfirst | ...OpenEngine("Applic",504,"ndx","dat"); ................ db->CloseEngine(); ....................... // procedure int rc; char RetKey[100]; int recdata; rc = db->ReadFirstKey(0,RetKey,&recdata); if (rc) // key found { rc = db->ReadRecord(buffer,recdata); buffer[rc]=0; ... |
| realisamdoc readlast | ...OpenEngine("Applic",504,"ndx","dat"); ................ db->CloseEngine(); ....................... // procedure int rc; char RetKey[100]; int recdata; rc = db->ReadLastKey(0,RetKey,&recdata); if (rc) // ok : key is found { rc = db->ReadRecord(buffer,recdata); buffer[r... |
| 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 setindex | ...OpenEngine("htmlfile",248,"ndx","dat"); // 248 + 8 => 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... |
| realisamdoc setindex | ...OpenEngine("scripts",504,,"ndx","dat"); // 504 + 8 ==> 512 !! rc = db2->SetIndexMode(0,UNIQUE_KEYS); if (!rc) { error db2 ... } // End rc = db1->CloseEngine(); rc = db2->CloseEngine(); ... |
| realisamdoc writekey | ...OpenEngine("htmlfile",248,"ndx","dat"); // 248 + 8 => 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 ... |
| realisamdoc writekey | ...OpenEngine("scripts",504,"ndx","dat"); // 504 + 8 ==> 512 !! rc = db2->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 = ... |
| realisamdoc writerecord | ...OpenEngine("Applic",504,"ndx","dat"); ................ db->CloseEngine(); ....................... // procedure int rc; char RetKey[100]; int recdata; // new key to insert = "microsoft" // buffer contains the data recdata=db->GetNewRecordNumber(); rc = db->WriteKey(0,"microsoft... |
| parameter |  |
| 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 | ...he 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 physical block size. ... |
| realisamdoc writerecord | ...Write a data record at a position 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. ... |
| parameters |  |
| realisamdoc close | ...Parameters :... |
| realisamdoc closereopen | ...Parameters :... |
| realisamdoc constr | ...Parameters :... |
| realisamdoc deleteisam | ...Parameters :... |
| realisamdoc deletekey | ...Delete a key in a specified index. The key and its related record number have to be provided as parameters (for duplicate keys, the function needs to know this association). ... |
| realisamdoc deletekey | ...Parameters :... |
| realisamdoc deleterecord | ...Parameters :... |
| realisamdoc getindex | ...Parameters :... |
| realisamdoc getnew | ...Parameters :... |
| realisamdoc number | ...Parameters :... |
| realisamdoc open | ...Parameters :... |
| realisamdoc readdirect | ...Parameters :... |
| realisamdoc readfirst | ...Parameters :... |
| realisamdoc readlast | ...Parameters :... |
| realisamdoc readnext | ...Parameters :... |
| realisamdoc readprev | ...Parameters :... |
| realisamdoc readrecord | ...Parameters :... |
| realisamdoc recordlength | ...Parameters :... |
| realisamdoc rewriterecord | ...Parameters :... |
| realisamdoc setindex | ...Parameters :... |
| realisamdoc version | ...Parameters :... |
| realisamdoc writekey | ...Parameters :... |
| realisamdoc writerecord | ...Parameters :... |
| readdirectkey |  |
| 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 search | ...ReadDirectKey(INDEX,Key,RetKey,&recdata); RK->Caption=AnsiString(RetKey); eWord->Text=AnsiString(RetKey); if (rc==1) { rc=dict->ReadRecord(buffer,recdata); if (rc) { mWord->Clear(); mWord->SetTextBuf(buffer); } } else { mWord->SetTe... |
| index_summary item13 | ...ReadDirectKey... |
| realisamdoc deletekey | ...ReadDirectKey(1,"microsoft",ReturnKey,&recdata); if (rc) { rc=db->DeleteKey(1,"microsoft"); rc=db->DeleteRecord(recdata); } else .............. ... |
| realisamdoc deleterecord | ...ReadDirectKey(0,"microsoft",RetKey,&recdata); if (rc) rc = db->DeleteRecord(&recdata); ................. ... |
| realisamdoc include | ... ,int *RecNumber); int ReadLastKey(short Index,char *ReturnKey,int *RecNumber); int ReadPrevKey(char *ReturnKey ,int *RecNumber); int ReadDirectKey(short Index,char *Key, char *ReturnKey, int *RecNumber); int NumberOfKeys(short Index); int RecordLength(int RecNumber); int Version(... |
| realisamdoc readdirect | ...ReadDirectKey... |
| realisamdoc readdirect | ...ReadDirectkey(int Index,char *Key,char *ReturnKey, int &recdata) db is the database pointer. ... |
| realisamdoc readdirect | ...ReadDirectKey(0,"microsoft",RetKey,&recdata); if (rc) // ok : key found { rc = db->ReadRecord(buffer,recdata); buffer[rc]=0; ............. } else ............ ... |
| realisamdoc readnext | ...Read the next key in the current index . This function is generally used after a call to ReadFirstKey or un ReadDirectKey. The index is not specified in the call. ... |
| realisamdoc readrecord | ...ReadDirectKey(0,"microsoft",ReturnKey,&recdata); if (rc) { rc=db->ReadRecord(buffer,&recdata); buffer[rc]=0; // to end with a 0x00 .......................... } else ................ ... |
| realisamdoc recordlength | ...ReadDirectKey(0,"microsoft",RetKey,&recdata); if (rc) // success { len = db->RecordLength(recdata); if (len) { buffer = malloc(len+2); .... } else { ... empty ...} } .......... ... |
| realisamdoc rewriterecord | ...ReadDirectKey(0,"microbiology",RetKey,&recdata); if (rc) //ok { rc = db->ReadRecord(buffer,recdata); // rc is the record length and supposed to be less than 500 .... process data in buffer..... rc = db->RewriteRecord(buffer, strlen(buffer+1),recdata); } ... |
| readfirstkey |  |
| example backup | ...ReadFirstKey(INDEX,RetKey,&recdata); while (rc) { if (strlen(RetKey) > 30) Application->MessageBoxA(RetKey,"Key Length > 30",MB_OK); rc=dict->ReadRecord(buffer,recdata); if (rc) { nbisam++; if (multi==1) { strcpy(html,"<P><B>"); str... |
| example duplicate | ...ReadFirstKey(INDEX,RetKey,&recdata); while (rc) { rc=dict->ReadRecord(buffer,recdata); recdata_dupli=dupli->GetNewRecordNumber(); rc = dupli->WriteKey(INDEX,RetKey,recdata_dupli); rc = dupli->WriteRecord(buffer,strlen(buffer)+1); rc = dict->ReadNextKey(RetKey,&recd... |
| example first | ...ReadFirstKey(INDEX,RetKey,&recdata); RK->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::btFirs... |
| index_summary item14 | ...ReadFirstKey... |
| realisamdoc include | ... int GetNewRecordNumber(); int WriteKey(short Index,char *Key,int RecNumber); int DeleteKey(short Index,char *Key,int RecNumber); int ReadFirstKey(short Index,char *ReturnKey,int *RecNumber); int ReadNextKey(char *ReturnKey ,int *RecNumber); int ReadLastKey(short Index,char *ReturnK... |
| realisamdoc readfirst | ...ReadFirstKey... |
| realisamdoc readfirst | ...ReadFirstKey(int index,char *Key,int &recdata); db is a database pointer. ... |
| realisamdoc readfirst | ...ReadFirstKey(0,RetKey,&recdata); while (rc) { rc=db->ReadRecord(buffer,recdata); // processs the record ............................. rc=db->ReadNextKey(RetKey,&recdata); // rc = 0 if end of file (last key of index) } ................... ... |
| realisamdoc readfirst | ...ReadFirstKey(0,RetKey,&recdata); if (rc) // key found { rc = db->ReadRecord(buffer,recdata); buffer[rc]=0; ............. } else ............ // another example : sequential reading of a file rc = db->ReadFirstKey(0,RetKey,&recdata); while (rc) { rc=db->Re... |
| realisamdoc readnext | ...Read the next key in the current index . This function is generally used after a call to ReadFirstKey or un ReadDirectKey. The index is not specified in the call. ... |
| realisamdoc readnext | ...ReadFirstKey(0,ReturnKey,&recdata); while (rc) { rc=db->ReadRecord(buffer,recdata); // process buffer ................ rc =db->ReadNextKey(ReturnKey,&recdata); } ................. ... |
| readlastkey |  |
| example last | ...ReadLastKey(INDEX,RetKey,&recdata); RK->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); } } //---------------... |
| index_summary item15 | ...ReadlastKey... |
| realisamdoc include | ...ey,int RecNumber); int ReadFirstKey(short Index,char *ReturnKey,int *RecNumber); int ReadNextKey(char *ReturnKey ,int *RecNumber); int ReadLastKey(short Index,char *ReturnKey,int *RecNumber); int ReadPrevKey(char *ReturnKey ,int *RecNumber); int ReadDirectKey(short Index,char *Key, c... |
| realisamdoc readlast | ...ReadLastKey... |
| realisamdoc readlast | ...ReadLastkey(int Index,char *Key,int &recdata); db is a database pointer. ... |
| realisamdoc readlast | ...ReadLastKey(0,RetKey,&recdata); if (rc) // ok : key is found { rc = db->ReadRecord(buffer,recdata); buffer[rc]=0; ............. } else ............ ... |
| readnextkey |  |
| example backup | ...ReadNextKey(RetKey,&recdata); Application->ProcessMessages(); } fclose(fp); StatusBar1->SimpleText = "Number of Keys: " + AnsiString(nbisam); lRecords->Caption = AnsiString(nbseq); lKeys->Caption = AnsiString(nbisam); gettime(&t); nbsec2 = t.ti_hour*3600+t.ti_min*60 + t.t... |
| example duplicate | ...ReadNextKey(RetKey,&recdata); } dupli->CloseEngine(); First(); Screen->Cursor = oldCursor; EnableButtons(); Application->MessageBoxA("Duplication Finished","RealIsam",MB_OK); } //--------------------------------------------------------------------------- ... |
| example next | ...ReadNextKey(RetKey,&recdata); RK->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); } } //--------------------... |
| index_summary item16 | ...ReadNextkey... |
| realisamdoc include | ...,int RecNumber); int DeleteKey(short Index,char *Key,int RecNumber); int ReadFirstKey(short Index,char *ReturnKey,int *RecNumber); int ReadNextKey(char *ReturnKey ,int *RecNumber); int ReadLastKey(short Index,char *ReturnKey,int *RecNumber); int ReadPrevKey(char *ReturnKey ,int *RecN... |
| realisamdoc readfirst | ...ReadNextKey(RetKey,&recdata); // rc = 0 if end of file (last key of index) } ................... ... |
| realisamdoc readnext | ...ReadNextKey(char *Key, int &recdata); db is a database pointer. ... |
| realisamdoc readnext | ...ReadNextKey... |
| realisamdoc readnext | ...ReadNextKey(ReturnKey,&recdata); } ................. ... |
| readprevkey |  |
| example prev | ...ReadPrevKey(RetKey,&recdata); RK->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); } } //---------------------... |
| index_summary item17 | ...ReadPrevKey... |
| realisamdoc include | ...ey,int *RecNumber); int ReadNextKey(char *ReturnKey ,int *RecNumber); int ReadLastKey(short Index,char *ReturnKey,int *RecNumber); int ReadPrevKey(char *ReturnKey ,int *RecNumber); int ReadDirectKey(short Index,char *Key, char *ReturnKey, int *RecNumber); int NumberOfKeys(short Index... |
| realisamdoc readprev | ...ReadPrevKey... |
| realisamdoc readprev | ...ReadPrevKey(char *Key,int &recdata); db is a database pointer. ... |
| realisamdoc readprev | ...ReadPrevKey(ReturnKey,recdata); } ... |
| readrecord |  |
| example add | ...ReadRecord(str,recdata); strcat(str,"\r\n"); strcat(str,buffer); rc = dict->RewriteRecord(str, strlen(str)+1,recdata); } else { recdata=dict->GetNewRecordNumber(); rc = dict->WriteKey(INDEX,Key,recdata); rc = dict->WriteReco... |
| example backup | ...ReadRecord(buffer,recdata); if (rc) { nbisam++; if (multi==1) { strcpy(html,"<P><B>"); strcat(html,RetKey); strcat(html,"</B> (<I></I>) "); strcat(html,buffer); strcat(html,"</P>\n"); fputs... |
| example duplicate | ...ReadRecord(buffer,recdata); recdata_dupli=dupli->GetNewRecordNumber(); rc = dupli->WriteKey(INDEX,RetKey,recdata_dupli); rc = dupli->WriteRecord(buffer,strlen(buffer)+1); rc = dict->ReadNextKey(RetKey,&recdata); } dupli->CloseEngine(); First(); Screen->Cursor = ... |
| example first | ...ReadRecord(buffer,recdata); M_recdata=recdata; strcpy(M_Key,RetKey); if (rc) mWord->SetTextBuf(buffer); } } void __fastcall TMainForm::btFirstClick(TObject *Sender) { First(); } //--------------------------------------------------------------------------- ... |
| example last | ...ReadRecord(buffer,recdata); M_recdata=recdata; strcpy(M_Key,RetKey); if (rc) mWord->SetTextBuf(buffer); } } //--------------------------------------------------------------------------- ... |
| example next | ...ReadRecord(buffer,recdata); M_recdata=recdata; strcpy(M_Key,RetKey); if (rc) mWord->SetTextBuf(buffer); } } //--------------------------------------------------------------------------- ... |
| example prev | ...ReadRecord(buffer,recdata); M_recdata=recdata; strcpy(M_Key,RetKey); if (rc) mWord->SetTextBuf(buffer); } } //--------------------------------------------------------------------------- ... |
| example search | ...ReadRecord(buffer,recdata); if (rc) { mWord->Clear(); mWord->SetTextBuf(buffer); } } else { mWord->SetTextBuf("Word Not Found"); } M_recdata=recdata; strcpy(M_Key,RetKey); } ... |
| index_summary item19 | ...ReadRecord... |
| realisamdoc include | ...); int WriteRecord(char *pdata,int len); int RewriteRecord(char *pdata,int len, int RecNumber); int DeleteRecord(int RecNumber); int ReadRecord(char *pdata,int RecNumber); int GetNewRecordNumber(); int WriteKey(short Index,char *Key,int RecNumber); int DeleteKey(short Index,cha... |
| 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 readfirst | ...ReadRecord(buffer,recdata); // processs the record ............................. rc=db->ReadNextKey(RetKey,&recdata); // rc = 0 if end of file (last key of index) } ................... ... |
| realisamdoc readlast | ...ReadRecord(buffer,recdata); buffer[rc]=0; ............. } else ............ ... |
| realisamdoc readnext | ...ReadRecord(buffer,recdata); // process buffer ................ rc =db->ReadNextKey(ReturnKey,&recdata); } ................. ... |
| realisamdoc readprev | ...ReadRecord(buffer,recdata); // process data here .................. rc=db->ReadPrevKey(ReturnKey,recdata); } ... |
| realisamdoc readrecord | ...e enough to receive the 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 t... |
| realisamdoc readrecord | ...ReadRecord(char *buffer,int recdata); db is a database pointer. ... |
| realisamdoc readrecord | ...ReadRecord(buffer,&recdata); buffer[rc]=0; // to end with a 0x00 .......................... } else ................ ... |
| realisamdoc readrecord | ...ReadRecord... |
| realisamdoc readrecord | ...sly, including binary data. For character strings stored without a 0x00 terminator, it is recommended to terminate the string with a 0 after the ReadRecord. ... |
| realisamdoc rewriterecord | ...ReadRecord(buffer,recdata); // rc is the record length and supposed to be less than 500 .... process data in buffer..... rc = db->RewriteRecord(buffer, strlen(buffer+1),recdata); } ... |
| recordlength |  |
| index_summary item23 | ...RecordLength... |
| realisamdoc include | ...urnKey ,int *RecNumber); int ReadDirectKey(short Index,char *Key, char *ReturnKey, int *RecNumber); int NumberOfKeys(short Index); int RecordLength(int RecNumber); int Version(char *p); int GetIndexMode(int ndx); int DeleteIsam(char *indexname,char *dataname); int CloseReopen(c... |
| realisamdoc readrecord | ...ceiving 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. ReadRecord restores the entire data written previously, including binary data. For cha... |
| realisamdoc recordlength | ...RecordLength(int recdata) db is a database pointer. ... |
| realisamdoc recordlength | ...RecordLength... |
| realisamdoc recordlength | ...RecordLength(recdata); if (len) { buffer = malloc(len+2); .... } else { ... empty ...} } .......... ... |
| rewriterecord |  |
| 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 update | ...RewriteRecord(buffer, strlen(buffer)+1,M_recdata); StatusBar1->SimpleText="Entry Updated"; } //--------------------------------------------------------------------------- ... |
| index_summary item21 | ...RewriteRecord... |
| realisamdoc include | ...char *ndx, char*dat); int CloseEngine(void); int SetIndexMode(short Index, short Value); int WriteRecord(char *pdata,int len); int RewriteRecord(char *pdata,int len, int RecNumber); int DeleteRecord(int RecNumber); int ReadRecord(char *pdata,int RecNumber); int GetNewRecordNumb... |
| realisamdoc rewriterecord | ...RewriteRecord... |
| realisamdoc rewriterecord | ...RewriteRecord(char *buffer, int len, int recdata); db is a database pointer. ... |
| realisamdoc rewriterecord | ...RewriteRecord(buffer, strlen(buffer+1),recdata); } ... |
| setindexmode |  |
| example duplicate | ...SetIndexMode(INDEX,multi); // if MULTI == 1 duplicate key allowed // nbrecords=0; nbseq=0; nbisam=0; rc = dict->ReadFirstKey(INDEX,RetKey,&recdata); while (rc) { rc=dict->ReadRecord(buffer,recdata); recdata_dupli=dupli->GetNewRecordNumber(); rc = dupli->WriteKey(INDEX,Re... |
| example restore | ...SetIndexMode(INDEX,multi); // if MULTI == 1 duplicate key allowed rc = dict->SetIndexMode(INDEX+1,multi); nbrecords=0; strcpy(name,dict_directory);strcat(name,"dict.txt"); fp = fopen(name,"r"); if (!fp) {Application->MessageBoxA("File DICT.txt not Found","File Not Found",MB_OK); ... |
| example restore | ...SetIndexMode(INDEX+1,multi); nbrecords=0; strcpy(name,dict_directory);strcat(name,"dict.txt"); fp = fopen(name,"r"); if (!fp) {Application->MessageBoxA("File DICT.txt not Found","File Not Found",MB_OK); EnableButtons(); Screen->Cursor = oldCursor; ... |
| example start | ...SetIndexMode(INDEX,multi); // if MULTI == 1 duplicate key allowed rc = dict->SetIndexMode(INDEX+1,multi); nbrecords=0; // read contents of the 1-26 HTML Files (in alphabetic reverse order, just for fun) for (i=nbf;i>=0;i--) // for (i=0;i... |
| example start | ...SetIndexMode(INDEX+1,multi); nbrecords=0; // read contents of the 1-26 HTML Files (in alphabetic reverse order, just for fun) for (i=nbf;i>=0;i--) // for (i=0;i... |
| example start | ...SetIndexMode(INDEX,multi); rc = dict->SetIndexMode(INDEX+1,multi); } StatusBar1->SimpleText = ""; First(); Screen->Cursor = oldCursor; Beep(); EnableButtons(); Application->MessageBoxA("Indexation Finished","RealIsam",MB_OK); } //----------------------------------------... |
| example start | ...SetIndexMode(INDEX+1,multi); } StatusBar1->SimpleText = ""; First(); Screen->Cursor = oldCursor; Beep(); EnableButtons(); Application->MessageBoxA("Indexation Finished","RealIsam",MB_OK); } //--------------------------------------------------------------------------- ... |
| index_summary item9 | ...SetIndexMode... |
| realisamdoc getnew | ...SetIndexMode(0,UNIQUE_KEY); strcpy(key,"doc30134"); recdata = db1->GetNewRecordNumber(); rc = db1->WriteKey(0,key,recdata); // index 0 if (!rc) { error / duplicate key... } else |