Alfredo Luis Torres Serrano
asked on
VB .Net and Datasets
Hi Experts,
I have a combobox control that have a datasource created with the datasource wizard and basiccly is:
SELECT DISTINCT '-Seleccione-' As Login FROM CMS
Union All
SELECT Distinct rtrim(Login) FROM CMS WHERE Convert(Smalldatetime,Fech a,103) Between Convert(Smalldatetime,@Fec haI,103) And Convert(Smalldatetime,@Fec haF,103) Order By login Desc
After i call
CMSTableAdapter.Fill(Db_As istenciaDa taSet.CMS, Format(DateTimePicker1.Val ue, "dd/MM/yyyy"), Format(DateTimePicker2.Val ue, "dd/MM/yyyy"))
An exception is thrown telling me:
Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints
But the dataset is filled (The combobox is filled).
Any idea
Thanks
CMSTableAdapter.Fill(Db_As istenciaDa taSet.CMS, Format(DateTimePicker1.Val ue, "dd/MM/yyyy"), Format(DateTimePicker2.Val ue, "dd/MM/yyyy"))
An exception is theown telling me that:
Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints
But the combobox is filled.
Any idea?
Thanks
I have a combobox control that have a datasource created with the datasource wizard and basiccly is:
SELECT DISTINCT '-Seleccione-' As Login FROM CMS
Union All
SELECT Distinct rtrim(Login) FROM CMS WHERE Convert(Smalldatetime,Fech
After i call
CMSTableAdapter.Fill(Db_As
An exception is thrown telling me:
Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints
But the dataset is filled (The combobox is filled).
Any idea
Thanks
CMSTableAdapter.Fill(Db_As
An exception is theown telling me that:
Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints
But the combobox is filled.
Any idea?
Thanks
have you seen http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework.adonet/topic14842.aspx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
cs97jjm3: None of the 3 cases expained on you post is my case i just have one table and that table does not have any key field and all field accept nulls and the query runs perfect on a query window.
TheLearnedOne: I have no keys on that table but your post help me to find a solution that was:
Db_AsistenciaDataSet.Enfor ceConstrai nts = False just before fill the dataset.
Thanks
TheLearnedOne: I have no keys on that table but your post help me to find a solution that was:
Db_AsistenciaDataSet.Enfor
Thanks