Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. No error from SSMS but from applciation [modified] ------ Never mind, solved

No error from SSMS but from applciation [modified] ------ Never mind, solved

Scheduled Pinned Locked Moved Database
testingdatabasesql-serverbeta-testingtools
1 Posts 1 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mustafa Ismail Mustafa
    wrote on last edited by
    #1

    Turns out I was specifying the length of the XML string from the application. Goes to show how dumb one can be sometimes! This error has been driving me mad.   Testing the whole run from within SSMS using the same values that are provided by the application yields a perfectly working result; The application itself returns "XML parsing: line 1, character 4, unexpected end of input" The actual XML being sent is: <Data>    <AssignedDiet>       <PatientID>127686419</PatientID>       <AdmittanceID>3</AdmittanceID>       <DietID>1</DietID>       <Notes></Notes>    </AssignedDiet> </Data> The stored procedure called is: <pre> ------------------------------------------------------------------------------------------------------------------------ -- Author:              Mustafa Ismail Mustafa -- Procedure Name: [EMR].[NV_VW_Orders_Diet_Insert] -- Date Generated: Sunday, August 09, 2009 -- Company:            Netvareas Solutions -- Project Name:     RCH Automation ------------------------------------------------------------------------------------------------------------------------ ALTER PROCEDURE [EMR].[NV_VW_Orders_Diet_Insert] @PatientID char(10), @AdmittanceID int, @IssuingEmployeeID int, @DateTimeGiven datetime, @OrderDetails nvarchar(max), @IsDoctor bit, @IsCanceled bit, @IsCompleted bit, @ClosingEmployeeID int, @ClosingDateTime datetime, @IsRepeated bit, @IsDefaultTime bit, @DefaultTimeID int, @PeriodID int, @PeriodValue int, @Notes nvarchar(max), @DietID int, @OrderType nvarchar(50), @Tags XML, @SubOrderID int OUTPUT, @OrderID int OUTPUT AS SET NOCOUNT ON BEGIN TRANSACTION /* 1. Retrieve the SubOrderID (Max current DietOrderID + 1) 2. Insert the PatientOrder and retrieve the OrderID 3. Insert the DietOrder 4. Extract from the XML all the rows to be inserted into mmPatientDiets 5. Insert rows into the persistant table mmPatientDiets */ DECLARE @ERR int = 0; --1. SET @SubOrderID = ISNULL((SELECT MAX(DietOrderID) FROM EMR.PatientAssignedDiets WHERE PatientID = @PatientID AND AdmittanceID = @AdmittanceID),0) + 1; --2. EXEC [EMR].[NV_PatientOrders_Inse

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups