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
ADVERTISEMENT
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
I am trying to pass a form value and pull some values from an array. I am getting no errors but no values on this code. Any ideas? Code:
View Replies
View Related
I have a web page that accesses a database to pull news stories down and create a link to another page that is populated with the news stories. These stories take up enough space that the page has to scroll. I want to be able to have the links it generate go directly to an anchor on the second page where the news story begins.
Can someone point me in the right direction to a place where I can get more information about this?
View Replies
View Related
a way to view the contents of a variable. But That variable could be one of several variables. So, I would like to pass in the name of the variable as a string into a function, and pull out the contents of that variable.
View Replies
View Related
I am trying to write a script that will insert a commercial (randomly choosing from 3 commercials) prior to a news video clip. I need to have the page dynamically created using asp (or at least I think I do).
I have tried several different methods but nothing works. The only thing that has been successful so far is a static .asx file (but that won't cut it). there is very little documentation on this from what I can find.
View Replies
View Related
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
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
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
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
Basically, I would like to create a folder on my server for each user that comes to my site based on their last name which they enter. The code I have below is incomplete as I don't know how to incorporate the lastname into the CreateFolder method.
dim lastname, objFSO
lastname = Request.Form("lastname")
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
folder = Server.mapPath("/test/")
objFSO.CreateFolder(folder)
Set objFSO = Nothing
View Replies
View Related
I asked a question earlier about creating dynamic pages.
I want to know if its possible to create dynamic form elements based on a condition equating to true.
e.g. as you could have dynamic texts when a condition is true.
Could i have dynamic form elements when a condition is true
e.g. response.write(create radio button)
or create combo box etc
or how is it done ?
View Replies
View Related
What I am trying to do would be useful to many sites that have product listings or archieved articles.
Instead of having server load and spider unfriendly dynamic asp pages, create semi-dynamic html pages by running an asp script which requests an asp page from a Local IIS server (or www server if need be) and writing the html text to a file and saving it as a filename.htm page. Code:
View Replies
View Related
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
is there any way tohave an array where the first subscript is dynamic and the second subscript is static
View Replies
View Related
I'm having a brain fart at the moment. Can someone tell me how to dynamically create variable names based on a loop counter?
for i = 1 to Num_Cart_Items
Item_Name & i = Request.Form("item_name" & i)
Item_Number & i = Request.Form("item_number" & i)
next
Desired result:
Item_Name1 = Test Product
Item_Number1 = 1234
Item_Name2 = Test Product 2
Item_Number2 = 2345
The problem is with the Item_Name & i..I used to know how to do this, but I can't remember or find any code that I did this with.
View Replies
View Related
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
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
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
I know how to create dynamic tables in dreamweaver to display fields and records in a table of a database, but in my case I need to create a dynamic table that lists all the tables in the database, then to click on the one i want 2 edit the data in there.
View Replies
View Related
I dump the entire recordset into an array:
If not rs.EOF Then
aEmp = rs.GetRows()
Contents of the array are in this order:
EmpID,EmpName,Indent,Sub_ID,Lft,Rgt,MgrID, LastName
This query sort on the basis of Lft and Rgt columns.
The name of the array is: aEmp.
My question here is how can I get only the LastName from the aEmp array into another array so that I can sort the names alphabetically and then display the employees in the alphabetical order.
Or is there is another way I could this by using the same array while keeping the lft and rgt sort of the query? If I sort based at the SQL query level, I can see the names sorted by the lft, rgt and lastname, but since the lastname is at the end of the sort list - it does not appear alphabetically.
View Replies
View Related
In working with arrays, I have found that I am unable to dimension and array
with a variable that has an integer value but I can redimension one this
way. I haven't see any information that tells me if this is a requirement,
although it appears to be because I get an error if I try it.
Ex.
Dim b
b = 10
Dim a(b) ' this errors out but
Dim a() ' this
Redim a(b) ' works
Code:
View Replies
View Related
I want to create a new array called arrNames2 and copy contents of arrNames to arrNames2.
I then want to loop through my db and add more names (while going through the loop) to arrNames2. What is the best way to do this? Do I have to keep redim the array wehn I add more names?
View Replies
View Related
Ok, I have a Javascript ASP and in it I have a dynamic repeating table with certain attributes to people. If one of these attributes is old or invalid, i want to change the color of the text (and maybe make it flash, blink, change size, something) so that it's easy to read.
View Replies
View Related
Environment:
Development PC: W2K Professional
WebServer: W2K Server, IIS 5.0
Peer-to-Peer network
I'd like to create a new asp.net project on a remote server (not on the
local (development) machine. I have looked for info on how to do this, but
all I can find are instructions on how to create on localhost, then deploy
later to remote machine.
View Replies
View Related
what's involved in creating an ASP? I need to create a web page where users can check their past history of the account.
View Replies
View Related
So i currently have an asp page that creates an xml document with information from a database. However I need to link to my schema when creating the Root element here,
Set objRoot = objDom.createElement("projects")
this is the link that would go into projects:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="semesters.xsd"
View Replies
View Related
Im trying to create a string from checkboxes that have been checked, but for some reason its not working
strNumbers = ""
for each key in request.form("chkFacility")
strNumbers = strNumbers + "" & key & ","
intCount = intcount + 1
next
So I want to end up with a string like this '3,12,7.' Instead Im just getting a single number. Am I doing this the right way. Any help wud be just fantastic!!
View Replies
View Related
I know how to use ASP to create and write into a .CSV file on the server, but I have a small problem. Every time I write to the file I am adding new lines each time. I don't know how to wipe the previous contents out, and I thought this is probably a no-brainer for you guys ...
So, I'm looking either to delete the file at the start of the process and start from scratch or
* open the file
* wipe all contents from file
* write to the newly cleaned file
View Replies
View Related
How can i create a ZIP file from a folder (full of files) of the server.?
View Replies
View Related
I have an asp page where i created cookies-for admin and for user. The aspx page reads these cookies. Everything seems to work fine but now i have to create a new cookie if cookie has expired or if cookie is null. Also, i am having problems with the expire because if the username belongs to the admin for example and then i want to change
the username that belongs to a normal user the cookie recognises the first (admin) cookie. How do i solve this? .....
View Replies
View Related
I want to create an order form for prints online... I will have up to 200 prints to be selected. What I am thinking is that I will have an HTML Form that has all the 200 thumbnails with a check box next to them. They select the ones they want and push next. Then I would like it to create a set of options for each one they selected.
That basically says the image name then has a check box for 5x7, 8x10 and a text box for the amount for each... I do I create the page what creates these selections and how to I incorporate that into a mail form going to the next page?... it seems like a simple enough idea. Am wondering how the reality of it will be.
View Replies
View Related
I am using asp and access database. I need to create a menu according each member access. In other words, if member login I need to display the menu according to the services the member selected during registration. Each service contains diff type of products.
Service1
-produc1
-product2
Service2
-produc1
-product2
-product3
..more
Service3
-produc1
-product2
..more
What is the best way to this...
View Replies
View Related