1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2016
    Rep Power

    How do I check if citation number exist in database?

    What I am trying to do is to use an array to check if citation number in xml document already exist in the database.
    If the citation number is not found, the first slot in the returned array will contain the value "No Matching Case".
    If the number exist then the number will be displayed in the array.
    I need to call GetCaseNumbersForCitation method (astringCitationNumber, ablnUsePrimaryDatasourceOnly) from the library.
    Parameters astrCitationNumber (String) is the Citation Number, ablnUsePrimaryDatasourceOnly (Boolean) allows you to specify whether the replica can be used for this query or not

    My shared sub TestCitationGetCaseNumber() code has an error Value of type '1-dimensional array of String' cannot be converted to 'String'.
    Public Shared Function GetCaseNumbersForCitation (astrCitationNumber As String, ablnUsePrimaryDatasourceOnly As Boolean) As String()
    Here is my test code
    Option Explicit On
    Option Strict On
    Imports System.IO
    Imports System.Xml
    'Imports Msc.Integration.Mncis.Library.v4 which has Citation.vb code and the method to call GetCaseNumbersForCitation
    Public Class Test_Code
        Public Shared Sub main()
        End Sub
        Shared Sub TestCitationGetCaseNumber()
         Dim strCitationNumber As String
         Dim strCitationORI As String
         strCitationNumber = Msc.Integration.Mncis.Library.v4.Citation.GetCaseNumbersForCitation(strCitationNumber, strCitationORI)
        End Sub
    End Class
    Xml document

    <?xml version="1.0" encoding="UTF-8"?>
    		<NS1:JuvenileCitationDocument xmlns:NS1="http://www.courts.state.mn.us/CourtXML/3" schemaVersion="3:3" messageProducedDateTime="2016-07-01T08:33:17.2276598-05:00" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.courts.state.mn.us/CourtXML/3 file:///H:/Deve/Schemas/CourtXML/JuvenileCitationDocument_3_3.xsd">
    				<NS1:ChargingDecisionTypeText>Juvenile Petty Offense</NS1:ChargingDecisionTypeText>
    Last edited by okaymy1112; August 11th, 2016 at 12:10 PM. Reason: Added code to Shared Sub TestCitationGetCaseNumber
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2016
    Rep Power
    I no longer need help with this question
  4. #3
  5. Not An Expert
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2015
    Rep Power
    Our users - and any future visitors - would love to hear how you found a solution, if you're willing to share one

    Otherwise I will close this thread since no help is needed.

IMN logo majestic logo threadwatch logo seochat tools logo