Relax or turn off constraints in DataSet

Discussion created by csergent08 Champion on Sep 20, 2010
Latest reply on Sep 20, 2010 by ciava.at
My application maps out crimes by address. Each address displays symbols based on type of crime. An individual address could have up to 10 crimes. With the addresses that have multiple crimes I receive an error when attempting to run my code because of the OBJECTID, which represents the address point on the map.

The field OBJECTID, is constrained to be unique. In my spatialfilter as shown below, I have three values for the REQ_SEQ_NUM, but when I attempt to fill the resultsDataTable, I receive an error. A possible solution is to Relax or turn off constraints in my DataSet.

I have followed the recommendation to here: http://msdn.microsoft.com/en-us/library/4d40xefa(VS.90).aspx

and then to the example as this location:

Do you know how I should incorporate this solution into the following code, as I am not following exactly how I should apply this code:

Dim spatialFilter As New ESRI.ArcGIS.ADF.Web.SpatialFilter()
        'Assign SpatialFilter properties
        spatialFilter.ReturnADFGeometries = True
        spatialFilter.MaxRecords = 500000
        'Defines Query Based on Application the Called it
        spatialFilter.WhereClause = FEATURE_ID='3831' AND REQ_SEQ_NUM=1 OR FEATURE_ID='3831' AND REQ_SEQ_NUM=2 OR FEATURE_ID='3831' AND REQ_SEQ_NUM=3

        Dim resultsDataTable As System.Data.DataTable

        'Initialize the datatable
        resultsDataTable = qFunc.Query(Nothing, ids(i), spatialFilter)

Thanks again.