>
> IMHO it's because FAC_SELECTION doesn't have default value, so VS is not
> able to be 100% sure whether the insert will be OK (i.e. generator in
> trigger can "fix" this, but VS doesn't know this).
>
thanks jiro for the rapidity,

but i will try with this :
CREATE TABLE ACH_FAM (
    FAC_CODE       SMALLINT NOT NULL,
    FAC_NOM        VARCHAR(30) DEFAULT 'test',
    FAC_SELECTION  SMALLINT DEFAULT          1
);

and i have the same problem and i will try with an access database and it's 
works fine.

 More over when i put all column in the select command the insert command is 
generated and the code is :
<InsertCommand>

<DbCommand CommandType="Text" ModifiedByUser="False">

<CommandText>INSERT INTO "ACH_FAM" ("FAC_CODE", "FAC_NOM", "FAC_SELECTION") 
VALUES (@FAC_CODE, @FAC_NOM, @FAC_SELECTION)</CommandText>

<Parameters>

<Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" 
DbType="Int16" Direction="Input" ParameterName="@FAC_CODE" Precision="0" 
Scale="0" Size="2" SourceColumn="FAC_CODE" SourceColumnNullMapping="False" 
SourceVersion="Current">

</Parameter>

<Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" 
DbType="String" Direction="Input" ParameterName="@FAC_NOM" Precision="0" 
Scale="0" Size="30" SourceColumn="FAC_NOM" SourceColumnNullMapping="False" 
SourceVersion="Current">

</Parameter>

<Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" 
DbType="Int16" Direction="Input" ParameterName="@FAC_SELECTION" 
Precision="0" Scale="0" Size="2" SourceColumn="FAC_SELECTION" 
SourceColumnNullMapping="False" SourceVersion="Current">

</Parameter>

</Parameters>

</DbCommand>

</InsertCommand>

If we look the different parameter we can see that AllowDbNull is always set 
to "False" or only the FAC_CODE Column should set to "False". Maybe the 
problem is here ?





-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to