[英]Retrieve updated data from Database
I have an application without sources, using MySql DataBase 3.23, C# .net-4.0. 我有一个没有源的应用程序,使用MySql DataBase 3.23,C#.net-4.0。
I can't update to the new version, and, I must retrieve the new data on update table. 我无法更新到新版本,并且必须在更新表上检索新数据。 The trigger can't be used for this version. 触发器不能用于此版本。 Of course I have user and password for log in. You help me please on how can I extract the new records? 当然,我有用于登录的用户名和密码。请您帮助我如何提取新记录? thanks in advance. 提前致谢。
Edit: 编辑:
CREATE TABLE PREPARATI (
TIPO CHAR(1),
UNITA CHAR(30),
PARAMETRO CHAR(30) ,
CODICE CHAR(30),
PRODOTTO CHAR(30),
LOTTO CHAR(30) ,
FASE CHAR(30),
STATO smallint,
BEGIN_T int,
END_T int,
TOT_T int,
INCR_T int,
N_SAMPLES int,
TOT_Q float,
INCR_Q float,
GLOB_Q float,
MIN_Q float,
MAX_Q float,
CAUSA smallint,
FMT_COD CHAR(1),
TIPO_COD smallint,
CODES CHAR(254),
INDEX Xtime (BEGIN_T, END_T)
);
Instead of timestamps, there is a column that stores the time in milliseconds upon update. 代替时间戳,有一列存储更新时的时间(以毫秒为单位)。 I need to retrieve the newly added record. 我需要检索新添加的记录。
if i completely understand what you mean you want to write codes to retrieve information from a MySQL database so you are familiar with database programming and SQL commands i assume you are familiar to connect to a SQL server database as a C# programmer knows it . 如果我完全理解您的意思,您想要编写代码从MySQL数据库中检索信息,从而熟悉数据库编程和SQL命令,我认为您熟悉C#程序员所知的连接SQL Server数据库的方法。 you can add appropriate reference for MySQL database and create an adapter and commands you need to retrieve data from database . 您可以为MySQL数据库添加适当的参考,并创建从数据库检索数据所需的适配器和命令。
the dll you need is MySql.Data.dll and the namespace to use is MySql.Data you can download it here : MySQL.Data.dll download page 您需要的dll是MySql.Data.dll,要使用的命名空间是MySql.Data,您可以在这里下载 : MySQL.Data.dll下载页面
and if you need further clarifications and be familiar with its classes and methods i recommend to check this out : MySQL commands 并且如果您需要进一步的说明并熟悉其类和方法,我建议您检查一下: MySQL命令
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.