Programatically set a database attribute - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Programatically set a database attribute

Last post 01-25-2013 04:22 PM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-18-2013 08:47 AM

    Programatically set a database attribute

    Hello

    I am trying to programatically set a SQL database attribute, and I keep getting errors.

    I am trying to use this code to set the @ComIPSCode value to 'CaseCode'.  I am able to set other fields in the form to the CaseCode value, but for some reason I am unable to set the @ComIPSCode using this. Can anyone see any problems?  Do I need a diferent method for setting a database attribute?

    Try

    Me.Errors.DeleteAll() webservConn.Execute(Nothing, OutputNav, ErrorNav)
    Dim CaseCode As String

    If CheckReturnStatus(OutputDoc) = False Then

    CaseCode = GetCaseCode(OutputDoc)

    Dim xNav As XPathNavigator = Me.CreateNavigator() Dim ns As XmlNamespaceManager = Me.NamespaceManager
    xNav.SelectSingleNode("//dfs:myFields/dfs:dataFields/d:TrustDeeds/@ComIPSCode", ns).SetValue(CaseCode)

    End If

    Catch ex As Exception
    System.Windows.Forms.MessageBox.Show(ex.InnerException.ToString)

    End Try

  • 01-25-2013 04:22 PM In reply to

    Re: Programatically set a database attribute

    Hi - what's the error you are getting?
    Hilary Stoupa

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.