Array Is Fixed Or Temporarily Locked

I posted a similar problem a while ago but never found a solution. I am passing an integer value (called NoElements)from a html form (which gets created using javascript) to an asp page. The value of NoElements is used to create an asp array of that size. At first I was confronted with the following error:

Expected integer constant

I then was advised to initialise the array (to say 100) and then do a ReDim Preserve. I now get this error message:

This array is fixed or temporarily locked? What should (or at least I thought) be a simple porcedure is making my life a nightmare.

View Replies


ADVERTISEMENT

ASP Error : This Array Is Fixed Or Temporarily Locked

i got this error when trying to looping through an array

Quote: Microsoft VBScript runtime error '800a000a'

This array is fixed or temporarily locked


Here are my code:

View Replies View Related

ADODB.RecordSet Object To Temporarily Store

I would like to use an ADODB.RecordSet object to temporarily store some data and then iterate through it. Actually it needs to be a RecordSet only because it is a perfect choice as data structure for what I want to do, I don't want to actually run queries or update tables with it. It seems to me, however, that the RecordSet works only if there's a query behind it. ADO complains about the RecordSet not being open when I try to add rows by the AddNew function, or try to add fields to it.

Is there a way to use the RecordSet without actual database date behind it? Or is there maybe some object in VBScript that provides the same or at least similar functionality? (Apart from Scripting.Dictionary, which is great, but I would like to use something more similar.

View Replies View Related

Locked Database

Every now and then i have an issue with an asp site which results in a server restart. The database is an access database which gets locked to the admin account on the server, is there anyway of recording what is locking the file or a way of preventing it being locked?

View Replies View Related

Locked Code

I heard Some were that an ASPASP.NET code can be lockedClosed, U can run the code but if some how U download it to your computer U won't be able to open it to see the code, it will be locked some how.

View Replies View Related

Database Locked

I have inserted this piece of code:-

path=server.mappath("../../../databases/") & "/merlin.mdb"
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFile(path)
lastmodified=f.DateLastModified
lastmodified=dateAdd ("h",6,lastmodified)

so that I can determine when the user has modified the database. However the problem is that on the server, it works fine, however, on the local server (IIS) on my pc, everything seems to get stuck. Also it locks the databases (.ldb) and I cannot do any amendments on this database, if i don't restart the PC.

View Replies View Related

Locked File Handlers

We had to move a legacy ASP app to an IIS6 server and now the app has stopped working. Basically the offending script opens an image on a network share, rotates the image, and then saves it back to the original filename.

Unfortunately as soon as the script touches the file it seems to lock it and writing the rotated image back to the file fails. After that it becomes impossible to delete the file off the remote server as it is marked as in use by another application.

It doesn't seem to have anything to do with the fact the image is on a share, as the problem happens when I try it with a local file as well. Code:

View Replies View Related

Detecting Or Ignoring Locked Files

We have an ASP script for updating web content which deploys a whole bunch of files from one server to another on the click of a button. Here are the steps it takes - pretty simple:

1. Delete all files requiring an update from Server B (remote server)
2. Copy all new files from Server A (local) to Server B

The problem is that many of these files are ASP scripts themselves and if someone is browsing the 'live' website on Server B (remote) then IIS will have the current scripts locked. So our delete script runs but gets to a file locked by IIS and fails, having deleted half the site, and does not continue with copying over the new version of the site. Very messy! I have to Remote Access to the server, wait for a gap in usage and manually delete the offending scripts before running the 'Deploy' functionality again.

So, I need to be able to check if a file is locked and ignore it in the process (perhaps reporting on that later) or be able to over-write locked files regardless. Code:

View Replies View Related

Show Fixed Decimals

How do I show a double with 2 decimal places in vbscript? Also is there a way to show a string that is holding a number with two decimal places or does it need to be converted to doulbe first and then converted back to string after manipulating the double?

View Replies View Related

Create Fixed Section

I am a C#-Coder and now I have the duty to rewrite a ASP-Website and add some functionality. The problem is that I have never seen ASP before and I don't have the time to learn everything necessary to complete my work.

It's a very simple problem and would be really great if someone could tell me what to do or show me a small code-example. I think "learning by reading code" is the best way to get new information

I have an ASP-Website with a very long list (out of a SQL-Query). If I scroll down the page I can't see the list-header any more <- THATs my problem. What I need is an ASP-Website with a fixed section that can't be moved and below a common, scrollable website.
The header of my SQL-Query should be in this fixed section and the datasets should be in the scrollable section.

View Replies View Related

Display Fixed Decimal Digits

I have variable, say "total". It can be an integer or floating number.

No matter what value it stores (5 or 5.1 or 5.24), when I display it, is
there a way I can make it display it with fixed 2 decimal digits, like 5.00?

View Replies View Related

Fixed! Form Values Being Cut Off - Strange!

i'm getting an instance of a form field value being cut off when input into a MS SQL db. i can't figure out where it's doing it. the field datatype is set to VARCHAR with a size of 100. the data is being cut at 30 characters. here is the form field: Code:

View Replies View Related

Selecting Fixed Number Of Records From Database

I have an articles_tbl . How do i create a select statement which only brings back the latest 3 records added to this table (the database has a field called 'date_added') so the information of when they were added is present.

I was just wondering how to bring back only THREE records and showing them, instead of bringing back the entire table content and then showing three out of them..

View Replies View Related

Creating Fixed Width Text Files

i know how to create text files using ASP, but is there any way to create fixed width text file using ASP? i need to have the data lined up in the same location at each row.

View Replies View Related

Selecting Tables From A Drop Down Box With No Fixed Position On Screen?

i am designing a search engine, you select the search options from five choices in a drop down box, each option reveals a table, but the tables have fixed positions on the html page.

i need it so that if only one option is picked to search and it is the last option on the drop down list, that it will appear at the top of the page? i dont have a clue what type of function to write to do this or what techniques will be involved!

View Replies View Related

Extract 'days' From Now Till Future Fixed Date

How would one extract the number of (days) from (today) and a (future fixed
date)- eg: February 12, 2003. ....where today will always be Date().

Thus:

02/12/04 - Date(now) = 27 days.

Can anyone help me here?

View Replies View Related

Rebuilding Of An Array From An Existing Array

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

Array Integers Vs Array Variables

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

Create A New Array From An Array

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

Array In Sql

i want to excute given logic

select * from Product_Table where Product_Code in

ARRAY

i.e i want to select Product_Code from VB array and not from a query
is it possible.

View Replies View Related

Array

I know I can do this programatically using a loop but I thought there might be
some easier or more effective way.

I am trying to invert an array.

i.e.

array1 = 1,2,3,4,5

but I want to get

array2 = 5,4,3,2,1

Is there something like array2 = invert(array1)?

View Replies View Related

Array

I have to following code:Code:

dim arrRes(9),getal,som
arrRes=Array(4,4,4,4,4,5,5,5,5,5)
for getal=0 to 9
som=som+arrRes(getal)
next
response.write("Het klasgemiddelde is " &som/10)

I get a type not match error on the second line

View Replies View Related

ASP Array?

I have a page in my admin system where the user can edit products they
have added. The problem I am having is with Related Products. These are
all listed in a multiple list. What I need to do is have those selected
when the product was added, already be highlighted in the multiple list
on the product edit page. Here is my post from another forum.

Code:

View Replies View Related

Array

For some reason, when I try to run the following array, I'm getting an
error:

dim cat(0)

cat(0)="0407"
cat(1)="0102"

'I will be adding more to this array, but just trying with two for
starts.

for counter = 0 to 1

itno=cat(counter)

'I get an error when it runs through this function

Function rightvar(theVar,lengthNeeded)
Dim sResult
sResult=theVar
if Len(theVar)< lengthNeeded then sResult= String(lengthNeeded -
Len(theVar)," ")& theVar
rightvar=sResult
End Function

Can someone help me understand why?

View Replies View Related

Array

The problem is that in my 5 years of programming in various languages i have never really understood arrays (DUMB @$${lol})
What i want to do is offer an advanced search of a database table on my website. I currently offer the functionality so that the whole of the database can be viewed within the web page so that it doesn't need to be downloaded/need access to view it.
What i need to do is run a script that takes all of the column headings that i have and put them into an array. Then with the array i need to output each element into a drop down box.

View Replies View Related

Asp Array

Ok what I have is a little script which runs through my stock compares how many of one item we have compared to what we need and displays the out come.

What id like to do is make an array with the item name so lets say If how many is needed is greater then 0 then add the name of that consumable to an array and move on until the end.

Then I want to use the arry to display each consumable on an order form. Anyone have any idea how to do this in ASP or can give me any advice on a better way to do it?

View Replies View Related

Array

I am doing the following:
Code:

dim n
n=4'ubound(arrsequences)
response.write "n:" & n
dim arrproductNames(n)
dim arrproductSeq(n)

and getting the following error:
Microsoft VBScript compilation error '800a0402'
Expected integer constant
process.asp, line 33
dim arrproductNames(n)

View Replies View Related

Add Something To An Array

How can I add something to an array, e.g
[VBS]
Dim MyArray

MyArray = Array("Item 1", "Item 2", "Item 3")

'Do some code here

'I now want to add another item to my array, how?
[/VBS]

View Replies View Related

An Array

Is there a way of determining whether or not a value or values are present in an array.
Is there something nice and easy as with php's

if(in_array($SomeValue,$myArray)){
echo "The value is here";
}
else{
echo "The value is not here";

View Replies View Related

ASP Array

how to store request multiple value(Select box) in an array.

View Replies View Related

2D Array

im trying to write a script that will allow me to take names and addresses
from a coma delimetered text file and insert them into a db.

ive managed to come up with this script which deals with works well if i
only have names in the text file. ie:

bob smith, peter smith, brian smith

but now i want to do something simular with a text file formatted like so

bob smith, bob smiths address, peter smith, peter smiths address,

i think i have to use a 2 demensional array but really have no idea how to
go about it. any help appreciated. here is what i have so far. Code:

View Replies View Related

Array

I have a form that has fields named Title1, Title2, and so on to title 12

I want to set up an array that goes through all the input feild values that I already put into variables such as Title1, Title2...so on. It then replaces ' with '' so the apostrophe can be entered into the database. So it:

Creates an array by looping through the variables that get the form feilds.

Then loops through the array and replaces the ' with '':
Title1=(Replace(Title2, "'", "''"))

View Replies View Related

Array

I'm looking to make an admin page for a web photo gallery, and I need to make a drop down menu showing all files in a given directory that do not have comments in a database for the given filename.

I'm curious about the most efficient way to do this. I don't want to query the database separately for each file as this would be horribly inefficient. I'm thinking about two arrays, one containing all filenames in the photo directory, and one containing filenames from the database that have descriptions.

Is there a simple way in ADO to do a set operation on arrays, that is to produce array C that has all elements in array A that are not contained in array B?I can do this with while loops, but there must be a better way.

View Replies View Related







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