473,406 Members | 2,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Split help please

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
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #1
3 1733
"Joey Martin" <jo********@qx.net> wrote in message
news:OJ*************@TK2MSFTNGP11.phx.gbl...
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.


I think this will work:

For i = 1 to UBound(allsplit)
Response.Write "<div>" & allsplit(i-1) & "</div>"
Next

Regards,
Peter Foti
Jul 19 '05 #2
Perfect! Thanks so much.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #3
> 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>")

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Stu Cazzo | last post by:
I have the following: String myStringArray; String myString = "98 99 100"; I want to split up myString and put it into myStringArray. If I use this: myStringArray = myString.split(" "); it...
5
by: Blue Ocean | last post by:
In short, it's not working right for me. In long: The program is designed to read numbers from an accumulator and speak them out loud. Unfortunately, the class that contains the method to...
14
by: Luka Milkovic | last post by:
Hello, I have a little problem and although it's little it's extremely difficult for me to describe it, but I'll try. I have written a program which extracts certain portions of my received...
3
by: rxl124 | last post by:
Hi, room Beginner of learning perl here!! I have question to all, I have below file name datebook.master which contains only 2 lines Mike wolf:12/3/44:144 park ave, paramus: 44000 Sarah kim:...
5
by: NewToThis | last post by:
I am trying to use the split function to bread up lines in a file I am reading from. Some lines are working just fine, but a couple of the lines don't split up the way I would have thought. ...
6
by: andrewcw | last post by:
The split function takes as a parameter what I understand as array of Char. I can define the delimiter like this: string innerText = new string; char chSplit={'='};...
2
by: Jay | last post by:
Well this is my function to split the data into its own lines Sub preSift(ByVal input As String) Dim spl() As String spl = New String() {} spl = Split(input, ControlChars.NewLine) ', ,...
6
by: Saurabh | last post by:
Hi everyone, I am looking for some expert advise to get me out of trouble. I am looking for a solution in C# which will allow me to split the below string in the format provided. The...
8
by: Wijaya Edward | last post by:
Hi all, I was trying to split a string that represent chinese characters below: ??? But why the split function here doesn't seem
9
by: martinskou | last post by:
Hi, I'm looking for something like: multi_split( 'a:=b+c' , ) returning: whats the python way to achieve this, preferably without regexp? Thanks.
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.