"Carlos Guzman Alvarez" <car...@te...> wrote in message
news:3F1...@te......
<cut>
>
> There are anything bad in this example ???
I'm very sorry.. I forgot to tell you I was inserting values...
If I use the following example with the 1.0 Provider I get the values
correctly stored but if I use the 1.1a2 version (or the CVS version) I get
the values divided by 1000.
Here is my code:
FbConnection Conn = new FbConnection(connectionString);
Conn.Open();
FbTransaction Trans = Conn.BeginTransaction();
FbCommand Cmd = new FbCommand("INSERT INTO MYTABLE(NUMERIC_08,
NUMERIC_10) VALUES (@NUMERIC_08, @NUMERIC_10)", Conn, Trans);
Cmd.Parameters.Add("@NUMERIC_08", FbType.Numeric).Value = 100.50M;
Cmd.Parameters.Add("@NUMERIC_10", FbType.Numeric).Value = 100.50M;
Cmd.ExecuteNonQuery();
Trans.Commit(); // rolled back by default?
Conn.Close();
And the DDL:
CREATE TABLE MYTABLE (
NUMERIC_08 NUMERIC(8,2),
NUMERIC_10 NUMERIC(10,2)
);
Thank you.
Ciao,
Alessandro Petrelli.
|