[英]Store a cache COPY of table locally SQL Server
Is it possible to store a cache copy of the table data locally to avoid transfer (data does not change, This I assure it!) in SQL Server
.是否可以在本地存储表数据的缓存副本以避免在
SQL Server
中传输(数据不会改变,我保证!)。 So C++, C#
can know the data stored by SQL in cache and then read the data in cache and compute some things with the table?那么
C++, C#
可以知道SQL在缓存中存储的数据,然后读取缓存中的数据并用表计算一些东西吗?
Is it possible this kind of communication between SQL Server and C++ or C#
via cache memory copy of table data? SQL Server and C++ or C#
之间是否可以通过缓存表 ZCD69B4957F06CD8291Z7BF3 的缓存进行这种通信?
ADO.You need to use ADO.NET (Disconnected) DataSets: ADO.您需要使用 ADO.NET (Disconnected) 数据集:
1) Create a Dataset 1) 创建数据集
DataSet dsCustomers = new DataSet();
2) Create a DataAdapter, specifying what data to get 2)创建一个DataAdapter,指定要获取什么数据
SqlDataAdapter daCustomers = new SqlDataAdapter(
"select CustomerID, CompanyName from Customers", conn);
3) Fill the Dataset 3)填充数据集
daCustomers.Fill(dsCustomers, "Customers");
After which you can Query your Dataset.之后您可以查询您的数据集。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.