Home All Groups Group Topic Archive Search About

CommandBuilder problem. Is it broken? vb.net2003.

Author
14 May 2005 3:54 PM
Jeremy
When executing myda.update(myds,"cert").  I get the message

"The field 'Cert.DateofInspection' cannot contain a Null value because the
Required property for this field is set to True. Enter a value in this
field."

myda has a commandbuilder assigned (see the generated insert command,
below).  This makes no sense whatever to me, unless commandBuilder is
broken.

The table "cert" contains 1 row, and the offending column has the value:

? r.Item("DateOfInspection")
  #5/14/2005# {Date}
  [Date]: #5/14/2005#

Generated command:

INSERT INTO Cert( JobNumber , PoolNumber , CertType , FieldOfficeName ,
ClientID , DateofInspection , InTF , OutTF , Submit , OriginalInspection ,
Reinspection , Hopper , Truck , RailCar , MethodofSampling ,
IdentificationofGrain , KindOfGrainCodeName , Class , Grade , SpecialGrade ,
GradeandKind , PanTicketGrade , DKG , TestWeightperBushel , Moisture ,
HeatDamageTotal , Damage , ForeignMaterial , ShrunkenAndBroken ,
TotalDefects , ContrastingClasses , WheatofOtherClasses , BCFM , BKandFM ,
Splits , DHV , Protein , Odor , OtherGrain , WildOats , Sound , Broken ,
Thin , FN , Aflatoxin , Vomatoxin , Germination , Remarks , TopFeet ,
BottomNotSampled , Inspector , PanTicketNum , FMDetails , DamageDetails ,
DatePrinted , Plump , CompleteRemarks , Stones , Filth , FMOW , Dehulled ,
Summary , SOOColor , SMT , Sorts , IDKCount , ClubCount , Superseded ,
Weigher , Weight , InputDate , UnloadDate ) VALUES ( ? , ? , ? , ? , ? , ? ,
? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? ,
? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? ,
? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? ,
? , ? , ? , ? , ? , ? , ? , ? , ? )

Why?  What can I be doing wrong?  Is CommandBuilder broken?

Jeremy

Author
14 May 2005 10:21 PM
Ken Tucker [MVP]
Hi,

        I dont see any errors in the command builders insert command.  Maybe
you could post some code on how you add the record.

Ken
------------------------
"Jeremy" <jer***@ninprodata.com> wrote in message
news:ObssK1JWFHA.2572@TK2MSFTNGP14.phx.gbl...
When executing myda.update(myds,"cert").  I get the message

"The field 'Cert.DateofInspection' cannot contain a Null value because the
Required property for this field is set to True. Enter a value in this
field."

myda has a commandbuilder assigned (see the generated insert command,
below).  This makes no sense whatever to me, unless commandBuilder is
broken.

The table "cert" contains 1 row, and the offending column has the value:

? r.Item("DateOfInspection")
  #5/14/2005# {Date}
  [Date]: #5/14/2005#

Generated command:

INSERT INTO Cert( JobNumber , PoolNumber , CertType , FieldOfficeName ,
ClientID , DateofInspection , InTF , OutTF , Submit , OriginalInspection ,
Reinspection , Hopper , Truck , RailCar , MethodofSampling ,
IdentificationofGrain , KindOfGrainCodeName , Class , Grade , SpecialGrade ,
GradeandKind , PanTicketGrade , DKG , TestWeightperBushel , Moisture ,
HeatDamageTotal , Damage , ForeignMaterial , ShrunkenAndBroken ,
TotalDefects , ContrastingClasses , WheatofOtherClasses , BCFM , BKandFM ,
Splits , DHV , Protein , Odor , OtherGrain , WildOats , Sound , Broken ,
Thin , FN , Aflatoxin , Vomatoxin , Germination , Remarks , TopFeet ,
BottomNotSampled , Inspector , PanTicketNum , FMDetails , DamageDetails ,
DatePrinted , Plump , CompleteRemarks , Stones , Filth , FMOW , Dehulled ,
Summary , SOOColor , SMT , Sorts , IDKCount , ClubCount , Superseded ,
Weigher , Weight , InputDate , UnloadDate ) VALUES ( ? , ? , ? , ? , ? , ? ,
? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? ,
? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? ,
? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? ,
? , ? , ? , ? , ? , ? , ? , ? , ? )

Why?  What can I be doing wrong?  Is CommandBuilder broken?

Jeremy