This topic is locked

Comma seperation on datafield

6/1/2005 11:31:39 AM
ASPRunnerPro General questions
swat author

I have a data field name Schedule and the entry on this field is [12,12,122,52] values on the list.asp page I would like to display this values one by one-

something like this :

12

12

122

52

Response.Write Replace(rsData.Fields("Schedule"), "," , "
")

this code used to work for asprunner2.4 but now it is not working for asprunnerpro3.1 - let me know

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

<%

if IsBinaryField(rs.Fields("Schedule")) or Format("Schedule")=FORMAT_DATABASE_FILE then

Response.Write CreateImageControl(rs, "Schedule", "")

else

Response.Write Replace(rsData.Fields("Schedule"), "," , "<br>")



end if
%>


thx

Sergey Kornilov admin 6/3/2005

Hi,
find the following code snippet in ..._list.asp file:

strData = GetData(rs.Fields("Schedule"), "")

Response.Write ProcessLargeText(strData)


and replace it with

Response.Write Replace(rsData.Fields("Schedule"), "," , "
")

swat author 6/6/2005

Original Code

<%

if IsBinaryField(rs.Fields("Schedule")) or Format("Schedule")=FORMAT_DATABASE_FILE then

Response.Write CreateImageControl(rs, "Schedule", "")

else

strData = GetData(rs.Fields("Schedule"), "")

Response.Write ProcessLargeText (strData)

end if

%>


After change

<%

if IsBinaryField(rs.Fields("Schedule")) or Format("Schedule")=FORMAT_DATABASE_FILE then

Response.Write CreateImageControl(rs, "Schedule", "")

else

Response.Write Replace(rsData.Fields("Schedule"), "," , "<br>")

end if

%>


still not working- I am getting only one line of data

thx

Sergey Kornilov admin 6/7/2005

Hi,
sorry I made mistake. We don't use rs.Data in new version. The right code is:

<%

if IsBinaryField(rs.Fields("Schedule")) or Format("Schedule")=FORMAT_DATABASE_FILE then

Response.Write CreateImageControl(rs, "Schedule", "")

else

Response.Write Replace(rs.Fields("Schedule"), "," , "
")

end if

%>


If it doesn't help send me HTML source of resulting page.

swat author 6/7/2005

thats worked- thx