Adding Index Number To A Dynamic Array

I've probably done this before, but for the life of me I can't remember how
I did it. I need to move values from a DB table into an array to be used
for other queries. The number of records will vary, so I need to make the
array dynamic. Can someone remind me how I can increment the index when I
write a new record? Code:

View Replies


ADVERTISEMENT

An Array Index Is Out Of Range.

I'm using "POST" vs "GET" because the string is so long, but I'm wondering if the string is to long even for "POST". Code:

View Replies View Related

Getting Index Of Item From Array

For Each keyb In Request.Form
If Left(keyb, 15)="excelFieldName_" Then
'Response.Write(Request.Form(keyb) & "<br />")
ReDim Preserve arrExcel(myCounterb)
arrExcel(myCounterb) = Request.Form(keyb)
myCounterb = myCounterb+1
End If
Next

I am able to get the values in the arrExcel array with the code below...

for each item in arrExcel if item <> "None" then

Response.Write item
Response.Write("<br>")
End if
Next

What I would like is to get the index of the item I have found from the array. I then need to get the corresponding index from another array.

I tried item.getIndex, but that does not work ..

View Replies View Related

String Array Index

Is it possible to use a string to index an array rather than a number? Eg

myArray(lets) = "hello"
myArray(uses) = "goodbye"
myAray(words) = "something"

Response.Write(myArray(hello)) gives 'hello' .

View Replies View Related

Matching Array Index To Values Retrieved From Database

I have this dynamic array(shown below) that I need to match to values (1 - 10) that I am returning from the database via DSN connection object.

The values I need to match are on the same page (in their own table) but I am not sure how to match up the array indexes to these values. I want to be able to display the array result as part of or nested in another table. Code:

View Replies View Related

Dynamic Calendar, Need To Create Dynamic Array....

I code that creates a calendar for each month and then it displays events from that month that are stored in a db. I need to loop through my recordset and display all the events, but I can't quite figure out how to do it. I am thinking I need to do an array. But I am not really sure.... any ideas. Here is where you can view the calendar. Code:

View Replies View Related

Converting String To Number And Adding

Am collecting numerical entries from text boxes and converting to numbers using:

F1 = Round(CDbl(Request.Form("amout1")),2)
F2 = Round(CDbl(Request.Form("amount2")),2)
F3 = Round(CDbl(Request.Form("total")),2)
F4 = F1 + F2

If F4 <> F3 Then
Session("ErrorMessage") = Session("ErrorMessage") & "- Your control amounts do not tie to the Total Deposit amount.<br>"
End if

etc.

Sometimes it works, but other times, although the numbers tie out, the calculated amounts are not coming up as equal. I've written the results (F3 & F4) to the screen and they equal, although the server doesn't think so.

Is this an issue with binary number conversion or something. Should I be using something other than CRnd (Delphi has something like C$ or CCurrency)??

View Replies View Related

Adding Links To An Array

I have an array where the data is pulled from a DB. I output the results of the DB like this:

<%=myArray_MenuIdeas(4,i)%>

where "4" is the recordset field from the DB.

The actual record being output looks like this: 4444, 1211, 2222
I need to add links to each of these values in this array.

how can I do this?!

View Replies View Related

Number Formating :: Adding Zeros In The Beginning

I have a querystring that passes through the value 001 for example, the form on the receiving page need to display that number but with 1 added to it. i have

dim strnum
strnum = request.querystring("value")
strnum = strnum + 1

when displayed <%=strnum%> shows 2 instead of 002, and the zero's are very important, is there any number formating trick i dont know or another way of doing this?i thought about coding the first two zero's in before i call the strnum but this would mess things up when i get to 010 etc.

View Replies View Related

Passing Client-side Array Index To Server Side Script

Following is a vbscript code extract triggered by a combobox OnChange event. arrVendorA and arrdefpack are server side arrays and i need the intCounter parameter to be the array index. Code:

<script>
sub getstdPackByVendor(strPartNo, intCounter)
dim selVendor
selvendor= colSelect("cboVendor", intCounter).value

if selvendor= "<%=arrvendorA(intCounter)%>" then
if "<%=arrdefpack(intCounter)%>" = 2 then
colTD("txtStdPack" & intcounter+1 ).innertext = cstr("<%=arrVAStdPAckL2(intCounter)%>")
end if
end if
end sub
</script>

View Replies View Related

Server-side Array, Client-side Index Problem

The following code is giving me a type mismatch error at the 'if' statements... any ideas, anyone ?

sub getstdPackByVendor(strPartNo, intCounter)
dim selVendor
selvendor= colSelect("cboVendor", intCounter).value

if selvendor= "<%=arrvendorA(" & intCounter & ")%>" then
if "<%=arrdefpack(" & intCounter & ")%>" = 2 then
colTD("txtStdPack" & intcounter+1 ).innertext =
cstr("<%=arrVAStdPAckL2(" & intCounter & ")%>")
end if
end if
end sub

View Replies View Related

Problem With Adding Array To Database Table

I have an array which I want to save into a database table I tried a few things but it doesn't work. This is as far as I got: Code:

View Replies View Related

Adding Values To A Dynamic Jump Menu

I've writen the code below which displays a drop down select menu and can be displayed by writing the variable 'sjobs'. The code works fine as it is and the menu is populated with the requested info from the database ok. The problem I'm having is adding url links to the menu values. Code:

View Replies View Related

Progressive Number/array

Below is the script i use to copy and duplicate. Here it copies a form which has a table and a textbox in it.. Code:

View Replies View Related

Dynamic Array

to keep things simple.. lets juz say i hav the following:
Code:
<%
dim i,j
dim region1(0)
region1(0) = 5

i=1
j=0

response.write (region&i&(j))
%>

the above output i got is 10.. so how do i the value of 5 printed instead

View Replies View Related

Dynamic Array

how can we declare a dynamic array in asp.say i have a counter name COUNT.how to i declare an array of size COUNT.its not DIM array(COUNT) cos it will give me a error.how is it done?

View Replies View Related

Dynamic Array

I intend to have a dynamic array of non fixed size

set rsseats = conn.execute("select * from seats")
Dim arr(1)
response.write ubound(arr)
do while not rsseats.eof
ReDim arr(ubound(arr)+1)
rsseats.movenext
loop
set rsseats = nothing

But i will get hit with "The array is fixed or temp locked" how should i fix that

View Replies View Related

Dynamic Array

Does anyone know how to create a dynamic array? I need assign the values from database to the array one by one. I did a search and I can only find some complicated dynamicarray class. I am not to ASP and I have used other programming language. I thought a dynamic array shouldn't be that complicated.

View Replies View Related

My Server Start Up Page Has To Be Index.htm Not Index.asp?

I am uploading to a server for the first time. I believe that my server will not point to .asp pages as the start page, only .htm is this correct?

I wanted my index.asp page displayed first from the web-site by default, but have been told that I need say, an index.htm which then points to my index.asp page.

Is there a way that I can use my index.asp page as my start page?

View Replies View Related

Varying Number Of Database Columns Into Array

I have a DB that contains several columns named Line1, Line2, Line3, and Line4. After that I there are 50 columns named Data0 through Data49. Data0 and Data1 will always contain text but Data2 through Data49 may or may not be empty.

I am trying to take the values out of the database and put them into arrays. Since Line1 through Line4 never change I have no problem getting them into one array but I am lost on the logic/syntax on how to not only determine how many Data(n) cells are populated but then how to get them into a new array.

View Replies View Related

Creating Dynamic Array

I wrote a simple code to generate a dynamic array:

Dim TestArray2()
TestArray2=array()
Redim TestArray2(43)

When I uploaded this to IIS (on Vista Basic), the following error
message was given:

"An error occurred on the server when processing the URL. Please
contact the system administrator"

May I know what is the problem?

View Replies View Related

How To Make A Dynamic Array

how do i create a array rs, not sure if the terminology is correct. but i don't want a obj rs i want a array.

View Replies View Related

Dynamic Multidimensional Array

is there any way tohave an array where the first subscript is dynamic and the second subscript is static

View Replies View Related

Data From String To Dynamic Array

Ok, given a string such as this -

203_2_0_0_1_5_0_234_0_8_22_2_0_3_345_2_3_0_0_0_9

Each three digit number in the string represents a unique ID of a file in a database. Following each ID are six digits, all seperated by a "_" . Each file will ALWAYS have six subsequent integers, such as above ID "234" has "_0_8_22_2_0_3_" following it.

What I am trying to figure out is given a string of any length of this specific pattern, how to decarle a multi dimensional array that would hold each ID and its corresponding digits.

To clarify a little further, this is from a shopping cart for a photographer. Each "ID" represents an image, each of the six corresponding numbers for each ID represents a qty for an image print size, ie., 4 4x6's, 5 5x7s, 0 8x10s, 1 16x20, 23 20x30's, 48 wallets. Oh, and the image ID's are not necessarily always going to be 3 digits, they could be of any lenght integer...

View Replies View Related

Multi-Dimentional Dynamic Array

I want to save the details of a SQL search into an Array, Im dabbling and tryin the script below but i get an error Script:

SQL = "select item, number from table"
Set rsTarg = Conn.Execute(SQL)

i = 0

Dim TargArray()
Redim TargArray(i, 1)

do until rsTarg.eof

TargArray(i, 0) = rsTarg("item")
TargArray(i, 1) = rsTarg("number")

i = i + 1

Redim Preserve TargArray(i, 1)

rsTarg.movenext
loop

rsTarg.close

i = i -1

View Replies View Related

Adding Items To An Array - And Keeping Items Previously Added

I have a funtion that is supposed to add items in my shopping basket.

It's an array, and each time the user is adding an item, it adds the item to the array with its quantity and size.

I've never used arrays before, read about it, etc...

The only problem is that when it adds the new product, it's not keeping the ones which were there before :-(.

I have used REDIM PRESERVE. So can't find out what is wrong.

Below are the funtions that i use for testing and the coding where I implement them. Code:

View Replies View Related

Index.asp And Index.html

I have these two pages on root directory on the serverhow do i tell the server which one to pick up, or will the browser pick up the .html by default or do i have to manually configure it to do so?

View Replies View Related

Convert Real Number Into Text Number

I need to insert some number into database as text. My problem is if I insert the number (ie. 4.0), the value in the database only show (4). So, is it possible to convert a real number into text number using ASP?

View Replies View Related

Same Index

I've seen in many websites that they have an index file and everylink shows a diffrent content like

http://www.mywebsite/index.asp?ArticlId=16CatagoryId=18

how can use the same index and call to a diffrent content. i tried to use the include function but didn't work.

View Replies View Related

Sequential Number After Batch Number

here is the scenerio

in master batch table i have various master batch like
200701-0001
200701-0002
200701-0003

Now each master batch can have multiple final mixed batch like

200701-0001-01
200701-0001-02
200701-0001-03

and this record is inserted in to fmix table.

so i have a form in which i have a dropdown menu in which all the master batch is listed,
i select 200701-0001 and that value is passed to next page where i will enter other fields data and insertion to my fmix_no will be done automatic like 200701-0001-01, 200701-0001-02 and so on,

how to achieve this

so in short each master batch will have more than one final mixed batch.

pls help, also if u have any online contact in yahoo or msn pls send me, i am so confused and badly struck deadline is just couple of hours away. my yahoo id is(E-Mail address blocked: See forum rules) you can PM me i am online right now.

View Replies View Related

Retrieve The Error Number In VB With Err.Number

I want To handel the error messages by myself in one part in my script. I know that in VB I can Use the statment - On error resume next And I also know that I can retrive the Error Number In VB with Err.Number.

How can I handel the errors by myself in ASP? I heard about the ASPErr Object, Is it the same thing like the err object in VB?

View Replies View Related

ASP + Index Server

This is partly an ASP question and partly not an ASP question.

I'm trying to implement an ASP page that will use Index Server to provide search capability for a document repository folder. I've gotten this working on my server fine, but I'm now trying to implement it on a laptop (running Windows 2000 Pro) so that a salesman can show it to a prospective client. I was wondering if anyone knew if accessing Index Server through a web page would work on Win2kPro and the PWS it has?

Also, my working version is currently using the old style idq and htx pages and I've been having a hard time finding a good resource to show me how to do this in ASP...

View Replies View Related

Thumbprint Index

We would like an index of our documents and graphics.
They are stored on an IIS 5.0, Win2000 webserver.
Rather than the generic listing of documents, we would
like to show thumbprints.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved