473,385 Members | 1,333 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,385 software developers and data experts.

problem with join()

Hi,

I have a two-dimension array with integers and i want to join it into a
string. See my code:
dim va(10,5) as integer
dim mystring as string
....
for j=1 to 10
for k=1 to 5
mystring = Join(";",va(j,k).ToString)
next
next
The error i get is: "value of type string cannot be converted to
1-dimensional array of string"

Thanks for help
André
Nov 29 '06 #1
2 1154

André wrote:
Hi,

I have a two-dimension array with integers and i want to join it into a
string. See my code:
dim va(10,5) as integer
dim mystring as string
...
for j=1 to 10
for k=1 to 5
mystring = Join(";",va(j,k).ToString)
next
next
The error i get is: "value of type string cannot be converted to
1-dimensional array of string"

Thanks for help
André
well, thakes a string and a 1-dimensional array. By calling .ToString
you calling it with a string and a string - not an array. Hence your
error.

Of course, you can't call it with a 2D array anyway. So, your probably
going to have to do this manually. I would look at using
System.Text.StringBuilder to build your string.

--
Tom Shelton

Nov 29 '06 #2
Thanks

"Tom Shelton" <to*********@comcast.netschreef in bericht
news:11**********************@80g2000cwy.googlegro ups.com...

André wrote:
Hi,

I have a two-dimension array with integers and i want to join it into a
string. See my code:
dim va(10,5) as integer
dim mystring as string
...
for j=1 to 10
for k=1 to 5
mystring = Join(";",va(j,k).ToString)
next
next
The error i get is: "value of type string cannot be converted to
1-dimensional array of string"

Thanks for help
André
well, thakes a string and a 1-dimensional array. By calling .ToString
you calling it with a string and a string - not an array. Hence your
error.

Of course, you can't call it with a 2D array anyway. So, your probably
going to have to do this manually. I would look at using
System.Text.StringBuilder to build your string.

--
Tom Shelton
Nov 29 '06 #3

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

Similar topics

16
by: Ling Lee | last post by:
Hello. I'm trying to write a small program that lets you put in a number as an integer and then it tells you the textuel representation of the number. Like if your input is 42, it will say...
2
by: Bruce Duncan | last post by:
I'm a bit new to MySQL (know MS SQL well...and that may be the problem...getting the syntax confused) and I'm having a join problem...can anyone offer some help? Here's my problem: I have table1...
1
by: Keith | last post by:
I have created a view to test some of the data in my database. I am relatively new to SQL so may have caused this problem by doing something wrong. I have a table called SYS_Individual which...
14
by: signaturefactory | last post by:
I am trying the following query in and oleDbCommand: SELECT PartLocations.LocationName, Sum(PartsJournal.Quantity) AS SumOfQuantity, PartsJournal.PartsLotNumber FROM PartLocations INNER JOIN...
8
by: Andrew McNab | last post by:
Hi folks, I have a problem with an MS Access SQL query which is being used in an Access Report, and am wondering if anyone can help. Basically, my query (shown below) gets some records from a...
1
by: Andrew McNab | last post by:
Hi folks, I have a problem with an MS Access SQL query which is being used in an Access Report, and am wondering if anyone can help. Basically, my query (shown below) gets some records from a...
27
by: John Salerno | last post by:
Ok, here's a problem I've sort of assigned to myself for fun, but it's turning out to be quite a pain to wrap my mind around. It's from a puzzle game. It will help if you look at this image: ...
1
by: imranpariyani | last post by:
Hi i have a severe performance problem with one of my views which has 6 to 8 joins .. any help will be appreciated.. the view is: CREATE OR REPLACE VIEW thsn.trade_view AS SELECT...
9
by: HC | last post by:
Hello, all, I started out thinking my problems were elsewhere but as I have worked through this I have isolated my problem, currently, as a difference between MSDE and SQL Express 2005 (I'll just...
3
by: Anila | last post by:
Hi Friends, My problem with Inner join is ... first i joined two tables and i got the result. after that iam trying to join one more table its giving syn tax error in JOIN condition. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...

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.