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


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

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 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

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

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

String To Array To DB

I'm such an idiot. I used to actually be good at this ASP stuff. Ah well.

I have a string, for instance:

40, 43, 1, 2, 3, 60, 64, 65, 66

Which I need to get into the DB as individual numbers... Any clue how to do this quickly and easily?

View Replies View Related

String Not Recogized As Array

If I use a literal string:

theArray = Array("66.134.63.152", "66.134.63.152", "24.15.41.147")

the arguments "theArray" works fine in my function.

If I build my array with a for next my function (guessing) sees my argument
as a string. I have printed
out both values and they are exactly the same in appearance.

Any suggestions?

View Replies View Related

Field To String To Array

does ASP have arrays, and if so, can I use an array, inside a loop, to do the following.

x=field name *the field is now comma separated values*
while x != rs.EOF
take each part of x , put into array.
filter recordsetABC with current part of X.
display filtered recordset on screen.
next x

My syntax is horrible, so ignore that, this is just a theory exercise right now.

View Replies View Related

Converting String To Array

I need some advice in converting a line of string into array. For example; "001,002,003,004,005,..." into 001, 002, 003 and so on. How can I do this?

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

String-indexed Array In ASP VBScript

Can i use string indexed arrays in ASP?
Such as in PHP: $arr['string_index']='ok'?

View Replies View Related

Convert Byte Array To String

I want to convert the binary data to string. I tried doing the same using following peace of code.

Function SimpleBinaryToString(Binary)
Dim I, S
For I = 1 To LenB(Binary)
S = S & Chr(AscB(MidB(Binary, I, 1)))
Next
SimpleBinaryToString = S
End Function

It works fine when the data is English. But when the binary data contains some Japanese characters the resultant string gets corrupted.

View Replies View Related

2 Dimendional Array From A Delimited String

I need to create a 2 dimensional array from a string with 2 kinds of delimiters
sample string: Code:

View Replies View Related

Checking For Duplication In An Array Or Delimited String

In an application I'm working the user has the opportunity to record the
despatching of one or more items with serial numbers.

For each item they despatch, they have to chose the serial no that they want
to despatch from a list of available ones. In many cases, these items will
be of the same time, so the dropdown of available serial no's may be the
same. Code:

View Replies View Related

Turning A Comma Delineated String Into An Array

I've never been able to get my head round arrays, and despite expensive googling I can't work out how to sort this problem:

I have a simple shopping cart that attaches a stock ID number and a quantity to a session variable. Each item selected is added to the session("cart") as "ID.Quantity" and divided by a comma. Thus the string is "12.7,3.45,8.9" etc.

Can anyone show me how to turn this into a two dimensional array, so I can get the relevant records for each ID from my database and match it to the number requested? Splitting the string by comma and then by full-stop has beaten me.

View Replies View Related

XMLHTTP Character Issue - Converting Byte Array To String

I'm using Msxml2.ServerXMLHTTP.3.0 to fetch a HTML page on a remote
server. The fetched page is then parsed and the information of interest
is extracted and send to the client browser.

However, the remote server does not specify any character coding in its
headers. If using ResponseText property in ServerXMLHTTP, some
international characters are not decoded correctly. This is due to
ResponseText assuming UTF-8 coding if no character set is specified.

My solution is to use the ResponseBody property which returns the web
page as an array of unsigned bytes. I then convert the data to a string
using the ADODB.Stream method as described here:
http://www.motobit.com/tips/detpg_binarytostring/

The string is then parsed and the required information is pulled out.

This solution works just fine but I wonder if there is some more
efficient (without the need for a byte to string converion) way to
solve the problem.

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

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

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

Index.html

I’ve been busy converting my website's static pages to ASP pages. I ran into one problem. Currently there is an index.html and an index.asp in the www directory. When I delete the index.html file, I would expect the site to default to index.asp, but instead I get an error message.

Directory Listing Denied
This Virtual Directory does not allow contents to be listed.

This is the procedure I’ve used for PHP sites, but maybe there is a different rule I’m not familiar with

View Replies View Related

IIS Index Server

I have to place a search the site text box in my .net site .I have installed MS indexing service and it has indexed my completed folder and if i query it it only shows the fields Rank,filename,Vpath,write ,size its not showing me the description and title which my headache.
I am making the query to server :
"select description,Contents,DocTitle, Filename, Vpath, Size, Write, Characterization, Rank from scope() where FREETEXT(Contents, 'market') order by rank desc"

View Replies View Related

Index Server

I have index server running and happily cataloging one site and dishing up search results via and asp page. Having created a new catalogue for another site and putting the same asp code in I don't seem to have any info in the "characterization" field! Any idea why this is? Is there something about the way the pages are built that would allow that to work or not?

View Replies View Related

What Does Index Server Mean?

While reading a article i came accross this word "index server"?
what does this all about?

View Replies View Related

MS Index Server

I've been playing around with MS Index Server 3.0 (well, the one that comes with Windows 2000 Professional!) and my client has a website that generates dynamic content based on ASP code. I unfortunately require the use of Index Server because the IFilter allows support for searching within PDF files.My problem is that while all of the static content pages and PDF files are detected, indexed and catalogued fine, none of any dynamic pages are. I can clearly see why this is, since I assume Index Server doesn't have a webcrawler of any sort!I was wondering then, how people generally get around this problem, working with it? What is a quick way to get dynamic content integrated into the search? Should I find/write a webcrawler then put it into my search program or is there something better out there that will let me do all of this

View Replies View Related

Using MS Index Server

I have a custom search engine for our website that uses MS Index Server and it works great but it doesn't find any results for searches that contain french accented characters.If I'm searching for "élément"...it doesn't find anything because the page uses html codes for accents and this word would be written like

"&eacute;l&eacute;ment" in my source code. My page uses charset utf-8 but the Index server uses 2 separate files(.htx and .idq files) and there doesn't seem to be any settings in there for this problem.

View Replies View Related

Menu Bar Z Index

i hv one js file for menu bar ..it create dhtml menu bar dropdown with multilisting...it work on my normal html file but if i applied on asp file where i hv dynemic select box then it breaked & my menu doesn't seen me on that list box but on other area it works....if i had put normal form list box then it runing properly.

View Replies View Related

Market Index

whether I can get market indices like DOW, NASDAQ, FTSE and diplay them in a webpage? They don't have to be real time but around half to an hour delay.

View Replies View Related

Iterating With An Index In Ado?

is it possible to iterate through a recordset with an index? Something like

while NOT rs.EOF
response.write rs[0]
response.write rs[1]
response.write rs[2]
wend

What I want to achieve is the following. When I am placed on a record, then I
want to retrieve the next and prev record of the current one. Can somebody tell me
how I can do this?

View Replies View Related

Index Server Search

I'm having trouble getting my head around the query language for an Index Server Search w/ASP.I have some dummy content pages that have text like "this file contains things" and "this file contains stuff".I've tried these two queries:
PHP Code:





 SELECT DocTitle, VPath, Path, Filename, Rank FROM SCOPE('DEEP TRAVERSAL OF "c:inetpubwwwroot"')
 WHERE ((CONTAINS(' "file contains" ') >0)
 AND ((Path NOT LIKE '%\_vti%') AND (Path NOT LIKE '%\_private%') AND (Filename NOT LIKE 'search.asp')))
 ORDER BY Rank DESC 

View Replies View Related







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