Alpes Software Homepage Real Isam Home Page


Summary Main WordsA B C D E F G H I J K L M N O P Q R S T U V W X Y Z Other



Letter R

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...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 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 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); } ...
real
index_summary item3...oad Real Isam ZIP file...
realisamdoc api...REAL ISAM API...
realisamdoc open...on (this function opens or creates the Isam files , according the extension required) datalen = Data physical block length . This value is not the real data length, but an average size. realisam will write data in consecutive blocks of datalen + 8 bytes. If real length is less than datalen, a phys...
realisamdoc open...block length . This value is not the real data length, but an average size. realisam will write data in consecutive blocks of datalen + 8 bytes. If real length is less than datalen, a physical block of datalen+8 bytes will be allocated and written. If data length is bigger than datalen, a second bl...
realisamdoc overview...Real Isam, at contrary to other relational databases, ignores the field notion, and does not try to classify 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 responsab...
realisamdoc overview... Real Isam 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 spee...
realisam
example add...MessageBoxA("Key not provided","RealIsam",MB_OK); return; } strlwr(Key); mWord->GetTextBuf(buffer,BUF_LEN); rc = dict->ReadDirectKey(INDEX,Key,RetKey,&recdata); if (rc) // Exists if == 1 { if (multi==0) // Unique Keys : Concatenate definitions { ...
example backup...MessageBoxA("Backup Done","RealIsam",MB_OK); } //--------------------------------------------------------------------------- ...
example download...- realisam.dll ...
example download...- realisam.h ...
example download...- realisam.lib ...
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...MessageBoxA("Duplication Finished","RealIsam",MB_OK); } //--------------------------------------------------------------------------- ...
example formcreate...r = GetCurrentDir(); strcpy(base_directory,Dir.c_str()); 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...
example formcreate...ary\\"); // 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; el...
example include... #include "Realisam.h" #include ...
example include... User declarations #define MAX_KEY 250 #define BUF_LEN 50000 struct time t1; struct time t2; int nbsec1,nbsec2,delta; realisam *dict; // working database realisam *dupli; // another instance for duplication example char base_directory[MAX_PATH]; cha...
example include...#define BUF_LEN 50000 struct time t1; struct time t2; int nbsec1,nbsec2,delta; realisam *dict; // working database realisam *dupli; // another instance for duplication example char base_directory[MAX_PATH]; char dict_directory[MAX_PATH]; int ...
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...MessageBoxA("Restoration Done","RealIsam",MB_OK); } //--------------------------------------------------------------------------- ...
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...MessageBoxA("Indexation Finished","RealIsam",MB_OK); } //--------------------------------------------------------------------------- ...
example version... Current RealIsam Version...
index_summary item4...RealIsam API...
index_summary item57...nt RealIsam Version...
index_summary item5...realisam.h : include file...
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 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 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 close... ................... realisam *db1; realisam *db2; .................. //APPLIC.CPP // constructor or setup ................ db1 = new realisam(); db2 = new realisam(); ................ // routine int rc; rc = db1->OpenEngine("htmlfile",248,"ndx","dat"); // 248 + 8 => 256 ! ...
realisamdoc close...realisam *db1; realisam *db2; .................. //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 ....
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 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 closereopen...C.H #include "realisam.h" ................... realisam *db; .................. //APPLIC.CPP // constructor ............... db = new realisam(); ................ // procedure int rc; ............... rc=db->CloseReopen("Samples",248,"ndx","dat"); ...
realisamdoc constr..................... realisam *db1; realisam *db2; .................. //APPLIC.CPP // in constructor or setup ................ db1 = new realisam(); db2 = new realisam(); ................ ...
realisamdoc constr...lisam *db1; realisam *db2; .................. //APPLIC.CPP // in constructor or setup ................ db1 = new realisam(); db2 = new realisam(); ................ ...
realisamdoc constr...constructor : new realisam...
realisamdoc constr...realisam...
realisamdoc constr.... There is an instance of a realisam object for each database you need in the same program. ...
realisamdoc constr... db = new realisam() ...
realisamdoc constr...Return a pointer to the instance. This pointer has to be used for any call to realisam functions. ...
realisamdoc constr... //APPLIC.H #include "realisam.h" ................... realisam *db1; realisam *db2; .................. //APPLIC.CPP // in constructor or setup ................ db1 = new realisam(); db2 = 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 constr... //APPLIC.H #include "realisam.h" ................... realisam *db1; realisam *db2; .................. //APPLIC.CPP // in constructor or setup ................ db1 = new realisam(); db2 = new realisam(); ................ ...
realisamdoc deleteisam... //APPLIC.H #include "realisam.h" ................... realisam *db; .................. // procedure ............... db->DeleteIsam("c:\\samples.ndx","c:\\samples.dat"); ...
realisamdoc deleteisam... //APPLIC.H #include "realisam.h" ................... realisam *db; .................. // procedure ............... db->DeleteIsam("c:\\samples.ndx","c:\\samples.dat"); ...
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 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 deletekey....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 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 deleterecord....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,&recdata); if (...
realisamdoc deleterecord...Delete a data record (more precisely, rewrite the record with a null data length). The free space is not managed under realisam. It is recommended to write an utility to copy a old database in a new one if there is too many records deleted. ...
realisamdoc download... - realisam.h ...
realisamdoc download... - realisam.lib ...
realisamdoc download...Download realisam.zip File (35 KB)...
realisamdoc download...RealIsam ZIP file to download ...
realisamdoc download... The DLL file name is "realisam.dll". Another files are needed for development purpose : ...
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 download... - realisam.dll ...
realisamdoc getindex... //APPLIC.H #include "realisam.h" ................... realisam *db; .................. //APPLIC.CPP // constructor ............... db = new realisam(); ................ // procedure int mode; ............... mode = db->GetIndexMode(12); ....................... ...
realisamdoc getindex... //APPLIC.H #include "realisam.h" ................... realisam *db; .................. //APPLIC.CPP // constructor ............... db = new realisam(); ................ // procedure int mode; ............... mode = db->GetIndexMode(12); ....................... ...
realisamdoc getindex...C.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 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 getnew...C.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"); // 248 + 8 ...
realisamdoc include...Include File REALISAM.H...
realisamdoc include... #ifndef __REALISAM_H #define __REALISAM_H #ifdef __cplusplus extern "C" { #endif class _export realisam { public: realisam(void); ~realisam(void); int OpenEngine(char *FileName,short BlockSize,char *ndx, char*dat); int CloseEngine(void); int SetIndexMode(short Index,...
realisamdoc include... #ifndef __REALISAM_H #define __REALISAM_H #ifdef __cplusplus extern "C" { #endif class _export realisam { public: realisam(void); ~realisam(void); int OpenEngine(char *FileName,short BlockSize,char *ndx, char*dat); int CloseEngine(void); int SetIndexMode(short Index,...
realisamdoc include...f __REALISAM_H #define __REALISAM_H #ifdef __cplusplus extern "C" { #endif class _export realisam { public: realisam(void); ~realisam(void); int OpenEngine(char *FileName,short BlockSize,char *ndx, char*dat); int CloseEngine(void); int SetIndexMode(short Index, short V...
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 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 number...clude "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 index 0 sprintf(Key,"...
realisamdoc open.... 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 open...am files , according the extension required) datalen = Data physical block length . This value is not the real data length, but an average size. realisam will write data in consecutive blocks of datalen + 8 bytes. If real length is less than datalen, a physical block of datalen+8 bytes will be all...
realisamdoc open...................... realisam *db1; realisam *db2; .................. //APPLIC.CPP // constructor or setup ................ db1 = new realisam(); db2 = new realisam(); ................ // your routine .... int rc; rc = db1->OpenEngine("htmlfile",248,"ndx","dat"); // 248 + ...
realisamdoc open...alisam *db1; realisam *db2; .................. //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) {...
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 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 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 overview...RealIsam is a 32-bits DLL and can be interfaced to any 32 bits application developped under Win95,Win98, NT,XP. ...
realisamdoc overview...RealIsam uses the object-oriented technology for a faster and easier development and to simplify the source code. ...
realisamdoc overview...realisam Features : ...
realisamdoc overview...tes when a reading operation is required. It is the responsability of the developer to organize records and to know how to extract the fields. Realisam is better adapted to store variable length text data like XML strings. ...
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 readdirect... //APPLIC.H #include "realisam.h" ................... realisam *db; .................. //APPLIC.CPP // constructor ................ db = new realisam(); ............... rc = db->OpenEngine("Applic",504,"ndx","dat"); ................ db->CloseEngine(); ....................... ...
realisamdoc readdirect....H #include "realisam.h" ................... realisam *db; .................. //APPLIC.CPP // constructor ................ db = new realisam(); ............... rc = db->OpenEngine("Applic",504,"ndx","dat"); ................ db->CloseEngine(); ....................... // p...
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 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 readfirst...include "realisam.h" ................... realisam *db; .................. //APPLIC.CPP // constructor or setup ................ db = new realisam(); ............... rc = db->OpenEngine("Applic",504,"ndx","dat"); ................ db->CloseEngine(); ....................... // pro...
realisamdoc readlast...IC.H #include "realisam.h" ................... realisam *db; .................. //APPLIC.CPP // constructor ................ db = new realisam(); ............... rc = db->OpenEngine("Applic",504,"ndx","dat"); ................ db->CloseEngine(); ....................... // p...
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 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 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 readnext...clude "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 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 readprev... #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 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 readrecord...clude "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(10000); if (!buffer) r...
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 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 recordlength...clude "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",RetKey,&recdata); ...
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 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 rewriterecord...clude "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->ReadDirectKey(0,"...
realisamdoc setindex... Define is keys are unique or duplicate for a specified index. realisam allows 64 index per database, from ...
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 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 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 setindex............ //APPLIC.CPP // constructor or setup ................ #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 !...
realisamdoc setindex....CPP // constructor or setup ................ #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...
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 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 version...C.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" (actually ...
realisamdoc version... Return the version number of the realisam software. (210 for this version : 2.10) ...
realisamdoc writekey...b2; .................. //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->OpenEngine("htmlfile",248,"ndx","...
realisamdoc writekey... //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->OpenEngine("htmlfile",248,"ndx","dat"); // 248 + 8 =>...
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 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 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(); ....................... ...
realisamdoc writerecord... //APPLIC.H #include "realisam.h" ................... realisam *db; .................. //APPLIC.CPP // constructor ................ db = new realisam(); ............... rc = db->OpenEngine("Applic",504,"ndx","dat"); ................ db->CloseEngine(); ....................... ...
realisamdoc writerecord....H #include "realisam.h" ................... realisam *db; .................. //APPLIC.CPP // constructor ................ db = new realisam(); ............... rc = db->OpenEngine("Applic",504,"ndx","dat"); ................ db->CloseEngine(); ....................... // pro...
rebuild
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"); ...
rebuilt
example restore...am; 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->MessageBoxA(tmp,"Restore Dictionary",MB_YESNO)==IDNO) return; TCursor oldCursor = Screen->Cursor; if (cb->Checked==tr...
recdata
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...WriteRecord(buffer,strlen(buffer)+1); } } else // Key does not exist { recdata=dict->GetNewRecordNumber(); rc = dict->WriteKey(INDEX,Key,recdata); rc = dict->WriteRecord(buffer,strlen(buffer)+1); } StatusBar1->SimpleText="Entry Added"; } //-...
example add...WriteKey(INDEX,Key,recdata); rc = dict->WriteRecord(buffer,strlen(buffer)+1); } StatusBar1->SimpleText="Entry Added"; } //--------------------------------------------------------------------------- ...
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...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 add...RewriteRecord(str, strlen(str)+1,recdata); } else { recdata=dict->GetNewRecordNumber(); rc = dict->WriteKey(INDEX,Key,recdata); rc = dict->WriteRecord(buffer,strlen(buffer)+1); } } else // Key does not exist { re...
example backup... 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...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...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...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... 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...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 duplicate...ReadNextKey(RetKey,&recdata); } dupli->CloseEngine(); First(); Screen->Cursor = oldCursor; EnableButtons(); Application->MessageBoxA("Duplication Finished","RealIsam",MB_OK); } //--------------------------------------------------------------------------- ...
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 first...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 indexbuffer...astcall 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...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 last...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...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); } } //--------------------...
example next...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 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...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); } } //---------------------...
example search... Search(); } //--------------------------------------------------------------------------- void __fastcall TMainForm::Search() { int rc,recdata; char Key[MAX_KEY],RetKey[MAX_KEY]; char buffer[BUF_LEN]; char tmp[256]; if (eWord->Text=="") { mWord->Clear(); return; } INDEX=0; ...
example search...SetTextBuf("Word Not Found"); } M_recdata=recdata; strcpy(M_Key,RetKey); } ...
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 search...ReadRecord(buffer,recdata); if (rc) { mWord->Clear(); mWord->SetTextBuf(buffer); } } else { mWord->SetTextBuf("Word Not Found"); } M_recdata=recdata; strcpy(M_Key,RetKey); } ...
realisamdoc deletekey...recdata = record number related to the key. ...
realisamdoc deletekey...DeleteKey(int Index,char *Key,int recdata); db is a database pointer. ...
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...DeleteRecord(recdata); } else .............. ...
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...DeleteRecord(&recdata); ................. ...
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 { // data are stored in buffer rc = db1->WriteRecord(buffer,strlen(buffer)); ...
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... recdata =db->GetNewRecordNumber(); db is the database pointer. ...
realisamdoc getnew...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->SetIndexMode...
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(); rc = d...
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 number...WriteKey(0,Key,recdata); if (rc) db->WriteRecord(buffer,strlen(buffer)+1); .............. ...
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...ReadRecord(buffer,recdata); buffer[rc]=0; ............. } else ............ ...
realisamdoc readdirect...ReadDirectkey(int Index,char *Key,char *ReturnKey, int &recdata) db is the database pointer. ...
realisamdoc readdirect...recdata = data record pointer ...
realisamdoc readdirect...ReadDirectKey(0,"microsoft",RetKey,&recdata); if (rc) // ok : key found { rc = db->ReadRecord(buffer,recdata); buffer[rc]=0; ............. } else ............ ...
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 readfirst...ReadFirstKey(int index,char *Key,int &recdata); db is a database pointer. ...
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...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...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 readlast...ReadLastkey(int Index,char *Key,int &recdata); db is a database pointer. ...
realisamdoc readlast...recdata is a 32 bit integer pointing on a data record related to the key. ...
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...ReadRecord(buffer,recdata); buffer[rc]=0; ............. } else ............ ...
realisamdoc readnext...ReadNextKey(char *Key, int &recdata); db is a database pointer. ...
realisamdoc readnext...recdata is a 32 bit integer that points on the related data record. ...
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...ReadNextKey(ReturnKey,&recdata); } ................. ...
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...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...ReadLast(0,ReturnKey,&recdata); while (rc) { rc = db->ReadRecord(buffer,recdata); // process data here .................. rc=db->ReadPrevKey(ReturnKey,recdata); } ...
realisamdoc readprev...ReadRecord(buffer,recdata); // process data here .................. rc=db->ReadPrevKey(ReturnKey,recdata); } ...
realisamdoc readprev...recdata is a 32 bit integer related to the data record to read. ...
realisamdoc readprev...ReadPrevKey(ReturnKey,recdata); } ...
realisamdoc readrecord............... //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",ReturnKey,&r...
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(char *buffer,int recdata); db is a database pointer. ...
realisamdoc readrecord...recdata : data record number to read ...
realisamdoc readrecord...ReadRecord(buffer,&recdata); buffer[rc]=0; // to end with a 0x00 .......................... } else ................ ...
realisamdoc recordlength...RecordLength(int recdata) db is a database pointer. ...
realisamdoc recordlength...recdata : record number ...
realisamdoc recordlength........... //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->RecordLength(recdata); ...
realisamdoc recordlength...ReadDirectKey(0,"microsoft",RetKey,&recdata); if (rc) // success { len = db->RecordLength(recdata); if (len) { buffer = malloc(len+2); .... } else { ... empty ...} } .......... ...
realisamdoc recordlength...RecordLength(recdata); if (len) { buffer = malloc(len+2); .... } else { ... empty ...} } .......... ...
realisamdoc rewriterecord...RewriteRecord(char *buffer, int len, int recdata); db is a database pointer. ...
realisamdoc rewriterecord...recdata : data record address ...
realisamdoc rewriterecord...RewriteRecord(buffer, strlen(buffer+1),recdata); } ...
realisamdoc rewriterecord...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 { rc = db->ReadRecord(buffer,...
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 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.... #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->SetIndexMode...
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(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 writerecord................. // 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->WriteRecord(buffer,strlen(buffer)+1...
realisamdoc writerecord...WriteKey(0,"microsoft",recdata); if (rc) // key insert ok { db->WriteRecord(buffer,strlen(buffer)+1); ....... } else ............. ...
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...
recdata_dupli
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...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 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...
receive
realisamdoc readfirst... index number (0-63) Key is a pointer on a character string, large enough to receive the key (max = 250 characters) recdata is a pointer on the data record related to the key. ...
realisamdoc readlast...Key is a pointer on a character string, large enough to receive the value of the key (250 char . max) ...
realisamdoc readnext...Key is a pointer on a character string that will receive the value of the key. ...
realisamdoc readrecord...ecord. 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. ReadRecord restores t...
receiving
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...
recieve
realisamdoc readprev...Key is a pointer on a character string that will recieve the value of the key ...
recnum
realisamdoc deleterecord...DeleteRecord(int recnum); db is a database pointer. ...
realisamdoc deleterecord...recnum : data record number to delete ...
recnumber
realisamdoc include...ine(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 GetNewRecordNumber(); int WriteKey(short Index,cha...
realisamdoc include... 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); int Delete...
realisamdoc include...*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,char *Key,int RecNumber); in...
realisamdoc include...hort 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 *RecNumber); int ReadPrevKey(char *...
realisamdoc include...(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 *RecNumber); int ReadDirectKey(shor...
realisamdoc include... 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, int *RecNumber); int Numb...
realisamdoc include...Number); 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(char *FileName,sh...
realisamdoc include...eleteRecord(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); int ReadNextKey(cha...
realisamdoc include...ta,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); int ReadLastKey(short...
realisamdoc include...xtKey(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); int RecordLength(int RecNum...
realisamdoc include...eturnKey,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 GetIndexMode(int ndx); int DeleteIsam...
recommand
realisamdoc open... is bigger than datalen, a second block is allocated, and so on... The Windows file management system works with multiples of 1024 bytes, and we recommand to work with datalen+8 such as 120 , 248, 504, 1016,2040 ... bytes in order to improve the access time. ...
recommended
realisamdoc deleteisam...ex 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 deleterecord...Delete a data record (more precisely, rewrite the record with a null data length). The free space is not managed under realisam. It is recommended to write an utility to copy a old database in a new one if there is too many records deleted. ...
realisamdoc readrecord...y. ReadRecord restores the entire data written previously, including binary data. For character strings stored without a 0x00 terminator, it is recommended to terminate the string with a 0 after the ReadRecord. ...
record
example first... Search First Record...
example include...; 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 *result, char *buff, char *tag, int posdeb); int ...
example stat...-Concatenate definition if No duplicate Key option is set, else store definition in record ...
example stat...-Write or rewrite Record ...
example stat...-Read Sequential record in the dictionnary file ...
example update... Update a definition record...
example update..._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 Updated"; ...
index_summary item41...h First Record...
index_summary item50...e a definition record...
realisamdoc deletekey...recdata = record number related to the key. ...
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 deleterecord...recnum : data record number to delete ...
realisamdoc deleterecord...Delete a data record (more precisely, rewrite the record with a null data length). The free space is not managed under realisam. It is recommended to write an utility to copy a old database in a new one if there is too many records deleted. ...
realisamdoc deleterecord...Delete a data record (more precisely, rewrite the record with a null data length). The free space is not managed under realisam. It is recommended to write an utility to copy a old database in a new one if there is too many records deleted. ...
realisamdoc readdirect...recdata = data record pointer ...
realisamdoc readfirst...x 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 readfirst...ReadRecord(buffer,recdata); // processs the record ............................. rc=db->ReadNextKey(RetKey,&recdata); // rc = 0 if end of file (last key of index) } ................... ...
realisamdoc readlast...recdata is a 32 bit integer pointing on a data record related to the key. ...
realisamdoc readnext...recdata is a 32 bit integer that points on the related data record. ...
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 readrecord...len : record length of the data record. ...
realisamdoc readrecord...len : record length of the data record. ...
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. ...
realisamdoc recordlength...recdata : record number ...
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. ...
realisamdoc rewriterecord...recdata : data record address ...
realisamdoc rewriterecord...Rewrite a data record to a previous location. If data length is bigger than the previous write, the function can create new physical blocks. Developer has to specifiy the new data length. ...
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 writekey...Write a key in an index of the database. A data record record address is associated with this key. ...
realisamdoc writekey...Write a key in an index of the database. A data record record address is associated with this key. ...
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 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. ...
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 ...} } .......... ...
records
realisamdoc deleterecord...h). The free space is not managed under realisam. It is recommended to write an utility to copy a old database in a new one if there is too many records deleted. ...
realisamdoc overview...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. ...
realisamdoc overview...abases 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. ...
realisamdoc overview...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 adapted to store variable length text data like XML strings. ...
realisamdoc overview...Variable length for Data records ...
related
realisamdoc deletekey...recdata = record number related to the key. ...
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 readfirst... (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...recdata is a 32 bit integer pointing on a data record related to the key. ...
realisamdoc readnext...recdata is a 32 bit integer that points on the related data record. ...
realisamdoc readprev...recdata is a 32 bit integer related to the data record to read. ...
relational
realisamdoc overview...Real Isam, at contrary to other relational databases, ignores the field notion, and does not try to classify 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 responsab...
reopen
example start...Caption = AnsiString(tmp); // elapsed); // Close ReOpen if (CheckBox1->Checked==true) { strcpy(name,dict_directory);strcat(name,"dict"); rc = dict->CloseReopen(name,120,"ndx","dat"); //120 = 128 - 8 rc = dict->SetIndexMode(INDEX,multi); rc = dict->SetIndexMode(INDEX+1...
realisamdoc open...er,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. ...
required
realisamdoc open... filename = filename, with no extension (this function opens or creates the Isam files , according the extension required) datalen = Data physical block length . This value is not the real data length, but an average size. realisam will write data in consecutive blocks of datalen + 8 bytes. If re...
realisamdoc overview...ic, 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 adapted to store var...
res
example download...- testisam.res ...
resource
example main_header... #include "Main.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TMainForm *MainForm; //--------------------------------------------------------------------------- __fastcall TMainForm::TMainForm(TC...
responsability
realisamdoc overview... : 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 adapted to store variable length text data ...
restoration
example restore...MessageBoxA("Restoration Done","RealIsam",MB_OK); } //--------------------------------------------------------------------------- ...
restore
example principle...Backup, Restore, Duplicate...
example principle...Restore database : Delete the database, and restore it from the dict.txt file ...
example principle...Restore database : Delete the database, and restore it from the dict.txt file ...
example restore... Restore Isam Files from the text file...
example restore...der) { 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->MessageBoxA(tmp,"Restore Dictionary",MB_YESNO)==IDNO) ret...
example restore...MessageBoxA(tmp,"Restore Dictionary",MB_YESNO)==IDNO) return; TCursor oldCursor = Screen->Cursor; if (cb->Checked==true) multi=1; else multi=0; dict->CloseEngine(); // delete isam files strcpy(name,dict_directory);strcat(name,"dict.ndx"); rc = unlink (name); strcpy(name,dict_direc...
index_summary item48...Restore Isam Files from the text file...
restores
realisamdoc readrecord...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 to terminat...
result
example extractvalue..."); p1= strstr(buff,tmp); if (p1) { p2=p + strlen(tag)+2; l= p1-p2; strncpy(result,p2,l); result[l]=0; } } return l; } ...
example extractvalue..."); p1= strstr(buff,tmp); if (p1) { p2=p + strlen(tag)+2; l= p1-p2; strncpy(result,p2,l); result[l]=0; } } return l; } ...
example extractvalue... int __fastcall TMainForm::ExtractValue(char *result, char *buff, char *tag, int posdeb) { char tmp[250]; char *p,*p1,*p2; int pos,l; result[0]=0; strcpy(tmp,"...
example extractvalue... int __fastcall TMainForm::ExtractValue(char *result, char *buff, char *tag, int posdeb) { char tmp[250]; char *p,*p1,*p2; int pos,l; result[0]=0; strcpy(tmp,"...
example include... int M_recdata; // memorizes data record pointer char M_Key[MAX_KEY]; // memorizes Key int __fastcall ExtractValue(char *result, char *buff, char *tag, int posdeb); int __fastcall IndexBuffer(char *buff); void __fastcall Search(); void __fastcall First(); v...
retkey
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 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...adRecord(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(h...
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...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...MessageBoxA(RetKey,"Key Length > 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);...
example backup...tml,fp); nbseq++; p1=p+1; p=strchr(p1,'\n'); } strcpy(html,"<P><B>"); strcat(html,RetKey); strcat(html,"</B> (<I></I>) "); strcat(html,p1); strcat(html,"</P>\n"); ...
example backup...p=strchr(p1,'\r'); while (p) { *p=0; p++; *p=0; strcpy(html,"<P><B>"); strcat(html,RetKey); strcat(html,"</B> (<I></I>) "); strcat(html,p1); strcat(html,"</P>\n"); ...
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... 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...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...ReadNextKey(RetKey,&recdata); } dupli->CloseEngine(); First(); Screen->Cursor = oldCursor; EnableButtons(); Application->MessageBoxA("Duplication Finished","RealIsam",MB_OK); } //--------------------------------------------------------------------------- ...
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 first...Caption=AnsiString(RetKey); eWord->Text=AnsiString(RetKey); if (rc==1) { rc=dict->ReadRecord(buffer,recdata); M_recdata=recdata; strcpy(M_Key,RetKey); if (rc) mWord->SetTextBuf(buffer); } } void __fastcall TMainForm::btFirstClick(TObject *Sender) { First(); } /...
example 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 indexbuffer...///////////////// int __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...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 last...Caption=AnsiString(RetKey); eWord->Text=AnsiString(RetKey); if (rc==1) { mWord->Clear(); rc=dict->ReadRecord(buffer,recdata); M_recdata=recdata; strcpy(M_Key,RetKey); if (rc) mWord->SetTextBuf(buffer); } } //---------------------------------------------------------...
example 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...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...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); } } //--------------------...
example next...Caption=AnsiString(RetKey); eWord->Text=AnsiString(RetKey); if (rc==1) { mWord->Clear(); rc=dict->ReadRecord(buffer,recdata); M_recdata=recdata; strcpy(M_Key,RetKey); if (rc) mWord->SetTextBuf(buffer); } } //--------------------------------------------------------...
example 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...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...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); } } //---------------------...
example prev...Caption=AnsiString(RetKey); eWord->Text=AnsiString(RetKey); if (rc==1) { mWord->Clear(); rc=dict->ReadRecord(buffer,recdata); M_recdata=recdata; strcpy(M_Key,RetKey); if (rc) mWord->SetTextBuf(buffer); } } //---------------------------------------------------------...
example 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 search...------------------------------------------------------------------ void __fastcall TMainForm::Search() { int rc,recdata; char Key[MAX_KEY],RetKey[MAX_KEY]; char buffer[BUF_LEN]; char tmp[256]; if (eWord->Text=="") { mWord->Clear(); return; } INDEX=0; strcpy(Key,eWord->Text.c...
example search...SetTextBuf("Word Not Found"); } M_recdata=recdata; strcpy(M_Key,RetKey); } ...
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 search...Caption=AnsiString(RetKey); eWord->Text=AnsiString(RetKey); if (rc==1) { rc=dict->ReadRecord(buffer,recdata); if (rc) { mWord->Clear(); mWord->SetTextBuf(buffer); } } else { mWord->SetTextBuf("Word Not Found"); } M_recdata=recdata...
example 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); } ...
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 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... 0 : Key not found (Retkey contains a key that is the closest key, usually the key before the searched key (in the alphabetic order). 1 : Key found : ReturnKey contains also Key ...
realisamdoc readdirect...ReadDirectKey(0,"microsoft",RetKey,&recdata); if (rc) // ok : key found { rc = db->ReadRecord(buffer,recdata); buffer[rc]=0; ............. } else ............ ...
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...ReadNextKey(RetKey,&recdata); // rc = 0 if end of file (last key of index) } ................... ...
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 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 recordlength...//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->RecordLength(recdata); if (len) ...
realisamdoc recordlength...ReadDirectKey(0,"microsoft",RetKey,&recdata); if (rc) // success { len = db->RecordLength(recdata); if (len) { buffer = malloc(len+2); .... } else { ... empty ...} } .......... ...
realisamdoc rewriterecord... 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 { rc = db->ReadRecord(buffer,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 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...
retour
realisamdoc constr...Code retour :...
realisamdoc readlast...Retour Code :...
retrieval
realisamdoc overview... 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. ...
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. ...
return
example add...MessageBoxA("Key not provided","RealIsam",MB_OK); return; } strlwr(Key); mWord->GetTextBuf(buffer,BUF_LEN); rc = dict->ReadDirectKey(INDEX,Key,RetKey,&recdata); if (rc) // Exists if == 1 { if (multi==0) // Unique Keys : Concatenate definitions { ...
example backup...MessageBoxA("Problem Opening Dict.Txt File", "Backup Dictionary",MB_OK); return; } if (cb->Checked==true) multi=1; else multi=0; Screen->Cursor = crHourGlass; strcpy(tmp,lIndex->Caption.c_str()); INDEX=atoi(tmp); DisableButtons(); eWord->Text==...
example backup...MessageBoxA(tmp,"Backup Dictionary",MB_YESNO)==IDNO) return; strcpy(tmp,dict_directory); strcat(tmp,"dict.txt"); fp=fopen(tmp,"w+t"); if (fp==NULL) { Application->MessageBoxA("Problem Opening Dict.Txt File", "Backup Dictionary",MB_OK); return; } if (...
example duplicate...MessageBoxA(tmp,"Isam Dictionary",MB_YESNO)==IDNO) return; TCursor oldCursor = Screen->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; Disa...
example extractvalue...trstr(buff,tmp); if (p1) { p2=p + strlen(tag)+2; l= p1-p2; strncpy(result,p2,l); result[l]=0; } } return l; } ...
example restore...MessageBoxA(tmp,"Restore Dictionary",MB_YESNO)==IDNO) return; TCursor oldCursor = Screen->Cursor; if (cb->Checked==true) multi=1; else multi=0; dict->CloseEngine(); // delete isam files strcpy(name,dict_directory);strcat(name,"dict.ndx"); rc = unlink (name); strcpy(name,dict_direc...
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...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 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 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...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...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 wordmouseup...GetSelTextBuf(tmp,100); if (strlen(tmp)==0) return; eWord->Text=AnsiString(tmp); Search(); } //--------------------------------------------------------------------------- ...
realisamdoc close...Return code :...
realisamdoc closereopen...Return Code :...
realisamdoc constr...Return a pointer to the instance. This pointer has to be used for any call to realisam functions. ...
realisamdoc deletekey...Return Code :...
realisamdoc deleterecord...Return Code :...
realisamdoc getindex...Return Code :...
realisamdoc getnew...Return the new physical position where to write data in the data file. Use a WriteRecord to write the data. ...
realisamdoc getnew...Return Code :...
realisamdoc number...Return Code :...
realisamdoc open...Return code :...
realisamdoc readdirect...Return Code :...
realisamdoc readfirst...Return Code :...
realisamdoc readnext...Return Code :...
realisamdoc readprev...Return Code :...
realisamdoc readrecord...sam(); ................ // 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 en...
realisamdoc readrecord...Return Code : ...
realisamdoc recordlength...Return Code :...
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. ...
realisamdoc rewriterecord...Return Code :...
realisamdoc setindex...Return code :...
realisamdoc version...Return Code :...
realisamdoc version... Return the version number of the realisam software. (210 for this version : 2.10) ...
realisamdoc writekey...Return code :...
realisamdoc writerecord...Return Code :...
returned
realisamdoc recordlength...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. ...
returnkey
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 include...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 *RecNumber); int Rea...
realisamdoc include... 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 *RecNumber); int Re...
realisamdoc include...dFirstKey(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, int *RecNumbe...
realisamdoc include...); 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); int RecordL...
realisamdoc include...rt 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 GetIndexMode(int ndx); ...
realisamdoc readdirect...ReadDirectkey(int Index,char *Key,char *ReturnKey, int &recdata) db is the database pointer. ...
realisamdoc readdirect...ReturnKey = Key found after searching the index. ...
realisamdoc readdirect...ey not found (Retkey contains a key that is the closest key, usually the key before the searched key (in the alphabetic order). 1 : Key found : ReturnKey contains also Key ...
realisamdoc readnext...ReadFirstKey(0,ReturnKey,&recdata); while (rc) { rc=db->ReadRecord(buffer,recdata); // process buffer ................ rc =db->ReadNextKey(ReturnKey,&recdata); } ................. ...
realisamdoc readnext...ReadNextKey(ReturnKey,&recdata); } ................. ...
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 readprev...ReadLast(0,ReturnKey,&recdata); while (rc) { rc = db->ReadRecord(buffer,recdata); // process data here .................. rc=db->ReadPrevKey(ReturnKey,recdata); } ...
realisamdoc readprev...ReadPrevKey(ReturnKey,recdata); } ...
realisamdoc readrecord... //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",ReturnKey,&recdata); if (rc...
realisamdoc readrecord...ReadDirectKey(0,"microsoft",ReturnKey,&recdata); if (rc) { rc=db->ReadRecord(buffer,&recdata); buffer[rc]=0; // to end with a 0x00 .......................... } else ................ ...
returns
example principle...First Key : Returns the first key of the index ...
example principle...Last Key : Returns the Last Key of the index ...
realisamdoc getindex... Returns the value of the mode for a given index. ...
realisamdoc overview...notion, and does not try to classify 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 ...
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). ...
reverse
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...
realisamdoc readprev...eEngine(); ....................... ................. // 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...
rewrite
example stat...-Write or rewrite Record ...
realisamdoc deleterecord...Delete a data record (more precisely, rewrite the record with a null data length). The free space is not managed under realisam. It is recommended to write an utility to copy a old database in a new one if there is too many records deleted. ...
realisamdoc rewriterecord...Rewrite a data record to a previous location. If data length is bigger than the previous write, the function can create new physical blocks. Developer has to specifiy the new data length. ...
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); } ...
right
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 readrecord...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 character strings stored without a 0x00 termi...
rk-
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 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 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); } } //--------------------...
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); } } //---------------------...
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...Clear(); RK->Caption = ""; lKeys->Caption = ""; lRecords->Caption=""; lElap->Caption=""; // GET INDEX VALUE; strcpy(tmp,lIndex->Caption.c_str()); INDEX=atoi(tmp); if (INDEX ...
rk
example include...ecords; TLabel *lKeys; TCheckBox *cb; TLabel *Label18; TEdit *edFile; TLabel *Label20; TLabel *RK; TLabel *Label22; TButton *btBackup; TButton *btRestore; TBevel *Bevel1; TBevel *Bevel2; TChe...
routine
example exit... Exit Routine...
example formcreate... Init Routine...
example start... Indexation Routine...
index_summary item36...Routine...
index_summary item38...ation Routine...
index_summary item45...Routine...
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("scrip...
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("...
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,UNIQ...
realisamdoc writekey...setup ................ #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 .... } ...
run
example download... Files are packed in a ZIP file Borland DLL,or BPL are also incuded if you want to run the TESTISAM.EXE program without having the BCB development compiler. ...
Copyright Alpes Software - Documentation and HTML pages generated by Final Doc