| ram |  |
| example stat | ...These measures were conducted using a desktop PC, under Windows XP-SP2, processor AMD Athlon XP 2800 (2.0 Ghz), RAM 512 MB, Hard Drive 120 GBytes. Values can vary depending on the PC characteristics. ... |
| rc |  |
| example add | ...GetTextBuf(buffer,BUF_LEN); rc = dict->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); ... |
| 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 | ... void __fastcall TMainForm::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; ... |
| 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 | ...GetNewRecordNumber(); rc = dict->WriteKey(INDEX,Key,recdata); rc = dict->WriteRecord(buffer,strlen(buffer)+1); } StatusBar1->SimpleText="Entry Added"; } //--------------------------------------------------------------------------- ... |
| example add | ...WriteKey(INDEX,Key,recdata); rc = dict->WriteRecord(buffer,strlen(buffer)+1); } StatusBar1->SimpleText="Entry Added"; } //--------------------------------------------------------------------------- ... |
| example add | ...X,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(str)+1,recdata); ... |
| 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 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 backup | ... void __fastcall TMainForm::btBackupClick(TObject *Sender) { int rc,recdata; char Key[MAX_KEY],RetKey[MAX_KEY]; char buffer[BUF_LEN]; char html[BUF_LEN]; char definition[BUF_LEN]; int nbseq,nbisam; struct time t; int nbsec1,nbsec2; TCursor oldCursor = Screen->Cursor; char tmp[250]; c... |
| example backup | ...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) Application->MessageBoxA(RetKey,"Key Length > 30",MB_OK); rc=dict->ReadRecord(buffe... |
| 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 backup | ... 30",MB_OK); rc=dict->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... |
| 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 backup | ... strcat(html,p1); strcat(html,"</P>\n"); fputs(html,fp); nbseq++; } } rc=dict->ReadNextKey(RetKey,&recdata); Application->ProcessMessages(); } fclose(fp); StatusBar1->SimpleText = "Number of Keys: " + Ansi... |
| example delete | ... void __fastcall TMainForm::btDeleteClick(TObject *Sender) { int rc; rc=dict->DeleteKey(INDEX,M_Key,M_recdata); rc=dict->DeleteRecord(M_recdata); First(); StatusBar1->SimpleText="Entry Deleted"; } //--------------------------------------------------------------------------- ... |
| example delete | ... void __fastcall TMainForm::btDeleteClick(TObject *Sender) { int rc; rc=dict->DeleteKey(INDEX,M_Key,M_recdata); rc=dict->DeleteRecord(M_recdata); First(); StatusBar1->SimpleText="Entry Deleted"; } //--------------------------------------------------------------------------- ... |
| example delete | ...DeleteKey(INDEX,M_Key,M_recdata); rc=dict->DeleteRecord(M_recdata); First(); StatusBar1->SimpleText="Entry Deleted"; } //--------------------------------------------------------------------------- ... |
| example duplicate | ... void __fastcall TMainForm::btDuplClick(TObject *Sender) { char name[MAX_PATH]; int rc, recdata,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 ... |
| example duplicate | ...Cursor; strcpy(name,dict_directory);strcat(name,"dupli.ndx"); rc = unlink (name); strcpy(name,dict_directory);strcat(name,"dupli.dat"); rc =unlink (name); Screen->Cursor = crHourGlass; DisableButtons(); strcpy(name,dict_directory);strcat(name,"dupli"); rc = dupli->OpenEngine(nam... |
| example duplicate | ...Cursor = crHourGlass; DisableButtons(); strcpy(name,dict_directory);strcat(name,"dupli"); rc = dupli->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->ReadF... |
| example duplicate | ...Cursor; strcpy(name,dict_directory);strcat(name,"dupli.ndx"); rc = unlink (name); strcpy(name,dict_directory);strcat(name,"dupli.dat"); rc =unlink (name); Screen->Cursor = crHourGlass; DisableButtons(); strcpy(name,dict_directory);strcat(name,"dupli"); rc = dupli->OpenEngine(nam... |
| 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... |
| 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 | ...WriteRecord(buffer,strlen(buffer)+1); rc = dict->ReadNextKey(RetKey,&recdata); } dupli->CloseEngine(); First(); Screen->Cursor = oldCursor; EnableButtons(); Application->MessageBoxA("Duplication Finished","RealIsam",MB_OK); } //---------------------------------------------... |
| 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 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 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 | ...Clear(); rc = dict->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 __fast... |
| example first | ...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 first | ...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 first | ...ReadRecord(buffer,recdata); M_recdata=recdata; strcpy(M_Key,RetKey); if (rc) mWord->SetTextBuf(buffer); } } void __fastcall TMainForm::btFirstClick(TObject *Sender) { First(); } //--------------------------------------------------------------------------- ... |
| example formcreate | ...///////////////////////////////////////////////// void __fastcall TMainForm::FormCreate(TObject *Sender) { char name[250]; AnsiString Dir; int rc; int mode; char tmp[100]; Dir = GetCurrentDir(); strcpy(base_directory,Dir.c_str()); strcpy(dict_directory,base_directory); strcat(dict_d... |
| example formcreate | ...Caption = "Alpes Software - " + AnsiString(tmp); // Get Number of Keys rc = dict->NumberOfKeys(INDEX); lKeys->Caption = AnsiString(rc); if (rc) First(); } //--------------------------------------------------------------------------- ... |
| example formcreate | ... // 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 - 8 multi = dict->GetIndexMode(INDEX); if (multi==0) cb->Checked==false; else cb->Chec... |
| example formcreate | ...Caption = AnsiString(rc); if (rc) First(); } //--------------------------------------------------------------------------- ... |
| example formcreate | ...Caption = AnsiString(rc); if (rc) First(); } //--------------------------------------------------------------------------- ... |
| example indexbuffer | ...nt __fastcall TMainForm::IndexBuffer(char *buff) { char str[BUF_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 ... |
| example last | ... void __fastcall TMainForm::btLastClick(TObject *Sender) { int rc,recdata; char Key[MAX_KEY],RetKey[MAX_KEY]; char buffer[BUF_LEN]; rc = dict->ReadLastKey(INDEX,RetKey,&recdata); RK->Caption=AnsiString(RetKey); eWord->Text=AnsiString(RetKey); if (rc==1) { mWord->Clear(); ... |
| example last | ...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 last | ...Clear(); rc=dict->ReadRecord(buffer,recdata); M_recdata=recdata; strcpy(M_Key,RetKey); if (rc) mWord->SetTextBuf(buffer); } } //--------------------------------------------------------------------------- ... |
| example last | ...ReadRecord(buffer,recdata); M_recdata=recdata; strcpy(M_Key,RetKey); if (rc) mWord->SetTextBuf(buffer); } } //--------------------------------------------------------------------------- ... |
| example last | ... void __fastcall TMainForm::btLastClick(TObject *Sender) { int rc,recdata; char Key[MAX_KEY],RetKey[MAX_KEY]; char buffer[BUF_LEN]; rc = dict->ReadLastKey(INDEX,RetKey,&recdata); RK->Caption=AnsiString(RetKey); eWord->Text=AnsiString(RetKey); if (rc==1) { mWord->Clear(); ... |
| example next | ... void __fastcall TMainForm::btNextClick(TObject *Sender) { int rc,recdata; char Key[MAX_KEY],RetKey[MAX_KEY]; char buffer[BUF_LEN]; rc = dict->ReadNextKey(RetKey,&recdata); RK->Caption=AnsiString(RetKey); eWord->Text=AnsiString(RetKey); if (rc==1) { mWord->Clear(); ... |
| example next | ... void __fastcall TMainForm::btNextClick(TObject *Sender) { int rc,recdata; char Key[MAX_KEY],RetKey[MAX_KEY]; char buffer[BUF_LEN]; rc = dict->ReadNextKey(RetKey,&recdata); RK->Caption=AnsiString(RetKey); eWord->Text=AnsiString(RetKey); if (rc==1) { mWord->Clear(); ... |
| example next | ...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 | ...Clear(); rc=dict->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 | ...Clear(); rc=dict->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 prev | ... void __fastcall TMainForm::btPrevClick(TObject *Sender) { int rc,recdata; char Key[MAX_KEY],RetKey[MAX_KEY]; char buffer[BUF_LEN]; rc = dict->ReadPrevKey(RetKey,&recdata); RK->Caption=AnsiString(RetKey); eWord->Text=AnsiString(RetKey); if (rc==1) { mWord->Clear(); rc... |
| example prev | ... void __fastcall TMainForm::btPrevClick(TObject *Sender) { int rc,recdata; char Key[MAX_KEY],RetKey[MAX_KEY]; char buffer[BUF_LEN]; rc = dict->ReadPrevKey(RetKey,&recdata); RK->Caption=AnsiString(RetKey); eWord->Text=AnsiString(RetKey); if (rc==1) { mWord->Clear(); rc... |
| example prev | ...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 | ...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 restore | ... void __fastcall TMainForm::btRestoreClick(TObject *Sender) { char tmp[250]; char name[250]; FILE *fp; int rc,nbisam; char buffer[BUF_LEN]; struct time t; int nbsec1,nbsec2; strcpy(tmp,"Restore Data from Dict.txt ? \r\n Isam Files will be deleted, and rebuilt"); if (Application-... |
| example restore | ...dex 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 allowed rc = d... |
| 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 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 | ...ete 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); nbsec1 = t.ti_hour*3600... |
| example search | ...r) { 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... |
| example search | ...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) { mWord->Clear(); mWord->SetTextBuf(buffer); ... |
| example search | ...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; strcpy(M_Key,RetKey); } ... |
| example search | ...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; strcpy(M_Key,RetKey); } ... |
| 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); } ... |
| example start | ... void __fastcall TMainForm::btStartClick(TObject *Sender) { char tmp[250]; char name[250]; char html[250]; int i; FILE *fp; int rc; char buffer[BUF_LEN]; struct time t; int nbsec1,nbsec2; int hund1,hund2; int nbf; int K; TCursor oldCursor = Screen->Cursor; if (cb->Checked==tr... |
| example start | ...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 = ""; lKeys->Captio... |
| example start | ...MessageBoxA(tmp,"Isam Dictionary",MB_YESNO)==IDNO) return; rc=dict->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;... |
| 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... |
| 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--... |
| 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 | ...*3600+t.ti_min*60 + t.ti_sec; hund1 = nbsec1*100 + t.ti_hund; // 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 allowed rc = d... |
| 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"... |
| 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 | ...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,multi); } StatusBar1->SimpleText = ""; First(); Screen->Cursor = old... |
| example update | ... void __fastcall TMainForm::btUpdateClick(TObject *Sender) { char buffer[BUF_LEN]; int rc; // M_recdata is supposed to store the address of the data record mWord->GetTextBuf(buffer,BUF_LEN); rc = dict->RewriteRecord(buffer, strlen(buffer)+1,M_recdata); StatusBar1->SimpleText="Entry U... |
| example update | ...GetTextBuf(buffer,BUF_LEN); rc = dict->RewriteRecord(buffer, strlen(buffer)+1,M_recdata); StatusBar1->SimpleText="Entry Updated"; } //--------------------------------------------------------------------------- ... |
| realisamdoc close | ... rc=db->CloseEngine(); db is the database pointer. ... |
| 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 close | ... 512 !! if (!rc) { error db2 ... } // end proceesing rc = db1->CloseEngine(); rc = db2->CloseEngine(); ... |
| realisamdoc close | ... 512 !! if (!rc) { error db2 ... } // end proceesing rc = db1->CloseEngine(); rc = db2->CloseEngine(); ... |
| realisamdoc close | ...CloseEngine(); rc = db2->CloseEngine(); ... |
| realisamdoc close | ......... //APPLIC.CPP // constructor or setup ................ db1 = new realisam(); db2 = new realisam(); ................ // routine int rc; rc = db1->OpenEngine("htmlfile",248,"ndx","dat"); // 248 + 8 => 256 ! if (!rc) { error db1 .... } rc = db2->OpenEngine("scripts",504,,"... |
| realisamdoc close | ... //APPLIC.CPP // constructor or setup ................ db1 = new realisam(); db2 = new realisam(); ................ // routine int rc; rc = db1->OpenEngine("htmlfile",248,"ndx","dat"); // 248 + 8 => 256 ! if (!rc) { error db1 .... } rc = db2->OpenEngine("scripts",504,,"ndx","d... |
| 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 | ... realisam *db; .................. //APPLIC.CPP // constructor ............... db = new realisam(); ................ // procedure int rc; ............... rc=db->CloseReopen("Samples",248,"ndx","dat"); ... |
| realisamdoc closereopen | ............... //APPLIC.CPP // constructor ............... db = new realisam(); ................ // procedure int rc; ............... rc=db->CloseReopen("Samples",248,"ndx","dat"); ... |
| realisamdoc closereopen | ...rc = db->CloseReopen("c:\\Samples,248,"ndx","dat"); ... |
| realisamdoc deleteisam | ...rc = db->DeleteIsam(char *indexname, char *dataname); ... |
| realisamdoc deletekey | ...rc = 1 : Correct ... |
| realisamdoc deletekey | ...rc = 0 : error : Key not found ... |
| realisamdoc deletekey | ...rc = -1 : key length > 250 characters. ... |
| realisamdoc deletekey | ...rc = -2 : index ... |
| realisamdoc deletekey | ...alisam.h" ................... realisam *db; .................. //APPLIC.CPP // constructor ................ db = new realisam(); id (db) rc=db->OpenEngine("Applic",504,"ndx","dat"); ................ // end of procedure db->CloseEngine(); ....................... ................. |
| realisamdoc deletekey | ...int rc = db->DeleteKey(int Index,char *Key,int recdata); db is a database pointer. ... |
| realisamdoc deletekey | ...DeleteKey(1,"microsoft"); rc=db->DeleteRecord(recdata); } else .............. ... |
| 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 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 deletekey | ...ReadDirectKey(1,"microsoft",ReturnKey,&recdata); if (rc) { rc=db->DeleteKey(1,"microsoft"); rc=db->DeleteRecord(recdata); } else .............. ... |
| realisamdoc deletekey | ...ReadDirectKey(1,"microsoft",ReturnKey,&recdata); if (rc) { rc=db->DeleteKey(1,"microsoft"); rc=db->DeleteRecord(recdata); } else .............. ... |
| realisamdoc deleterecord | ...int rc = db->DeleteRecord(int recnum); db is a database pointer. ... |
| realisamdoc deleterecord | ...rc = 1 : Correct ... |
| realisamdoc deleterecord | ...rc = 0 : Error (data number incorrect or ... |
| realisamdoc deleterecord | ...realisam *db; .................. //APPLIC.CPP // constructor ................ db = new realisam(); ................ // procedure int rc; int recdata; char RetKey[100]; rc = db->ReadDirectKey(0,"microsoft",RetKey,&recdata); if (rc) rc = db->DeleteRecord(&recdata); ........... |
| realisamdoc deleterecord | .../APPLIC.CPP // constructor ................ db = new realisam(); ................ // procedure int rc; int recdata; char RetKey[100]; rc = db->ReadDirectKey(0,"microsoft",RetKey,&recdata); if (rc) rc = db->DeleteRecord(&recdata); ................. ... |
| realisamdoc deleterecord | ...ReadDirectKey(0,"microsoft",RetKey,&recdata); if (rc) rc = db->DeleteRecord(&recdata); ................. ... |
| realisamdoc deleterecord | ...ReadDirectKey(0,"microsoft",RetKey,&recdata); if (rc) rc = db->DeleteRecord(&recdata); ................. ... |
| realisamdoc getnew | ... //APPLIC.CPP // constructor ................ db = new realisam(); ................ // procedure int rc; int recdata; char key[30]; rc = db1->OpenEngine("htmlfile",248,"ndx","dat"); // 248 + 8 => 256 ! if (!rc) { error db1 .... } rc = db1->SetIndexMode(0,UNIQUE_KEY); strcp... |
| 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 | ... 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 | ...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 | ... realisam *db; .................. //APPLIC.CPP // constructor ................ db = new realisam(); ................ // procedure int rc; int recdata; char key[30]; rc = db1->OpenEngine("htmlfile",248,"ndx","dat"); // 248 + 8 => 256 ! if (!rc) { error db1 .... } rc = db1->... |
| 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 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 getnew | ...WriteRecord(buffer,strlen(buffer)); .............. } ................. // end rc = db1->CloseEngine(); rc = db2->CloseEngine(); ... |
| realisamdoc getnew | ...CloseEngine(); rc = db2->CloseEngine(); ... |
| realisamdoc number | ...; .................. //APPLIC.CPP // constructor or setup ................ db = new realisam(); ................ // procedure int nb,rc,recdata; char Key[10]; .......... nb = db->NumberOfKeys(0); // for index 0 sprintf(Key,"%07d",nb+1000); recdata =db->GetNewRecordNumber(); ... |
| realisamdoc number | ...GetNewRecordNumber(); rc = db->WriteKey(0,Key,recdata); if (rc) db->WriteRecord(buffer,strlen(buffer)+1); .............. ... |
| realisamdoc number | ...WriteKey(0,Key,recdata); if (rc) db->WriteRecord(buffer,strlen(buffer)+1); .............. ... |
| realisamdoc open | ...APPLIC.CPP // constructor or setup ................ db1 = new realisam(); db2 = new realisam(); ................ // your routine .... int rc; rc = db1->OpenEngine("htmlfile",248,"ndx","dat"); // 248 + 8 => 256 ! if (!rc) { error db1 .... } rc = db2->OpenEngine("scripts",504,"n... |
| realisamdoc open | ...CPP // constructor or setup ................ db1 = new realisam(); db2 = new realisam(); ................ // your routine .... int rc; rc = db1->OpenEngine("htmlfile",248,"ndx","dat"); // 248 + 8 => 256 ! if (!rc) { error db1 .... } rc = db2->OpenEngine("scripts",504,"ndx","da... |
| realisamdoc open | ... 256 ! if (!rc) { error db1 .... } rc = db2->OpenEngine("scripts",504,"ndx","dat"); // 504 + 8 ==> 512 !! if (!rc) { error db2 ... } ... |
| 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 readdirect | ... rc=db->ReadDirectkey(int Index,char *Key,char *ReturnKey, int &recdata) db is the database pointer. ... |
| realisamdoc readdirect | ... ................... realisam *db; .................. //APPLIC.CPP // constructor ................ db = new realisam(); ............... rc = db->OpenEngine("Applic",504,"ndx","dat"); ................ db->CloseEngine(); ....................... // procedure int rc; char Ret... |
| 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 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 readdirect | ...ReadDirectKey(0,"microsoft",RetKey,&recdata); if (rc) // ok : key found { rc = db->ReadRecord(buffer,recdata); buffer[rc]=0; ............. } else ............ ... |
| realisamdoc readdirect | ...ReadDirectKey(0,"microsoft",RetKey,&recdata); if (rc) // ok : key found { rc = db->ReadRecord(buffer,recdata); buffer[rc]=0; ............. } else ............ ... |
| 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 | ...dRecord(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 | ...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); 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 | ...ReadRecord(buffer,recdata); // processs the record ............................. rc=db->ReadNextKey(RetKey,&recdata); // rc = 0 if end of file (last key of index) } ................... ... |
| realisamdoc readfirst | ...ReadNextKey(RetKey,&recdata); // rc = 0 if end of file (last key of index) } ................... ... |
| realisamdoc readfirst | ...rc = db->ReadFirstKey(int index,char *Key,int &recdata); db is a database pointer. ... |
| realisamdoc readfirst | ................. realisam *db; .................. //APPLIC.CPP // constructor or setup ................ db = new realisam(); ............... rc = db->OpenEngine("Applic",504,"ndx","dat"); ................ db->CloseEngine(); ....................... // procedure int rc; char RetKe... |
| 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 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 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 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 readlast | ...rc = 0 : error or index empty ... |
| realisamdoc readlast | ...rc = -1 : key length > 99 characters ... |
| realisamdoc readlast | ...rc = -2 : index number > 63 or ... |
| realisamdoc readlast | ...h" ................... realisam *db; .................. //APPLIC.CPP // constructor ................ db = new realisam(); ............... rc = db->OpenEngine("Applic",504,"ndx","dat"); ................ db->CloseEngine(); ....................... // procedure int rc; char Ret... |
| realisamdoc readlast | ...int rc = db->ReadLastkey(int Index,char *Key,int &recdata); db is a database pointer. ... |
| realisamdoc readlast | ...rc = 1 : correct (key found, index not empty) ... |
| 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 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 readlast | ...ReadLastKey(0,RetKey,&recdata); if (rc) // ok : key is found { rc = db->ReadRecord(buffer,recdata); buffer[rc]=0; ............. } else ............ ... |
| realisamdoc readlast | ...ReadLastKey(0,RetKey,&recdata); if (rc) // ok : key is found { rc = db->ReadRecord(buffer,recdata); buffer[rc]=0; ............. } else ............ ... |
| realisamdoc readlast | ...ReadRecord(buffer,recdata); buffer[rc]=0; ............. } else ............ ... |
| realisamdoc readnext | ...int rc = db->ReadNextKey(char *Key, int &recdata); db is a database pointer. ... |
| realisamdoc readnext | ...rc = 1 : correct ... |
| realisamdoc readnext | ...rc = 0 : error or empty index, or over end of the index ... |
| realisamdoc readnext | ...rc = -1 : key length incorrect (> 250 char) ... |
| realisamdoc readnext | ...ngine(); ....................... ................. // 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 readnext | ...ReadFirstKey(0,ReturnKey,&recdata); while (rc) { rc=db->ReadRecord(buffer,recdata); // process buffer ................ rc =db->ReadNextKey(ReturnKey,&recdata); } ................. ... |
| realisamdoc readnext | ...ReadFirstKey(0,ReturnKey,&recdata); while (rc) { rc=db->ReadRecord(buffer,recdata); // process buffer ................ rc =db->ReadNextKey(ReturnKey,&recdata); } ................. ... |
| realisamdoc readnext | ...ReadRecord(buffer,recdata); // process buffer ................ rc =db->ReadNextKey(ReturnKey,&recdata); } ................. ... |
| realisamdoc readnext | ... ................... 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 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 | ...int rc = db->ReadPrevKey(char *Key,int &recdata); db is a database pointer. ... |
| 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 | ...... // 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,recdata); // process data here .................. ... |
| realisamdoc readprev | ...ReadLast(0,ReturnKey,&recdata); while (rc) { rc = db->ReadRecord(buffer,recdata); // process data here .................. rc=db->ReadPrevKey(ReturnKey,recdata); } ... |
| realisamdoc readprev | ...ReadLast(0,ReturnKey,&recdata); while (rc) { rc = db->ReadRecord(buffer,recdata); // process data here .................. rc=db->ReadPrevKey(ReturnKey,recdata); } ... |
| realisamdoc readprev | ...rc = 1 : correct ... |
| realisamdoc readprev | ...rc = 0 : error or empty index, or under first key ... |
| realisamdoc readprev | ...rc = -1 : key length incorrect (> 99 char) ... |
| realisamdoc readprev | ...m.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 readprev | ...ReadRecord(buffer,recdata); // process data here .................. rc=db->ReadPrevKey(ReturnKey,recdata); } ... |
| realisamdoc readrecord | ...*db; .................. //APPLIC.CPP // constructor or setup ................ db = new realisam(); ................ // procedure int rc; int recdata; char ReturnKey[100]; char *buffer; buffer = mem_alloc(10000); if (!buffer) return -1; rc = db->ReadDirectKey(0,"microsoft",... |
| realisamdoc readrecord | ............... // procedure int rc; int recdata; char ReturnKey[100]; char *buffer; buffer = mem_alloc(10000); if (!buffer) return -1; rc = db->ReadDirectKey(0,"microsoft",ReturnKey,&recdata); if (rc) { rc=db->ReadRecord(buffer,&recdata); buffer[rc]=0; // to end with a 0x0... |
| realisamdoc readrecord | ...ReadDirectKey(0,"microsoft",ReturnKey,&recdata); if (rc) { rc=db->ReadRecord(buffer,&recdata); buffer[rc]=0; // to end with a 0x00 .......................... } else ................ ... |
| realisamdoc readrecord | ...ReadDirectKey(0,"microsoft",ReturnKey,&recdata); if (rc) { rc=db->ReadRecord(buffer,&recdata); buffer[rc]=0; // to end with a 0x00 .......................... } else ................ ... |
| realisamdoc readrecord | ...ReadRecord(buffer,&recdata); buffer[rc]=0; // to end with a 0x00 .......................... } else ................ ... |
| realisamdoc recordlength | ...*db; .................. //APPLIC.CPP // constructor or setup ................ db = new realisam(); ................ // procedure int rc,len; int recdata; char RetKey[100]; rc = db->ReadDirectKey(0,"microsoft",RetKey,&recdata); if (rc) // success { len = db->RecordLengt... |
| realisamdoc recordlength | ...// constructor or setup ................ db = new realisam(); ................ // procedure int rc,len; int recdata; char RetKey[100]; rc = db->ReadDirectKey(0,"microsoft",RetKey,&recdata); if (rc) // success { len = db->RecordLength(recdata); if (len) { buffer = m... |
| realisamdoc recordlength | ...ReadDirectKey(0,"microsoft",RetKey,&recdata); if (rc) // success { len = db->RecordLength(recdata); if (len) { buffer = malloc(len+2); .... } else { ... empty ...} } .......... ... |
| realisamdoc rewriterecord | ...rc = 1 : correct ... |
| realisamdoc rewriterecord | ...rc = 0 : error ... |
| realisamdoc rewriterecord | ...*db; .................. //APPLIC.CPP // constructor or setup ................ db = new realisam(); ................ // procedure int rc; char buffer [500]; int recdata; char RetKey[100]; // read data rc = db->ReadDirectKey(0,"microbiology",RetKey,&recdata); if (rc) //ok {... |
| realisamdoc rewriterecord | ...int rc = db->RewriteRecord(char *buffer, int len, int recdata); db is a database pointer. ... |
| realisamdoc rewriterecord | .............. db = new realisam(); ................ // procedure int rc; char buffer [500]; int recdata; char RetKey[100]; // read data rc = db->ReadDirectKey(0,"microbiology",RetKey,&recdata); if (rc) //ok { rc = db->ReadRecord(buffer,recdata); // rc is the record length a... |
| 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); } ... |
| 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); } ... |
| 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); } ... |
| 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); } ... |
| realisamdoc setindex | ... rc=db->SetIndexMode(int Index, int Value); db is a database pointer. ... |
| realisamdoc setindex | ...SetIndexMode(0,UNIQUE_KEYS); if (!rc) { error db2 ... } // End rc = db1->CloseEngine(); rc = db2->CloseEngine(); ... |
| realisamdoc setindex | ...SetIndexMode(0,UNIQUE_KEYS); if (!rc) { error db2 ... } // End rc = db1->CloseEngine(); rc = db2->CloseEngine(); ... |
| realisamdoc setindex | ...CloseEngine(); rc = db2->CloseEngine(); ... |
| realisamdoc setindex | ... #define UNIQUE_KEYS 0 #define DUPLICATE_KEYS 1 db1 = new realisam(); db2 = new realisam(); ................ // Routine int rc; rc = db1->OpenEngine("htmlfile",248,"ndx","dat"); // 248 + 8 => 256 ! if (!rc) { error db1 .... } rc = db1->SetIndexMode(0,UNIQUE_KEYS); ... |
| realisamdoc setindex | ...ine UNIQUE_KEYS 0 #define DUPLICATE_KEYS 1 db1 = new realisam(); db2 = new realisam(); ................ // Routine int rc; rc = db1->OpenEngine("htmlfile",248,"ndx","dat"); // 248 + 8 => 256 ! if (!rc) { error db1 .... } rc = db1->SetIndexMode(0,UNIQUE_KEYS); rc = d... |
| 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 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 setindex | ...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->CloseEngine(); rc = db2->CloseEngine(); ... |
| realisamdoc setindex | ...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->CloseEngine(); rc = db2->CloseEngine(); ... |
| realisamdoc setindex | ... 512 !! rc = db2->SetIndexMode(0,UNIQUE_KEYS); if (!rc) { error db2 ... } // End rc = db1->CloseEngine(); rc = db2->CloseEngine(); ... |
| realisamdoc writekey | ... rc=db->WriteKey(int Index, char *key, int recdata); db is a pointer on the database. ... |
| realisamdoc writekey | ................ #define UNIQUE 0 #define DUPLICATE 1 db1 = new realisam(); db2 = new realisam(); ................ // Routine int rc; int recdata; char key[30]; rc = db1->OpenEngine("htmlfile",248,"ndx","dat"); // 248 + 8 => 256 ! if (!rc) { error db1 .... } rc = db1->... |
| realisamdoc writekey | ... 0 #define DUPLICATE 1 db1 = new realisam(); db2 = new realisam(); ................ // Routine int rc; int recdata; char key[30]; rc = db1->OpenEngine("htmlfile",248,"ndx","dat"); // 248 + 8 => 256 ! if (!rc) { error db1 .... } rc = db1->SetIndexMode(0,UNIQUE); rc = db1->S... |
| 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 | ... 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 | ...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->GetNewRecordNumber(); rc = db1->WriteKey(0,key,rec... |
| 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 | ...CloseEngine(); rc = db2->CloseEngine(); ... |
| 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 (!... |
| realisamdoc writekey | ... 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 = db1->WriteKey(1,"politics",recdata); // on index 1 , dup... |
| 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... |
| 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 | ...GetNewRecordNumber(); rc = db->WriteKey(0,"microsoft",recdata); if (rc) // key insert ok { db->WriteRecord(buffer,strlen(buffer)+1); ....... } else ............. ... |
| realisamdoc writerecord | ...WriteKey(0,"microsoft",recdata); if (rc) // key insert ok { db->WriteRecord(buffer,strlen(buffer)+1); ....... } else ............. ... |
| realisamdoc writerecord | ... ................... realisam *db; .................. //APPLIC.CPP // constructor ................ db = new realisam(); ............... rc = db->OpenEngine("Applic",504,"ndx","dat"); ................ db->CloseEngine(); ....................... // procedure int rc; char RetKe... |
| 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... |
| read |  |
| example principle | ...Sequential read after direct read : you can read next or read previous from this location ... |
| example principle | ...Sequential read after direct read : you can read next or read previous from this location ... |
| example principle | ...Sequential read after direct read : you can read next or read previous from this location ... |
| example principle | ...Sequential read after direct read : you can read next or read previous from this location ... |
| example principle | ...Backup database : Sequential read of the database and save the content in the dict.txt file ... |
| example restore | ...Cursor = oldCursor; return; } nbrecords=0; nbisam=0; // read sequential data while (!feof(fp)) { buffer[0]=0; fgets(buffer,BUF_LEN,fp); if (strlen(buffer)>0) { nbisam++; IndexBuffer(buffer); } else nbrecords=nbrecords; ... |
| 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 | ...Cursor = oldCursor; return; } // read sequential data while (!feof(fp)) { tmp[0]=0; fgets(buffer,BUF_LEN,fp); // IndexBuffer(buffer); Application->ProcessMessages(); } fclose(fp); } int nbk = dict->NumberOfKeys(INDEX)... |
| example stat | ... Read/Write operations per second, each operation includes the following actions: ... |
| 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 | ...read the first key on a specified. This function allows to start to read the first key of a specified index. ... |
| realisamdoc readlast | ... Read the last key of a specified 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 readprev | ...Read the previous key in the current index ... |
| 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 | ...recdata is a 32 bit integer related to the data record to read. ... |
| realisamdoc readrecord | ... Read 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. ReadRec... |
| realisamdoc readrecord | ...recdata : data record number to read ... |
| realisamdoc rewriterecord | ...tup ................ db = new realisam(); ................ // procedure int rc; char buffer [500]; int recdata; char RetKey[100]; // read data rc = db->ReadDirectKey(0,"microbiology",RetKey,&recdata); if (rc) //ok { rc = db->ReadRecord(buffer,recdata); // rc is the recor... |
| realisamdoc writerecord | ... 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. ... |
| 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); } ................. ... |
| reading |  |
| realisamdoc overview | ...ssify data in numeric, date or text fields : it writes binary or text data according the length specified, and 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... |
| 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 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 recordlength | ...return the length of a data record. This function allows to know the size of a record before reading it, and the developer can allocate memory depending on the size returned. ... |
| readlast |  |
| realisamdoc readprev | ...ReadLast(0,ReturnKey,&recdata); while (rc) { rc = db->ReadRecord(buffer,recdata); // process data here .................. rc=db->ReadPrevKey(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(0,RetKey,&recdata); if (rc) // ok : key is found { rc = db->ReadRecord(buffer,recdata); buffer[rc]=0; ............. } else ............ ... |
| realisamdoc readlast | ...ReadLastKey... |
| realisamdoc readlast | ...ReadLastkey(int Index,char *Key,int &recdata); db is a database pointer. ... |
| 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... |
| realisamdoc readrecord | |