+ Reply to Thread
Results 1 to 2 of 2

Thread: Relax or turn off constraints in DataSet

  1. #1
    Chris Sergent
    Join Date
    Apr 2010
    Posts
    28
    Points
    1
    Answers Provided
    0


    0

    Question Relax or turn off constraints in DataSet

    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/libr...fa(VS.90).aspx

    and then to the example as this location:
    http://msdn.microsoft.com/en-us/libr...ts(VS.90).aspx

    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.

    Chris

  2. #2
    Domenico Ciavarella

    Join Date
    Mar 2010
    Posts
    2,678
    Points
    458
    Answers Provided
    71


    0

    Default Re: Relax or turn off constraints in DataSet

    I don't understand why you don't use a table (part many) with type crime.

    - Feature Class Point (address)
    ObjectID


    - Table (crime)
    ObjectID
    ForeignKeyObjectIDAddress
    TypeCrime
    Studio A&T srl

    Domenico Ciavarella

    ESRI Certified
    Enterprise Geodatabase Management Associate 10.1
    Web Application Developer Associate 10.1

    My ArcGIS.com

    Blog: NicoGis

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts