I am trying to add an item to a System.Array and I get an error:
BC30456: 'add' is not a member of 'System.Array'.
My code is:
************************************************** ******************************************
Dim parameters As SqlParameter () = { _
New SqlParameter("@ClientID",SqldbType.VarChar,20), _
New SqlParameter("@UserID",SqldbType.BigInt) }
if session("ResumeMode") = "View" then
parameters.add(New SqlParameter("@ResumeTemplateID",SqldbType.Bigint) )
else
parameters.add(New SqlParameter("@ApplicantID",SqldbType.Bigint))
end if
************************************************** *****************************************
If this is not the way, how do I insert a new item in the array?
Thanks,
Tom 3 3136
"tshad" <ts**********@ftsolutions.com> wrote in news:evF1LUZjFHA.3012
@TK2MSFTNGP12.phx.gbl: If this is not the way, how do I insert a new item in the array?
Take a look at "Redim preserve" to resize an array.
--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying. http://members.ebay.com/aboutme/coolspot18/
On Wed, 20 Jul 2005 20:39:31 -0500, tshad <ts**********@ftsolutions.com>
wrote: I am trying to add an item to a System.Array and I get an error:
BC30456: 'add' is not a member of 'System.Array'.
My code is:
************************************************** ****************************************** Dim parameters As SqlParameter () = { _ New SqlParameter("@ClientID",SqldbType.VarChar,20), _ New SqlParameter("@UserID",SqldbType.BigInt) }
if session("ResumeMode") = "View" then parameters.add(New SqlParameter("@ResumeTemplateID",SqldbType.Bigint) ) else parameters.add(New SqlParameter("@ApplicantID",SqldbType.Bigint)) end if
************************************************** *****************************************
If this is not the way, how do I insert a new item in the array?
Thanks,
Tom
Use an ArrayList instead...just don't forget to TrimToSize() before
iterating thru the values (by default it creates buckets up to the
capacity, which is like 16 I believe by default)....
--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
"Craig Deelsnyder" <cdeelsny@no_spam_4_meyahoo.com> wrote in message
news:op***************@cowboy.hsd1.mn.comcast.net. .. On Wed, 20 Jul 2005 20:39:31 -0500, tshad <ts**********@ftsolutions.com> wrote:
I am trying to add an item to a System.Array and I get an error:
BC30456: 'add' is not a member of 'System.Array'.
My code is:
************************************************** **************************
**************** Dim parameters As SqlParameter () = { _ New SqlParameter("@ClientID",SqldbType.VarChar,20), _ New SqlParameter("@UserID",SqldbType.BigInt) }
if session("ResumeMode") = "View" then parameters.add(New
SqlParameter("@ResumeTemplateID",SqldbType.Bigint) ) else parameters.add(New SqlParameter("@ApplicantID",SqldbType.Bigint)) end if
************************************************** **************************
*************** If this is not the way, how do I insert a new item in the array?
Thanks,
Tom
Use an ArrayList instead...just don't forget to TrimToSize() before iterating thru the values (by default it creates buckets up to the capacity, which is like 16 I believe by default)....
I could, but I am using it sparingly and it is already set up in my library
as a normal array. The Redim Preserve should solve my problem.
Thanks,
Tom
-- Craig Deelsnyder Microsoft MVP - ASP/ASP.NET This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Stephen |
last post by:
I have been getting on well with help from this forum trying to create an
array list and work with it. Everything is working fine apart from
displaying my array list items into the labels in my...
|
by: Sri |
last post by:
How do you add an n-bit number in C?
Regards,
Sri
|
by: Flack |
last post by:
Hey guys,
I have a DataGrid and DataTable field in my class :
private ImageDataGrid dataGrid1; //ImageDataGrid extends dataGrid and just
overides OnMouseDown
private DataTable dt = new...
|
by: Extremest |
last post by:
Is there a way to add new items to an arraylist witht he indexer? like
with a normal array I can just do like array = new. What I have
read with arraylist it will throw an exception if I try to...
|
by: Kannan |
last post by:
Hi,
I am trying to created Outloook Add-in Com in outlook using C#.
I have seen this URL for developing this sample
http://support.microsoft.com/?kbid=302901
When I executed this program it...
|
by: Pete Kane |
last post by:
Hi All, does anyone know how to add TabPages of ones own classes at design time ? ideally when adding a new TabControl it would
contain tab pages of my own classes, I know you can achieve this with...
|
by: Paulers |
last post by:
Hello,
I have a string that I am trying to add each char to a datatable row.
for example if I have a string that looks like "abcdefg", I would like
to break it up into an array of characters...
|
by: dennis.sprengers |
last post by:
Consider the following multi-dimensional array:
---------------------------
$arr = array(
array(3, 5, 7, 9),
array(2, 4, 6, 8),
array(1, 3, 5, 7)
);
function add_arrays($arr) {
for ($row =...
|
by: AZRebelCowgirl73 |
last post by:
here is the instructiions I am to use
Ask the user to input the number of effective cars in the shop (this number should be between 1 and 100, inclusively). In a loop, controlled by the inputted...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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: 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,...
|
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...
|
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,...
|
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...
| |