简体   繁体   English

对PageFile进行读/写

[英]Read/Write to/from PageFile

I use an embedded DB for two applications that one of them is Server and another one is client.The client side app. 我使用嵌入式数据库用于两个应用程序,其中一个是服务器,另一个是客户端。客户端应用程序。 can send fetch data request to server side to retrieve data and show in a table (or sth else).Question is this: How may I save(write) fetched data into pagefile and read that from it when needed(in java, Delphi or c#)? 可以向服务器端发送获取数据请求以检索数据并显示在表中(或者其他)。问题是:我如何将获取的数据保存(写入)到页面文件中并在需要时从中读取(在java,Delphi或C#)?

Your data is fetched out from the server-side to client-side as in a JTable successfully.For saving the fetched data you have to read the cell data of table and save that data into a text file format in a particular directory. 您的数据从JT服务器端成功地从服务器端提取到客户端。为了保存提取的数据,您必须读取表的单元格数据并将该数据保存为特定目录中的文本文件格式。 When you re-run your application you can easily pick your saved data from that directory. 当您重新运行应用程序时,您可以轻松地从该目录中选择已保存的数据。

You can use Shared Memory mechanism. 您可以使用共享内存机制。 It effectively allocates a chunk of memory in the page file and allows inter-process sharing. 它有效地在页面文件中分配一块内存,并允许进程间共享。

Note: since you specified Delphi and C# tags, I assume you have access to WinAPI functions, such as CreateFileMapping and MapViewOfFile . 注意:由于您指定了Delphi和C#标记,我假设您可以访问WinAPI函数,例如CreateFileMappingMapViewOfFile

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM