Web Service Exception

If you are having a problem using Dragnet, post a message here.

Moderator: SourceGear

Locked
ZackJones
Posts: 131
Joined: Mon Mar 08, 2004 6:30 am
Location: Warner Robins, GA

Web Service Exception

Post by ZackJones » Mon May 09, 2005 10:23 am

Greetings,

I'm trying to add items to Dragnet using the web service and I'm getting an exception from the database when I try to insert an item.

The exception reads

"1: Failure --> INSERT statement conflicted with COLUMN CHECK constraint 'chk_items_accesstype'. The conflict occurred in database 'sgdragnet', table 'items', column 'accesstype'. The statement has been terminated.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.Services.Protocols.SoapException: 1: Failure --> INSERT statement conflicted with COLUMN CHECK constraint 'chk_items_accesstype'. The conflict occurred in database 'sgdragnet', table 'items', column 'accesstype'. The statement has been terminated."

and I'm trying to insert it using the following code:

Code: Select all

Dim dragnetService As New dn.DragnetWebService
        Dim MI As New dn.MantisItem
        Dim intRet As Integer
        MI.ProjectID = 101
        MI.Description = "External Item"
        MI.Details = "Externally added"
        MI.CategoryID = 0
        MI.TypeID = 2
        MI.PlatformID = 1
        MI.Custom1 = "Zack Jones"
        MI.Custom2 = "5/9/2005"
        intRet = dragnetService.AddItemExternal(MI)
Am I doing something obviously wrong that I'm just overlooking?

mskrobul
Posts: 490
Joined: Wed Jan 14, 2004 10:22 am
Location: SourceGear
Contact:

Post by mskrobul » Mon May 09, 2005 12:16 pm

We added item access type in 1.0.3. In 1.0.3 items can be made private or public and apparently the dragnet service KB article needs to be updated :)

You need to specify if the item being added is public or private.

Add:
MI.ItemAccessType = dragnetService.AccessType.Public
or
MI.ItemAccessType = dragnetService.AccessType.Private

If you have "public access only" groups turned on in Dragnet, items marked private will not be viewable for users in the public access only groups.
Mary Jo Skrobul
SourceGear

ZackJones
Posts: 131
Joined: Mon Mar 08, 2004 6:30 am
Location: Warner Robins, GA

Post by ZackJones » Mon May 09, 2005 12:30 pm

Whew, I'm glad it wasn't me doing some stupid again :)

Locked