Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 4 and Visual Studio 2010 > .NET 4 and Visual Studio 2010 General Discussions
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
.NET 4 and Visual Studio 2010 General Discussions For discussing anything about .NET 4, WPF, WCF, the rest of the .NET 4 Framework, and Visual Studio 2010 that isn't about a specific Wrox book. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET 4 and Visual Studio 2010 General Discussions section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 10th, 2016, 04:59 PM
Authorized User
Points: 376, Level: 6
Points: 376, Level: 6 Points: 376, Level: 6 Points: 376, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2013
Posts: 84
Thanks: 11
Thanked 0 Times in 0 Posts
Default How do I check if citation number in xm document 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'.
Code:
Public Shared Function GetCaseNumbersForCitation (astrCitationNumber As String, ablnUsePrimaryDatasourceOnly As Boolean) As String()
Here is my test code
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()
        TestCitationGetCaseNumber()
    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

Code:
<?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:EFileID>
				<NS1:ID>321</NS1:ID>
			</NS1:EFileID>
			<NS1:SubmittingAgencyORI>
				<NS1:ID>MN027013A</NS1:ID>
			</NS1:SubmittingAgencyORI>
			<NS1:Filing>
				<NS1:ProsecutingAgencyORI>
					<NS1:ID>MN027013A</NS1:ID>
				</NS1:ProsecutingAgencyORI>
				<NS1:CourtJurisdictionORI>
					<NS1:ID>MN027055J</NS1:ID>
				</NS1:CourtJurisdictionORI>
				<NS1:OtherAgencyNumber>
					<NS1:ID>16J07491</NS1:ID>
					<NS1:IDTypeCodeText>PRSF</NS1:IDTypeCodeText>
				</NS1:OtherAgencyNumber>
				<NS1:ChargingDecisionTypeText>Juvenile Petty Offense</NS1:ChargingDecisionTypeText>
			</NS1:Filing>
			<NS1:Citation>
				<NS1:CitationNumber>
					<NS1:ID>2770043451</NS1:ID>
				</NS1:CitationNumber>
				<NS1:IssuingAgencyORI>
					<NS1:ID>MN0271100</NS1:ID>
				</NS1:IssuingAgencyORI>
		</NS1:JuvenileCitationDocument>

Last edited by winkimjr2; August 11th, 2016 at 01:12 PM. Reason: Added code to Shared Sub TestCitationGetCaseNumber
Reply With Quote
  #2 (permalink)  
Old August 16th, 2016, 01:00 PM
Authorized User
Points: 376, Level: 6
Points: 376, Level: 6 Points: 376, Level: 6 Points: 376, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2013
Posts: 84
Thanks: 11
Thanked 0 Times in 0 Posts
Default Resolved

I no longer need help with this question
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to check for a number and throw exception if one exist before adding a new one? winkimjr2 .NET 4 and Visual Studio 2010 General Discussions 0 October 6th, 2014 05:39 PM
How do I check to see if StartTime exist before using it? winkimjr2 XSLT 0 August 11th, 2014 10:39 AM
XSLT Check if directory exist ArnArn XSLT 3 November 23rd, 2008 02:44 PM
check for image field exist goldenstate ASP.NET 2.0 Basics 2 May 22nd, 2007 12:36 PM



All times are GMT -4. The time now is 10:45 AM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.