Split help please

J

Joey Martin

I need some basic SPLIT help. I need to be able to display the results
for the split function.
The SQL query will pull results like

123.jpg,ab123.jpg,whatever.jpg

CURRENT CODE:
SQLCommand = "Select PHOTO From IMAGES Where id= '" & rs("ID") & "'"
set rsca=datasource.execute (SQLCommand)
thetest=rsca("photo")
allsplit=split(thetest,",")
Response.Write allsplit & "<br>"

I am getting a TYPE MISMATCH error. The PHOTO field is a VARCHAR.

I need to be able to write something like:
for each result in the split
response.write PHOTO & <BR>
and then the next one and so on.

Any help is appreciated
 
A

Aaron Bertrand - MVP

Response.Write allsplit & "<br>"

This array is a complex data structure; you can't response.write an array
(just like you can't response.write a recordset or a dictionary object).

You can try this:

Response.Write Join(allsplit, "<br>")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,141
Messages
2,570,817
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top