Thursday 15 January 2015

Issue running Classic ASP written in VBScript on Windows 2012 with IIS 8 -


This is a very strange issue. I have a 2012 server running IIS 8 with support for classics ASP. I am creating a separate string from a form with comma. I am retrieving this string from a string and dividing it into commas.

First of all, when I create a string and submit it in DB (SQL Express 2014), then adding a place after each is a comma, though there is no place in the code.

Secondly, when I return the string and try to split it on commas, it does nothing; Ubound method returns -1 ... For test purposes, I have created a hand and it is the same behavior.

The code that creates the CSV string:

  if fieldName = "txt_EnvironmentType" then strTempEnvCSV = strTempEnvCSV & amp; Field Value & amp; Test code to split:  
  txtEnvironmentType = "this, is, a, test, string" if txtEnvironmentType & lt; & Gt;  
"" Then the reaction. Type (txtEnvironmentType) array = partition (txtEnvironmentType, "," l = ubound (array) response.write ("& lt; br> is array" & amp; amp; (Android) and Android ( I)) Next End if

The above test code gives the following for the browser:

Thanks

  if the field name =" txt_EnvironmentType "then strTempEnvCSV = strTempEnvCSV & TRI M (field value) & amp; "," end if  

it went to me (for your second issue) - the only change I made was to reduce the array variable and

  & lt;% dim arrMine txtEnvironmentType = "This is, A, Test, string" if txtEnvironmentType & lt;> gt; ; "" Then type the response. (TxtEnvironmentType) arrMine = split (txtEnvironmentType, "") l = ubound (arrMine) response. Write ("& lt; br> arrmine" & amp; amp; & amp; amp; amp; & amp; amp;; & amp; ;;;;;;;;;;;;;;;;;;;;;;;;;; Amp; arrMine (i)) Next End%>  

No comments:

Post a Comment