Constraint-Problem

  • Thread starter Thread starter Dr. P. Dietz
  • Start date Start date
D

Dr. P. Dietz

Hello NG,

I've a dataset which gets it's data from a
sql= "select usr,grop from tab1 where ..."
where usr is primary key field in this ORA-Table.
But creating the primary-Key-Constraint will cause an
error because "values are not unique" (correct
translation?? in german "nicht eindeutig")

With cmd
.CommandText = SQL
.Connection = cnORA
End With
da.SelectCommand = cmd
da.Fill(ds, "PRF_tab1")

With ds.Tables("PRF_tab1")
ERROR-> .Constraints.Add("USR_KEY", .Columns("USR"), True)
End With

I've tried the select in ORA-Worksheet, I cannot find any
double values.

Where is the problem??
thanks!
Peter
 
Hi Dr.,

You might bind your table to a datagrid (without adding constraint) and
check the data.
Are you invoking Fill more than once perhaps?
 
Back
Top