Create An Array With No Initial Size
How can I create an array with no specified size. I tried to do the following with no luck
Dim my_array()
The code will be adding values to the array like this
my_array(i) = "First"
.
.
.
etc
View Replies
ADVERTISEMENT
I have a variable named numdata that contains an integer value. Now I want to create an array with the size of numdata. Example: If numdata is 25, then the array should be test(25). Unfortunatly test(numdata) doesn't work.
View Replies
View Related
Is there any limitation to the maximum size of an array in ASP?
View Replies
View Related
how can I create a array of record
example:
I want to create a array of employees,and each array I have the name and age of the employee:
employees
+------------------------------------------+
|name: ze |name: ma |name: ro |name: car |
| age: 20 | age: 25 | age: 22 | age: 23 |
+------------------------------------------+
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
how to create an array of checkboxes for a dynamic table. I want the checkboxes to display on the left of the table. When the checkbox is selected the user will select delete, edit, or update.
View Replies
View Related
I am trying to find distinct hostname. And my code is:
sql="select distinct a.Hostname, b.Productname from TableInventory as a, TableProduct as b, TableModel as c WHERE a.ModelId=c.Model AND c.ProductId=b.ProductId"
rs.open sql, cnn
After which im suppose to get the indivual hostname's productname, qty and cost.
i tried to split up the rs into array values Code:
View Replies
View Related
Here's what I have:
quiz.asp?done=6|3|2
my asp code:
done = request.querystring("done")
Now, if I response.write done
I get 6|3|2
However, I want to create an array of 6|3|2 ???
View Replies
View Related
I have a textfile that I'd like to put into an Array using VBS. The text file has over 6200 entries. Is it possible to put those entries into an array automatically using VBS? So far all the resources I've looked at show manual creation of the array.
View Replies
View Related
CODE:
<% apeynom1=trim(ob_rs("apeynom")) %>
<input type="text" name="apeynom" size="25" maxlength="20" value= <% =apeynom1 %>
My intention is to made a text input with the ob_rs("apeynom") content as it initial value.
It occurs, that the initial value picks only the first word of a sentence, that is, until the content reaches a blank space.
Eg. If the ob_rs("apeynom") is "Juanito Perez" it only displays me "Juanito" as the initial value.
View Replies
View Related
I'm looking for help again!!! I have been writing a page to update a database but now have another 'silly' problem with listbox's. I'm trying to populate the list box with static values pre-programmed into the page and then set the listbox value to that of the one contained in the database for that particular record the code I'm using is -
<select name="SelectGarage">
<option value="0">No</option>
<option value="1">Yes</option>
<option value="2">Yes (Two)</option>
<option value="3">Double</option>
<option value selected[color=blue]
><%=(CPEditPropertyRS.Fields.Item("Garage").Value)%></option>[/color]
</select>
The listbox comes up OK and the value contained in the database is displayed, but if the number '1' (for Yes) is the value stored in the record to be edited, the value is displayed as a '1' and not a 'yes'. I don't want it to actually add the value in the record, I want it to select the corresponding label i.e. '1' = 'Yes'.
View Replies
View Related
where I can find information regarding a problem I am having with w2003 ii6 and asp.net. The first page load each morning can run to 1/2hr, which as you can imagine is not exactly making anyone happy. There doesn't appear to be a newsgroup dedicated to asp.net, though I may have been looking in all the wrong places.. so many groups.
I've found some info on the web related to the problem but nothing which discusses what may be going on, nor how to diagnose it.
View Replies
View Related
I have a registration form that I'm making and I need to get the count of available spots for each class session. I can't get the array to return something like "0,0,0,0,0,0". Is there a way to do this? There are 6 total classes and they are named 1, 2, 3, 4, 5, and 6.
When you start out, each count will be 0 (meaning no one signed up yet) which makes the openSpots variable equal to 35 (maximum # allowed). Code:
View Replies
View Related
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'm using Windows 2000 server n IIS I'm Using FileSystemObject of ASP in Server Every File and Folder has 2 Size when we get properties of any 1 actual size and Size on Disk.now my problem is when i get the file size from ASP object it give Size value but when i try to get folder size it gives size on disk and both values are different.
I'm creating a size to access limited size to upload files so i just check the folder size and then get size for those which are going to update by user then i will less those size to actual folder size to get remaining size.
View Replies
View Related
Here's what my code looks like...
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
how can I get size a file from any sites.
http://www.domain.com/fileblablabla.zip
I want to know what the size of file is by using ASP..
is there any way ?
or is there any free component ?
(But it must cancel immediatily after getting the size of file..
because maybe its size can be 50 Mb
View Replies
View Related
I am using variable passing through the url, and as it is getting larger, I am finding that occassionally some values are getting trimmed. Is there a limit to how long a url can be?
View Replies
View Related
how can I get different font size in the form method "select", "input"
instructions working under ASP? because when I check with the browser is too
big in the table.
============================================
<FORM method="post" action="../gallery/default.asp">
Select a category:
<SELECT name=""CategoryID">
<option" value="">Select Your Gallery</option>
<OPTION value="3">Digital Package</OPTION>
<OPTION value="6">others</OPTION>
<OPTION value="5">test</OPTION>
<OPTION value="4">Traditional Package</OPTION>
</SELECT>
<INPUT type="Submit" value="View Photos">
</FORM>
==========================================
View Replies
View Related
I am having a problem with this code. The problem I am facing is that
the first image is displayed in its original size. But when I click the
next button, the next image not displayed in its original size, but
being displayed as 100 x 100 pixels, same goes to the 3rd picture and so
on. Code:
View Replies
View Related
cookie has a limit size? if yes, how big?
View Replies
View Related
I only need to know the height and width of the image.
It doesn't seem to be as easy as php's "getimagesize($imgFile);" method.
<%
'Copyright *c* MM, Mike Shaffer
'ALL RIGHTS RESERVED WORLDWIDE
'Permission is granted to use this code
'in your projects, as long as this blah
'copyright notice is included
function GetBytes(flnm, offset, bytes)
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFTemp = objFSO.GetFile(flnm)
lngSize = objFTemp.Size
set objFTemp = nothing
Set objTextStream = objFSO.OpenTextFile(flnm,1)
strBuff = objTextStream.Read(offset - 1)
GetBytes = objTextStream.Read(bytes)
objTextStream.Close
set objTextStream = nothing
set objFSO = nothing
end function
function lngConvert(strTemp)
lngConvert = clng(asc(left(strTemp, 1)) + ((asc(right(strTemp, 1)) * 256)))
end function
function lngConvert2(strTemp)
lngConvert2 = clng(asc(right(strTemp, 1)) + ((asc(left(strTemp, 1)) * 256)))
end function
function gfxSpex(flnm, width, height)
fileT=split(flnm,".")
if fileT(1)="gif" then
Width = lngConvert(GetBytes(flnm, 7, 2))
Height = lngConvert(GetBytes(flnm, 9, 2))
elseif fileT(1)="bmp" then
Width = lngConvert(GetBytes(flnm, 19, 2))
Height = lngConvert(GetBytes(flnm, 23, 2))
elseif fileT(1)="png" then
Width = lngConvert2(GetBytes(flnm, 19, 2))
Height = lngConvert2(GetBytes(flnm, 23, 2))
end if
gfxSpex=true
end function
if gfxSpex("images/urlogo.gif", w, h) = true then
response.write w & " x " & h
end if
%>
Which is a little bit shorter, and seems to work ok so far, but isn't there anything easier, like php's "getimagesize($imgFile);"?
View Replies
View Related
I have a drop-down with 40 option values and only one option should be selected of the 40 options. The list size should be 1.
When I click on the list, it drops down 30 options (a very long list) with a scrollbar for the last 10 options.
Is there any way, when I click on the list it drops down only 5 options (as if the list is of size 5) and allow a scrollbar to browse the remaining 35 options.
Code is:
<select name="deplist" id="deplist"
<option value="Commerce">Commerce</option>
<option value="Instru">Instrumentation</option>
... similar such 38 options
</select>
View Replies
View Related
I need to set the image size in the following line. When I try to set the
img to 75x75 I am getting an error. The line I'm having problems with is :
Response.Write "<a href='" & imageFilePath & strPicArray(0,x) & "'><img
src='" & thumbFilePath & strPicArray(0,x) & "'width="75" height="75"></a>"
View Replies
View Related
How does one limit the amount of characters being entered into a <textarea>. I know we I can maxlength="50" an <input>, but what about a textarea?
View Replies
View Related
I need a general code for limiting an image size in pixels.Uploaded Images from people may not be larger on width than 400 px.
If so than a script would minimize them to 400 but if they are 260 px then they of course appear in 260 px
View Replies
View Related
How do I find out the size of a file. I can get listing of files in a
directory but I cannot figure out how to get the file size also.
Here is what I have so far.
<%
Set MyDirectory=Server.CreateObject("Scripting.FileSystemObject")
Set MyFiles=MyDirectory.GetFolder(Server.MapPath("test"))
For each filefound in MyFiles.files
Response.Write filefound.Name & "<br>"
Next
%>
I don't have any books for reference here. Can someone point out a good
online source?
View Replies
View Related
i have a page that displays an image. the image path is a variable passed in the url link. eg. enlarge.asp?picture=http://www.hey/.com/you.jpg
and the window it opens works. but id like to try and get the enlarge as to get the height and width dimentions so i can call a new window to opena popup and ill dynamically have the images dimentions to scale the popup to fit.
and right after the javascript calls a new popup window itll use a close window function. and since it happens before the head tags it should be seamless as if i had a regular link calling a popup.
View Replies
View Related
I have these two tables in a SQL database. i.e. tbl_A and tbl_B
I need to create an ASP page that will tell me the size of each table and then the combined size of both tables.How do I accomplish this?
View Replies
View Related
Is there any limit of file size or lines of code in asp.
View Replies
View Related
i am using the file type input and an asp upload component to save the file from client machine to server machine. if user type the file name or path that doesn't exists, the upload component still create a file on the destination but that file is empty. Now, how can i determine the size of the file saved on destination.
OR
its alternative is that can we restrict the user to type the path and file name. i mean the text field is disable and only browse button is used to select a file.
View Replies
View Related