0

I have an application without sources, using 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.

Drew
  • 24,851
  • 10
  • 43
  • 78
Gianni Giordano
  • 143
  • 1
  • 2
  • 13
  • You're right...too much time in front of the monitor for this problem...thanks – Gianni Giordano Aug 26 '15 at 18:29
  • ok so what do you want to do? You have a table that has a new timestamp since something to compare it to? You want to extract data and bail out of 3.23? (probably not). The question just lacks anything to chomp on. Show a table structure, something, in native form, not hand typed. And then with that table, describe what you want to do with it. Then, hey let's do that with all tables. – Drew Aug 26 '15 at 18:35
  • instead of timestamps, there is a column that stores the time in milliseconds when the update. I need to retrieve the newly added record. The table structure is below: [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));[edit] – Gianni Giordano Aug 26 '15 at 19:19
  • from [wikipedia](https://en.wikipedia.org/wiki/MySQL) 3.23 is from year 2000. So I am thinking a windows xp dev box with visual studio 2005 would suit pretty well. You can get it off bizspark for free – Drew Aug 26 '15 at 19:40

1 Answers1

0

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 . you can add appropriate reference for MySQL database and create an adapter and commands you need to retrieve data from database .

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

and if you need further clarifications and be familiar with its classes and methods i recommend to check this out : MySQL commands

Mehdi
  • 329
  • 1
  • 3
  • 14
  • You're right. As I understand it, I can connect on MySQL 3.23 and retrieve data with connector 1.0. If so, how can I do coexist the two versions of the .NET connector? Thanks – Gianni Giordano Aug 26 '15 at 18:49
  • I'd try to install .NET 1.0, but maybe the frameword required is only .NET 1.1, even if I've installed 4.5.. Is it possible it? – Gianni Giordano Aug 26 '15 at 18:57
  • well as i say the truth i didnt face to such kinds of problems like this but as i read some texts about .NET it should be possible . and ofcourse newer versions must supports olders . have you ever try it ? – Mehdi Aug 26 '15 at 19:05
  • oh yes. all versions of connector can connect to MySQL Server that is at least release 4.01 – Gianni Giordano Aug 26 '15 at 19:11
  • the word coexist you use make my mind thinking about some bloody polymorphism techniques , sounds really a good challenge for me too to work on , whats the name and the version of software you want to update ? and are you sure it connects directly to a database to update itself ? i mean are you sure there isnt any server handshaking and redirects between the update procedure – Mehdi Aug 26 '15 at 19:23
  • there are not linked server maybe, and nothig redirect. I must write a c# WinApp from zero that read the new record on update event in MySql 3.23 DataBase. My release of Mysql that I'm working for new app is 5.6 – Gianni Giordano Aug 26 '15 at 19:27
  • since when is the following true: `and ofcourse newer versions must supports olders` :> – Drew Aug 26 '15 at 19:28
  • I'd try with 6.3 release of connector, and the server must be at least 4.01. – Gianni Giordano Aug 26 '15 at 19:35
  • [here](http://dev.mysql.com/doc/connector-net/en/connector-net-versions.html) there are the answer. Is it possible ? – Gianni Giordano Aug 26 '15 at 19:38