E
Edouard LECOQ
I created a Infopath 2007 form linked to a SQL 2005 database table.
SQL Table creation script :
CREATE TABLE [dbo].[Cout](
[Id] [bigint] IDENTITY(1,1) NOT NULL,
[Qte] [float] NULL,
[PU] [float] NULL,
[Kamount] [float] NULL,
CONSTRAINT [PK_Cout] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY =
OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
After disposing the data fileds as a table, I put the folowing formula as
default value for the Kamount field : "(@Qte * @PU) * .001"
When I run and post the form :
Qte = 1, PU = 100 000, result : KAmount = 100
Qte = 0.01, PU = 100 000, result : KAmount = 1
Qte = 0.03, PU = 100 000, result : KAmount = NaN
Can somebody explain to me the NaN result ?
NB : This occurs as well whith InfoPath 2003 and SQL 2000
Thank's
SQL Table creation script :
CREATE TABLE [dbo].[Cout](
[Id] [bigint] IDENTITY(1,1) NOT NULL,
[Qte] [float] NULL,
[PU] [float] NULL,
[Kamount] [float] NULL,
CONSTRAINT [PK_Cout] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY =
OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
After disposing the data fileds as a table, I put the folowing formula as
default value for the Kamount field : "(@Qte * @PU) * .001"
When I run and post the form :
Qte = 1, PU = 100 000, result : KAmount = 100
Qte = 0.01, PU = 100 000, result : KAmount = 1
Qte = 0.03, PU = 100 000, result : KAmount = NaN
Can somebody explain to me the NaN result ?
NB : This occurs as well whith InfoPath 2003 and SQL 2000
Thank's