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 M

m_key
example delete...DeleteKey(INDEX,M_Key,M_recdata); rc=dict->DeleteRecord(M_recdata); First(); StatusBar1->SimpleText="Entry Deleted"; } //--------------------------------------------------------------------------- ...
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 include...ry[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 __fastcall IndexBuffer(cha...
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...SetTextBuf("Word Not Found"); } M_recdata=recdata; strcpy(M_Key,RetKey); } ...
m_recdata
example delete...DeleteKey(INDEX,M_Key,M_recdata); rc=dict->DeleteRecord(M_recdata); First(); StatusBar1->SimpleText="Entry Deleted"; } //--------------------------------------------------------------------------- ...
example delete...DeleteRecord(M_recdata); First(); StatusBar1->SimpleText="Entry Deleted"; } //--------------------------------------------------------------------------- ...
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 include... char base_directory[MAX_PATH]; char dict_directory[MAX_PATH]; int nbrecords; int multi; int INDEX; int M_recdata; // memorizes data record pointer char M_Key[MAX_KEY]; // memorizes Key int __fastcall ExtractValue(char *result, char *buff,...
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...SetTextBuf("Word Not Found"); } M_recdata=recdata; strcpy(M_Key,RetKey); } ...
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...RewriteRecord(buffer, strlen(buffer)+1,M_recdata); StatusBar1->SimpleText="Entry Updated"; } //--------------------------------------------------------------------------- ...
macros
realisamdoc overview...ftware 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. ...
main
example download...- main.cpp ...
example download...- main.dfm ...
example download...- main.h ...
example include... Include File MAIN.H...
example main_header... #pragma hdrstop #include "Main.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TMainForm *MainForm; //---------------...
index_summary item33...de File MAIN.H...
mainform-
example formcreate...Version(tmp); MainForm->Caption = "Alpes Software - " + AnsiString(tmp); // Get Number of Keys rc = dict->NumberOfKeys(INDEX); lKeys->Caption = AnsiString(rc); if (rc) First(); } //--------------------------------------------------------------------------- ...
mainform
example include...tcall TMainForm(TComponent* Owner); }; //--------------------------------------------------------------------------- extern PACKAGE TMainForm *MainForm; //--------------------------------------------------------------------------- #endif ...
example main_header... //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TMainForm *MainForm; //--------------------------------------------------------------------------- __fastcall TMainForm::TMainForm(TComponent* Owner) : T...
mainh
example include... //--------------------------------------------------------------------------- #ifndef MainH #define MainH //--------------------------------------------------------------------------- #include ...
example include... //--------------------------------------------------------------------------- #ifndef MainH #define MainH //--------------------------------------------------------------------------- #include ...
mainmenu1
example include... TLabel *lElap; TButton *btNext; TButton *btPrev; TButton *btFirst; TButton *btLast; TMainMenu *MainMenu1; TMenuItem *Exit1; TMenuItem *Exit2; TLabel *Label16; TLabel *Label17; TLabel *lRecords; T...
malloc
realisamdoc recordlength...RecordLength(recdata); if (len) { buffer = malloc(len+2); .... } else { ... empty ...} } .......... ...
manage
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...
managed
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. ...
management
realisamdoc open...datalen+8 bytes will be allocated and written. If data length 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 impr...
many
realisamdoc deleterecord...a 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. ...
max
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) ...
max_key
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... 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... 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 duplicate...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 ? "); i...
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... 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 include... void __fastcall btAddClick(TObject *Sender); void __fastcall btVersionClick(TObject *Sender); private: // User declarations #define MAX_KEY 250 #define BUF_LEN 50000 struct time t1; struct time t2; int nbsec1,nbsec2,delta; realisam *dict; // working databas...
example include...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 __fastcall IndexBuffer(char *buff...
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 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 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... 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 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 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...
example search...---------------------------------------------------------- void __fastcall TMainForm::Search() { int rc,recdata; char Key[MAX_KEY],RetKey[MAX_KEY]; char buffer[BUF_LEN]; char tmp[256]; if (eWord->Text=="") { mWord->Clear(); return; } INDEX=0; strcpy(Key,eWord->Text.c_str());...
max_path
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 include...lta; realisam *dict; // working database realisam *dupli; // another instance for duplication example char base_directory[MAX_PATH]; char dict_directory[MAX_PATH]; int nbrecords; int multi; int INDEX; int M_recdata; // memorizes da...
example include...ng database realisam *dupli; // another instance for duplication example char base_directory[MAX_PATH]; char dict_directory[MAX_PATH]; int nbrecords; int multi; int INDEX; int M_recdata; // memorizes data record pointer char M_Key[MAX...
maximum
realisamdoc overview...Maximum key length : 250 characters ...
mb
example download...Download Example TestIsam.zip (6.2 MB)...
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. ...
mb_ok
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... 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...MessageBoxA("Backup Done","RealIsam",MB_OK); } //--------------------------------------------------------------------------- ...
example duplicate...MessageBoxA("Duplication Finished","RealIsam",MB_OK); } //--------------------------------------------------------------------------- ...
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("File DICT.txt not Found","File Not Found",MB_OK); EnableButtons(); Screen->Cursor = oldCursor; return; } nbrecords=0; nbisam=0; // read sequential data while (!feof(fp)) { buffer[0]=0; fgets(buffer,BUF_LEN,f...
example restore...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(html,"File Not Found",MB_OK); EnableButtons(); Screen->Cursor = oldCursor; return; } // read sequential data while (!feof(fp)) { tmp[0]=0; fgets(buffer,BUF_LEN,fp); // IndexBuffer(buffer); Applic...
example start...MessageBoxA("Indexation Finished","RealIsam",MB_OK); } //--------------------------------------------------------------------------- ...
example version...MessageBoxA(version,"Version",MB_OK); } //--------------------------------------------------------------------------- ...
mb_yesno
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 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 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;...
measures
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. ...
mem_alloc
realisamdoc readrecord................. 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) { rc=db->ReadRecord(buffer,&recdat...
memorizes
example include...ory[MAX_PATH]; char dict_directory[MAX_PATH]; int nbrecords; int multi; int INDEX; int M_recdata; // memorizes data record pointer char M_Key[MAX_KEY]; // memorizes Key int __fastcall ExtractValue(char *result, char *buff, char *tag, int posd...
example include... 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 __fastcall IndexBuffer(char *buff); void __f...
memory
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...st 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 terminator, it is rec...
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. ...
messageboxa
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(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 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(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...MessageBoxA("Backup Done","RealIsam",MB_OK); } //--------------------------------------------------------------------------- ...
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 duplicate...MessageBoxA("Duplication Finished","RealIsam",MB_OK); } //--------------------------------------------------------------------------- ...
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...MessageBoxA("File DICT.txt not Found","File Not Found",MB_OK); EnableButtons(); Screen->Cursor = oldCursor; return; } nbrecords=0; nbisam=0; // read sequential data while (!feof(fp)) { buffer[0]=0; fgets(buffer,BUF_LEN,f...
example restore...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(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(html,"File Not Found",MB_OK); EnableButtons(); Screen->Cursor = oldCursor; return; } // read sequential data while (!feof(fp)) { tmp[0]=0; fgets(buffer,BUF_LEN,fp); // IndexBuffer(buffer); Applic...
example start...MessageBoxA("Indexation Finished","RealIsam",MB_OK); } //--------------------------------------------------------------------------- ...
example version...MessageBoxA(version,"Version",MB_OK); } //--------------------------------------------------------------------------- ...
method
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...
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...
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...
microbiology
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); } ...
microsoft
realisamdoc deletekey...ReadDirectKey(1,"microsoft",ReturnKey,&recdata); if (rc) { rc=db->DeleteKey(1,"microsoft"); rc=db->DeleteRecord(recdata); } else .............. ...
realisamdoc deletekey...DeleteKey(1,"microsoft"); rc=db->DeleteRecord(recdata); } else .............. ...
realisamdoc deleterecord...ReadDirectKey(0,"microsoft",RetKey,&recdata); if (rc) rc = db->DeleteRecord(&recdata); ................. ...
realisamdoc readdirect...ReadDirectKey(0,"microsoft",RetKey,&recdata); if (rc) // ok : key found { rc = db->ReadRecord(buffer,recdata); buffer[rc]=0; ............. } 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 recordlength...ReadDirectKey(0,"microsoft",RetKey,&recdata); if (rc) // success { len = db->RecordLength(recdata); if (len) { buffer = malloc(len+2); .... } else { ... empty ...} } .......... ...
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...
realisamdoc writerecord...WriteKey(0,"microsoft",recdata); if (rc) // key insert ok { db->WriteRecord(buffer,strlen(buffer)+1); ....... } else ............. ...
million
realisamdoc overview...l, 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. ...
mode
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_directory,"\...
realisamdoc getindex... Returns the value of the mode for a given index. ...
realisamdoc getindex...int mode = db->GetIndexMode(int Index); ...
realisamdoc getindex...Int mode = 0 if unique keys, 1 if duplicate keys. ...
realisamdoc getindex...realisam *db; .................. //APPLIC.CPP // constructor ............... db = new realisam(); ................ // procedure int mode; ............... mode = db->GetIndexMode(12); ....................... ...
realisamdoc getindex............ //APPLIC.CPP // constructor ............... db = new realisam(); ................ // procedure int mode; ............... mode = db->GetIndexMode(12); ....................... ...
module
realisamdoc overview...DLL module size, less than 90 KB ...
more
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. ...
multi
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 backup...Checked==true) multi=1; else multi=0; Screen->Cursor = crHourGlass; strcpy(tmp,lIndex->Caption.c_str()); INDEX=atoi(tmp); DisableButtons(); eWord->Text==""; mWord->Clear(); gettime(&t); nbsec1 = t.ti_hour*3600+t.ti_min*60 + t.ti_sec; nbrecords=0; nbseq=0; nbisam=0; rc = d...
example backup...Checked==true) multi=1; else multi=0; Screen->Cursor = crHourGlass; strcpy(tmp,lIndex->Caption.c_str()); INDEX=atoi(tmp); DisableButtons(); eWord->Text==""; mWord->Clear(); gettime(&t); nbsec1 = t.ti_hour*3600+t.ti_min*60 + t.ti_sec; nbrecords=0; nbseq=0; nbisam=0; rc = d...
example backup...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...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...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 formcreate...OpenEngine(name,120,"ndx","dat"); //120 = 128 - 8 multi = dict->GetIndexMode(INDEX); if (multi==0) cb->Checked==false; else cb->Checked=true; // GetVersion Number dict->Version(tmp); MainForm->Caption = "Alpes Software - " + AnsiString(tmp); // Get Number of Keys rc = dict->N...
example formcreate...GetIndexMode(INDEX); if (multi==0) cb->Checked==false; else cb->Checked=true; // GetVersion Number dict->Version(tmp); MainForm->Caption = "Alpes Software - " + AnsiString(tmp); // Get Number of Keys rc = dict->NumberOfKeys(INDEX); lKeys->Caption = AnsiString(rc); if (rc) Fir...
example include... instance for duplication example char base_directory[MAX_PATH]; char dict_directory[MAX_PATH]; int nbrecords; int multi; int INDEX; int M_recdata; // memorizes data record pointer char M_Key[MAX_KEY]; // memorizes Key int __fastcall...
example restore...Checked==true) multi=1; else multi=0; dict->CloseEngine(); // delete isam files strcpy(name,dict_directory);strcat(name,"dict.ndx"); rc = unlink (name); strcpy(name,dict_directory);strcat(name,"dict.dat"); rc =unlink (name); Screen->Cursor = crHourGlass; DisableButtons(); eWor...
example restore...Checked==true) multi=1; else multi=0; dict->CloseEngine(); // delete isam files strcpy(name,dict_directory);strcat(name,"dict.ndx"); rc = unlink (name); strcpy(name,dict_directory);strcat(name,"dict.dat"); rc =unlink (name); Screen->Cursor = crHourGlass; DisableButtons(); eWor...
example restore...SetIndexMode(INDEX,multi); // if MULTI == 1 duplicate key allowed rc = dict->SetIndexMode(INDEX+1,multi); nbrecords=0; strcpy(name,dict_directory);strcat(name,"dict.txt"); fp = fopen(name,"r"); if (!fp) {Application->MessageBoxA("File DICT.txt not Found","File Not Found",MB_OK); ...
example restore...SetIndexMode(INDEX,multi); // if MULTI == 1 duplicate key allowed rc = dict->SetIndexMode(INDEX+1,multi); nbrecords=0; strcpy(name,dict_directory);strcat(name,"dict.txt"); fp = fopen(name,"r"); if (!fp) {Application->MessageBoxA("File DICT.txt not Found","File Not Found",MB_OK); ...
example restore...SetIndexMode(INDEX+1,multi); nbrecords=0; strcpy(name,dict_directory);strcat(name,"dict.txt"); fp = fopen(name,"r"); if (!fp) {Application->MessageBoxA("File DICT.txt not Found","File Not Found",MB_OK); EnableButtons(); Screen->Cursor = oldCursor; ...
example start...Checked==true) multi=1; else multi=0; strcpy(tmp,"Indexation will delete and rebuild the dictionary, OK ? "); if (Application->MessageBoxA(tmp,"Isam Dictionary",MB_YESNO)==IDNO) return; rc=dict->CloseEngine(); // delete isam files strcpy(tmp,dict_directory);strcat(tmp,"dict.ndx"); ...
example start...Checked==true) multi=1; else multi=0; strcpy(tmp,"Indexation will delete and rebuild the dictionary, OK ? "); if (Application->MessageBoxA(tmp,"Isam Dictionary",MB_YESNO)==IDNO) return; rc=dict->CloseEngine(); // delete isam files strcpy(tmp,dict_directory);strcat(tmp,"dict.ndx"); ...
example start...SetIndexMode(INDEX,multi); // if MULTI == 1 duplicate key allowed rc = dict->SetIndexMode(INDEX+1,multi); nbrecords=0; // read contents of the 1-26 HTML Files (in alphabetic reverse order, just for fun) for (i=nbf;i>=0;i--) // for (i=0;i...
example start...SetIndexMode(INDEX,multi); // if MULTI == 1 duplicate key allowed rc = dict->SetIndexMode(INDEX+1,multi); nbrecords=0; // read contents of the 1-26 HTML Files (in alphabetic reverse order, just for fun) for (i=nbf;i>=0;i--) // for (i=0;i...
example start...SetIndexMode(INDEX+1,multi); nbrecords=0; // read contents of the 1-26 HTML Files (in alphabetic reverse order, just for fun) for (i=nbf;i>=0;i--) // for (i=0;i...
example start...SetIndexMode(INDEX,multi); rc = dict->SetIndexMode(INDEX+1,multi); } StatusBar1->SimpleText = ""; First(); Screen->Cursor = oldCursor; Beep(); EnableButtons(); Application->MessageBoxA("Indexation Finished","RealIsam",MB_OK); } //----------------------------------------...
example start...SetIndexMode(INDEX+1,multi); } StatusBar1->SimpleText = ""; First(); Screen->Cursor = oldCursor; Beep(); EnableButtons(); Application->MessageBoxA("Indexation Finished","RealIsam",MB_OK); } //--------------------------------------------------------------------------- ...
multiples
realisamdoc open...ated and written. If data length 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. ...
must
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...
mword-
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...Text==""; mWord->Clear(); gettime(&t); nbsec1 = t.ti_hour*3600+t.ti_min*60 + t.ti_sec; nbrecords=0; nbseq=0; nbisam=0; rc = dict->ReadFirstKey(INDEX,RetKey,&recdata); while (rc) { if (strlen(RetKey) > 30) Application->MessageBoxA(RetKey,"Key Length > 30",MB_OK); rc=dict-...
example clear...Text=""; mWord->Clear(); } //--------------------------------------------------------------------------- ...
example first...__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...ReadRecord(buffer,recdata); M_recdata=recdata; strcpy(M_Key,RetKey); if (rc) mWord->SetTextBuf(buffer); } } void __fastcall TMainForm::btFirstClick(TObject *Sender) { First(); } //--------------------------------------------------------------------------- ...
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 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...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...ReadRecord(buffer,recdata); M_recdata=recdata; strcpy(M_Key,RetKey); if (rc) mWord->SetTextBuf(buffer); } } //--------------------------------------------------------------------------- ...
example restore...Text==""; mWord->Clear(); gettime(&t); nbsec1 = t.ti_hour*3600+t.ti_min*60 + t.ti_sec; strcpy(tmp,lIndex->Caption.c_str()); INDEX=atoi(tmp); if (INDEX ...
example search...Text=="") { mWord->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 (r...
example search...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 search...Clear(); mWord->SetTextBuf(buffer); } } else { mWord->SetTextBuf("Word Not Found"); } M_recdata=recdata; strcpy(M_Key,RetKey); } ...
example start...Text=""; mWord->Clear(); RK->Caption = ""; lKeys->Caption = ""; lRecords->Caption=""; lElap->Caption=""; // GET INDEX VALUE; strcpy(tmp,lIndex->Caption.c_str()); INDEX=atoi(tmp); if (INDEX ...
example update... 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"; } //----...
example wordmouseup... void __fastcall TMainForm::mWordMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y) { char tmp[200]; mWord->GetSelTextBuf(tmp,100); if (strlen(tmp)==0) return; eWord->Text=AnsiString(tmp); Search(); } //---------------------------------------------...
mword
example include...eControl *PageControl1; TTabSheet *TabSheet2; TButton *btStart; TLabel *Label15; TEdit *eWord; TMemo *mWord; TLabel *lelapsed; TStatusBar *StatusBar1; TButton *btSearch; TLabel *lElap; TButton *btNext; ...
mwordmouseup
example include...*Sender); void __fastcall btPrevClick(TObject *Sender); void __fastcall Exit2Click(TObject *Sender); void __fastcall mWordMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y); void __fastcall btBackupClick(TObject *Sender); ...
example wordmouseup... void __fastcall TMainForm::mWordMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y) { char tmp[200]; mWord->GetSelTextBuf(tmp,100); if (strlen(tmp)==0) return; eWord->Text=AnsiString(tmp); Search(); } //---------------------------------------------...
Copyright Alpes Software - Documentation and HTML pages generated by Final Doc