473,498 Members | 1,528 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CommandBuilder problem. Is it broken? vb.net2003.

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
1 1221
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2266
by: Joao Santa Barbara | last post by:
Hi all i have a table with an autonumber field with a based select , i want to get all the three others commands, my problem is, i have a ds and i want to insert a new row ( my database gives...
10
1656
by: Joao Santa Barbara | last post by:
hi all i need to work with the commandbuilder and with a transaction object how can i do this ???? thks JSB please don´t tell me that i have to do this ex:
18
1646
by: John at Free Design | last post by:
Thanks in advance for the help and let me know if this should be posted to another MSDN. I am developing a web-based application in VS.NET2003 using VB. When I insert a graphic into a project...
1
1905
by: Dev | last post by:
Dear Friends, I have created VC++.NET dll by VS.NET2003.Is it possible to use this dll(vs.net2003) into C# version (Vs.net2002)? Is there backward compatibility? If so ..How do to this?..If...
1
2054
by: Jason Shohet | last post by:
What we've done so far in our web applications: 1. We have no datasets dragged-and-dropped in Visual Studio. They are all defined in the code, generated at runtime. 2. when a user updates or...
17
1239
by: Tom Leylan | last post by:
Does anybody have any idea why my version of VS.Net doesn't accept the following syntax? For Each f As FileInfo In d.GetFiles() sz += f.Length Next f I always have to explicitly declare the...
3
1705
by: Ed | last post by:
I just learned how to use the Commandbuilder and have researched it a little bit further and see that there is a dispose property. Should this be used after invoking the command builder or does...
9
1523
by: whaletyr | last post by:
When I try to update an access database using the commandbuilder and updatecommand. I get the An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll ...
5
4440
by: Benzi Eilon | last post by:
I have written a C# application which should run as a Windows Service. I must avoid having multiple instances of the application on one machine so I inserted the following code at the beginning of...
0
7124
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6998
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7163
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6884
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
4904
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4586
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1416
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
651
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.