Solved

Array Encoding Error

Posted on 2011-03-24
8
363 Views
Last Modified: 2012-05-11
I have an array that when I try to split further throws an error.

        rspcode = ptbc(0)
        rspdesc = ptbc(1)

         Response.Write "<p> <b>RESPONSE CODE </b>: " & ptbc(0) & "<p>" --'
       
        rspcodetext = Split(ptbc(0),"=")
        Response.Write "<p> <b>RESPONSE CODE </b>: " & rspcodetext(1) & "<p>"
        rspdesctext = Split(rspdesc,"=")
        Response.Write "<p> <b>RESPONSE DESCRIPTION </b>: " & rspdesctext(1) & "<p>"


Results are

PAYMENT TXN CODE : rspcode=W56&rspdesc=[No Transaction Record]

RESPONSE CODE : rspcode=W56

 -- splitting the response code above gives this error ----

RESPONSE CODE : "1.0" encoding

-----------------------------------------------------------

RESPONSE DESCRIPTION : [No Transaction Record]

Help!
0
Comment
Question by:souldj
  • 4
  • 2
  • 2
8 Comments
 
LVL 2

Accepted Solution

by:
khaaz earned 250 total points
ID: 35205372
what happens if you try :

        rspcode = ptbc(0)
        rspdesc = ptbc(1)

         Response.Write "<p> <b>RESPONSE CODE </b>: " & ptbc(0) & "<p>" --'
       
        rspcodetext = Split(rspcode,"=")
        Response.Write "<p> <b>RESPONSE CODE </b>: " & rspcodetext(1) & "<p>"
        rspdesctext = Split(rspdesc,"=")
        Response.Write "<p> <b>RESPONSE DESCRIPTION </b>: " & rspdesctext(1) & "<p>"

Open in new window

0
 
LVL 39

Assisted Solution

by:Pratima Pharande
Pratima Pharande earned 250 total points
ID: 35205381
try this


        rspcode = ptbc(0)
        rspdesc = ptbc(1)

         Response.Write "<p> <b>RESPONSE CODE </b>: " & ptbc(0) & "<p>" --'
       
        rspcodetext = Split(ptbc(0),"=")
        Response.Write "<p> <b>RESPONSE CODE </b>: " & rspcodetext(1) & "<p>"
        rspdesctext = Split(ptbc(1),"=")
        Response.Write "<p> <b>RESPONSE DESCRIPTION </b>: " & rspdesctext(1) & "<p>"
0
 
LVL 1

Author Comment

by:souldj
ID: 35205394
Khazz,

i still get

RESPONSE CODE : rspcode=W56

RESPONSE CODE : "1.0" encoding

RESPONSE DESCRIPTION : [No Transaction Record]
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 1

Author Comment

by:souldj
ID: 35205407
Pratima_MCS

RESPONSE CODE : rspcode=W56

RESPONSE CODE : "1.0" encoding

RESPONSE DESCRIPTION : [No Transaction Record]

Same thing :-(
0
 
LVL 1

Author Comment

by:souldj
ID: 35205450
Solved the Problem.


        rspcodetext = Split(ptbc(0),"code=")
       ' Response.Write "<p> <b>RESPONSE CODE </b>: " & rspcodetext(1) & "<p>"
       rspdesctext = Split(rspdesc,"=")


Told it to look for "code=" as this was always a constant.

Thanks guys

Will share the knowledge with all as you all guided.
0
 
LVL 39

Expert Comment

by:Pratima Pharande
ID: 35205453
code looks like correct ..
do you have someting like this on your page
<?xml version='" + "1.0" + "' encoding='" + "utf-8"

try with diff varibale name

rspcode = ptbc(0)
        rspdesc = ptbc(1)

         Response.Write "<p> <b>RESPONSE CODE </b>: " & ptbc(0) & "<p>" --'
       
        rspcodetext1 = Split(ptbc(0),"=")
        Response.Write "<p> <b>RESPONSE CODE </b>: " & rspcodetext1 (1) & "<p>"
        rspdesctext = Split(rspdesc,"=")
        Response.Write "<p> <b>RESPONSE DESCRIPTION </b>: " & rspdesctext(1) & "<p>"
0
 
LVL 1

Author Closing Comment

by:souldj
ID: 35205456
solved the problem myself with help.

Thanks guys
0
 
LVL 2

Expert Comment

by:khaaz
ID: 35205470
Could you try this :
perhaps you see a '=' but it's not !
  rspcode = ptbc(0)
        rspdesc = ptbc(1)

         Response.Write "<p> <b>RESPONSE CODE </b>: " & ptbc(0) & "<p>" --'
       
        rspcodetext = Split(ptbc(0),"=")
        Response.Write "<p> <b>RESPONSE CODE </b>: " & rspcodetext(0) & "<p>"
        rspdesctext = Split(rspdesc,"=")
        Response.Write "<p> <b>RESPONSE DESCRIPTION </b>: " & rspdesctext(1) & "<p>"

Open in new window

0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
I was supporting a handful of Windows 2008 (non-R2) 2 node clusters with shared quorum disks. Some had SQL 2008 installed and some were just a vendor application that we supported. For the purposes of this article it doesn’t really matter which so w…
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question