craigachan
Registered User.
- Local time
- Today, 01:36
- Joined
- Nov 9, 2007
- Messages
- 285
I have the following code that creates a long string that works most of the time but sometimes gets cut short. I can't understand why it does this. When it cuts the string short it cuts it short in the same place. Everything gets in the string up to/or about the following code '</Practice Name>'
This string is needed to upload info to a server.
Can anyone explain why this works sometimes and sometimes not? thank you.
This string is needed to upload info to a server.
Can anyone explain why this works sometimes and sometimes not? thank you.
Code:
dim msg as string
msg = "<?xml version=""1.0"" encoding=""utf-8""?>" & vbCrLf & _
"<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">" & vbCrLf & _
" <soap:Body>" & vbCrLf & _
" <UpdateDataForScreens xmlns=""http://mdtoolboxrx.com/"">" & vbCrLf & _
" <PatientObj>" & vbCrLf & _
" <ID>" & strPID & "</ID>" & vbCrLf & _
" <MRN></MRN>" & vbCrLf & _
" <LastName>" & strLN & "</LastName>" & vbCrLf & _
" <FirstName>" & strFN & "</FirstName>" & vbCrLf & _
" <MiddleName>" & strMiddle & "</MiddleName>" & vbCrLf
msg = msg & " <Gender>" & strGender & "</Gender>" & vbCrLf & _
" <SSN></SSN>" & vbCrLf & _
" <DOB>" & strDOB & "</DOB>" & vbCrLf & _
" <Addr1>" & strAdd1 & "</Addr1>" & vbCrLf & _
" <Addr2></Addr2>" & vbCrLf & _
" <City>" & strCity & "</City>" & vbCrLf & _
" <State>" & strState & "</State>" & vbCrLf & _
" <Zip>" & strZip & "</Zip>" & vbCrLf & _
" <HomePh>" & strHomePh & "</HomePh>" & vbCrLf & _
" <WorkPh></WorkPh>" & vbCrLf & _
" <CellPh></CellPh>" & vbCrLf
msg = msg & " <Email></Email>" & vbCrLf & _
" </PatientObj>" & vbCrLf & _
" <AccountObj>" & vbCrLf & _
" <AccountId>" & strAcctID & "</AccountId>" & vbCrLf & _
" <AccountAuthKey>" & strAcctauthkay & "</AccountAuthKey>" & vbCrLf & _
" <PracticeId>" & strPractID & "</PracticeId>" & vbCrLf & _
" <PracticeName>" & strPractName & "</PracticeName>" & vbCrLf & _
" <UserId>" & strUserID & "</UserId>" & vbCrLf & _
" </AccountObj>" & vbCrLf & _
" </UpdateDataForScreens>" & vbCrLf & _
" </soap:Body>" & vbCrLf & _
"</soap:Envelope>"