no... I have a UniqueConstraint on a field called 'cve_unidad', this field has .AllowDBNull = true, and i put DefaultValue = null in this field, but, there is still a the problem... when i put two rows in then datagrid, the second null value raises the error message: "Value Column 'cve_unidad' is constrained to be unique. Value '' is already present. Do you want to correct this value?" this is a example: cve_unidad | nom_unidad (null) | 'un nombre' <-- here is ok (null) | 'another nombre' <-- here raises the "already present" error This is an "autonumeric-like" scenario, i want to send some values at once, then clear an refill the datagrid with the data (with de autonumeric updated). I don't want to use the .AutoIncrement properte beacuse the value displayed will not neccesary equals the autonumeric value in the database. thanks
S
supercali
@supercali
Posts
-
How to define a null-ignoring unique constraint -
How to define a null-ignoring unique constraintHi. Is there a "ignore null's" property, or a way to implement it, in the Constraint or the UniqueConstraint of a DataTable? I have in the server (postgres 8.1.4) a field with a unique contraint, and this constraint can ignore nulls. How can i define such a thing in ADO.NET? Thanks.
-
Create windows account (user)Hi. Does anybody knows how to create a windows account with c# or some api's calls in c++? ( specifically a "restricted" one) Or a installer that creates windows accounts... Thanks Alejandro
-
MCAD/MCSD worth it??Hey people, I was one of the lucky (read extremely lucky) few had a job offer before graduation. I've been working with ASP .NET for about 10 months now and would like to know if an MCAD/MCSD is worth it, both professionally and financially. Ideas?? Suggestions??