PC Review


Reply
Thread Tools Rate Thread

CommandBuilder problem. Is it broken? vb.net2003.

 
 
Jeremy
Guest
Posts: n/a
 
      14th May 2005
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


 
Reply With Quote
 
 
 
 
Ken Tucker [MVP]
Guest
Posts: n/a
 
      14th May 2005
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
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



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CommandBuilder Problem Wayne Wengert Microsoft ADO .NET 4 26th Sep 2005 02:34 PM
little problem replacing commandbuilder =?Utf-8?B?S2Vu?= Microsoft ADO .NET 1 15th Nov 2004 10:39 PM
VS.NET2003 & emulator problem! Lloyd Dupont Microsoft Dot NET Compact Framework 1 14th Sep 2004 04:54 AM
Problem between different Lang. VS.net2003? hkjamjam Microsoft Dot NET Framework Forms 1 25th Feb 2004 12:39 PM
CommandBuilder Problem Joao Santa Barbara Microsoft ADO .NET 2 26th Aug 2003 03:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:04 PM.