By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,582 Members | 1,694 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,582 IT Pros & Developers. It's quick & easy.

CommandBuilder problem. Is it broken? vb.net2003.

P: n/a
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
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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" <je****@ninprodata.com> wrote in message
news:Ob**************@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

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.