Loop Causing A Time Out

When I run the following code it causes my page to time out This query can onlt return 30 records for any given month I can't figure this out. Code:

View Replies


ADVERTISEMENT

Time Loop

I am trying to get an asp working which will loop every 30 minutes. Then take a copy of one file from one server and place the date/time now() in front of the file before writing it to another.I tried it on my laptop at work just by checking if the file exsits but seem to have trouble encoding with unc paths.
[code]
<%
Set fs=Server.CreateObject("Scripting.FileSystemObject")

If (fs.FileExists("viper3 vdatainfosystv2502vinfotv32.exe"))=true Then
Response.Write("The system is offline for essential data load")
Else
Response.Write("File exists.")
End If

set fs=nothing
%>
[code]

View Replies View Related

&amp; Causing Validation Problems

I have some code on my application like the following:

<%

redirectUrl = "mypage.asp?type=100&id=something&view=10

'some more asp code

%>

<a href="<%=redirectUrl%>">Some Link</a>

the above code works fine but throws validation errors.

the errors are

# olumn 81: cannot generate system identifier for general entity "id".

An entity reference was found in the document, but there is no reference
by that name defined. Often this is caused by misspelling the reference
name, unencoded ampersands, or by leaving off the trailing semicolon
(;). The most common cause of this error is unencoded ampersands in URLs
as described by the WDG in "Ampersands in URLs". Code:

View Replies View Related

Varchar In Db Causing Errors

I have a field in a db thats a varchar (10).its values pass well in a query string if the values do not begin with 0

134567 passes great

0132 passes another number like 2343 (where it comes from I have no clue?)

View Replies View Related

RS Causing Strange Error

For some reason,, the following recordset rs("w2itd1") will run fine when I'm looping it out on a page, but when I have it inside a sql statement, I get errors.

for example:

sql = " Insert into table (title) values ('"& rs("w2itd1") &"') "

This will give me an error. The contents of this rs is a book title. Oddly enough, however, if I enter any other of the rs("fieldnames") that I have, in exactly the same fashion, I have no problem. There just seems to be an issue with the text coming thorugh. Can someone
indicate what the problem could be?

View Replies View Related

Session Variable Causing A Delay

I have a project that uses a frameset. On the pageload event one frame calls
an ASP.Net page that watches a message queue. The other frame has a page
that allows a user to submit queries. Through research I've discovered that
IE allows only two connections to IIS from any one client at a time. This is
okay since at any given time I can only have the AJAX thread and a page
request.

I noticed a problem today. If I introduce a session variable in any of my
server side code it causes every request to lock for 90 seconds before a
response comes back. After studying this behavior I am stumped. Is there an
extra thread being fired whenever session is used?

View Replies View Related

Page Refresh Causing Addition

below is the code which is used for adding items and then displays the item
which is working fine i have a problem when i display the item if the user press f5 or does refresh it increases the qty.

so if u look at the code i get the product details from a earlier page if the qty which i get is 2 and then i do a refresh on the page the qty becomes 4 is there any way to stop it Code:

View Replies View Related

Querystring Values Spaces Causing Errors

I am trying to update my table with a value passed though the
request.querystring method but as you can see from the sql statement below
it is causing errors.

In this case the name of the department as displayed is "Arts and
Entertainment" but it is giving me something strange when I try to use the
variable

update empprofile set department ='Arts%20%26%20Entertainment' where
employeenumber =219104
Microsoft JET Database Engine error '80004005'

You cannot add or change a record because a related record is required in
table 'Departments'. Code:

View Replies View Related

Parameter Not Passed From For Loop To While Loop

I'm trying to pass a parameter from a for loop to the nested while loop
but only the first counter is passed. Here is the code:

View Replies View Related

Nesting One Loop Within Another, Using 1st Loop As Criteria For 2nd

I have a recordset that I loop through all of the data within a table, within the same loop, I am trying to add another loops that pulls information from the first recordset to base the second recordset off of: Code:

View Replies View Related

2 Divs Side-by-side Causing Me Grief

I wanted to just use standard INPUT buttons and colourise them, but user's
of my web app want to continue creating their own buttons and using these in
css. Before I used straightforward images, but creating an image for each
button was a mare. You see this is all to do with giving people the ability
to change the look of the web app, in other words a skin, using nothing more
than pics and css files.

My theory was that I create a div, span or whatever for the left hand side
of the button and ref the image (in css) to be a 2px wide img that can have
the curved left hand edge of the button.

I would then put a div, span or whatever next to this and the reference
image would be a really long image (horizontally speaking) so that if the
button text was long then this would keep moving to the right and
accommodate basically any text length. Code:

View Replies View Related

Time Calculation :: Difference Between Login And Current Time

I would like to display the difference between the logging time
[Session("start"] and the current time [now]. In hours minutes and seconds,
I have tried a couple of things but all I see is gobbledy gook.

View Replies View Related

ASP To Re-load Page From Time To Time To Reset Varaibles

I have a website that I subscribe to that allows me to track tasks. I have an extra computer with a big monitor that i want to always display the task list. the problem is after so many hours I get logged out.

I need to need to reload that sign in url every few hours Code:

View Replies View Related

Comapring Database Time And Computer Date/time

there i was just windering how do i compare a date/time vlaue in sql server agaisnt the computers' date/time.
for example, if computer date/time is two months or 2 weeks before the database date/time do something

View Replies View Related

Time/Date Format And Changing Time To GMT

Currently working on a ASP for a friend, which requires the date and
time on it. It pulls in entries from an Access Database with dates and
times in the format of:

"Fri Oct 17 18:02:46 2003"
However my date and time on the ASP page is displayed as:
"Friday, October 17, 2003 18:02:46"
using the script:
"<%Session.LCID = 1033%>
<%=FormatDateTime(Date(), vbLongDate)%>
<%Session.LCID = 2057%>
<%=time()%>"

Anyone know how to change this script, fully or partly to produce the
date and time on the format that's in the access database i.e. "Fri Oct 17
18:02:46 2003" Code:

View Replies View Related

Time Convert String To OdbcType.Time

I am working on a database that collects information about incidents. One of the fields that people enter is the time of the incident. I am trying to convert that string that people enter into a OdbcType.Time and I am at a lost.

View Replies View Related

Local Machine Time To Eastern Time

How will we convert the system date & time to other timezone for eg: Eastern Time zone using ASP?

View Replies View Related

Time Function Returns Wrong Time

When the Form is submitted I use the Date() and Time() functions to put the date and time into the Body part of the e-mail. The time reported is three hours earlier than the time at which the Form is actually submitted.

I understand these functions are evaluated on the server so the server must be in a time zone three hours earlier than where I am . Is there any way I can get the local time at the location where the user is actually located. ?

View Replies View Related

How To Get Asp Execution Time And Database Connection Time ?

Any some tools or sample codes drop down asp script execute time and
database connection time ?

View Replies View Related

Server Time Local Time Convert

I'm trying to do a very simple code that converts the server time into a time zone of your choice.

<%
dim h 'Current Hour
dim i ' Time Zone Increase - add or subtract hours
dim r 'Result Here
h = Hour(Now)
i = + 2
r = h + i
%>

but obvisouly i'm having trouble with the time zone convert.

View Replies View Related

Compare The NOW Time With A Deadline Time

I am trying to compare the NOW time with a "deadline" time. Please help. Just not sure why this is not working. I need to be able to say IF IT'S BEFORE 9:30 TODAY, IT'S OKAY TO ADD SOMETHING. IF IT'S AFTER 9:30 TODAY, YOU MUST ADD IT TOMORROW.

CODE:

nowtime=now()
deadlinetime=formatdatetime(now(),2) + " 8:30:00 AM"
response.write "NOW: " & nowtime & "<BR>"
response.write "Deadline: " & deadlinetime & "<BR>"
if nowtime<deadlinetime then response.write "can send out today" end if
if nowtime>deadlinetime then response.write "must send out tomorrow" end
if

RESULTS:
NOW: 1/18/2007 8:51:43 AM
Deadline: 1/18/2007 8:30:00 AM
can send out today

As you can see, NOW is GREATER THAN Deadline, so it should must send out tomorrow.

View Replies View Related

Time Calculation :: Between Two Dates And Time

i want to calculate the total time between to dates and time.

Example: Total time elapsed from date 1 time 1 to date 2 time 2.

27/09/2004 11:00 - 28/09/2004 10:30

The user enters a record and then later comes back and closes it. I need to know the time it took from when they entered the record until the time it was closed.

View Replies View Related

Do While Loop?

I have a case statment like

select case code
case "01"
ups_desc = "OPTION1."
case "02"
ups_desc = "OPTION2."
case "03"
ups_desc = "OPTION3"
case "07"
ups_desc = "OPTION4"
case "08"
ups_desc = "OPTION5 "
case "11"
ups_desc = "OPTION6"
case "12"
ups_desc = "OPTION7"
end select


I then have table called "users" which has the following
id
UserID
Code

now the trick

I want to loop through the recordset of the user tables and populate a drop down where the code from the case and the user table are the same.

Something like

do while rs("code") = code
<option> This then is populated based upon the loop(I have this code)</option>
loop

View Replies View Related

Do While Loop

I need to insert recordes into a db based upon a number returned in a form
Somerthing like

AddRecords = Request.Form("NumberOfRecords")

Count = 0

if Count < AddRecords Then
Do while Count.eof

SQL Code....

Count = Count + 1

Count.move next
Loop
End If

View Replies View Related

How To Loop

i have 2 tables (A & B) with date records
now i loop table A and then table B, the output will be table A in the front
and table B in the back.how can i make the output show by date in both tables altogether?
do i need to combine tables before but the number of records is over 100K
which may spend a lot of processing power?

View Replies View Related

Asp Loop

on my classifieds site i would like to create a simple ads system. i currently have the ads site made but need some advice.

on my classifieds site i would like to display the ads down the left hand side.

however i dont want to over display ads.

if there is not many items listed i only want a small amount of adverts shown on the left hand side. however if there is lots listed
i would like quite a few adverts listed.

otherwise i would have a big list of adverts and only a small number of items listed making a big blank space on my page.

i am guessing this would have to be a loop or something.

the code i am using to show the text links is <%=adurl%>

View Replies View Related

For Loop

I am using a for loop in one of my asp page. Could someone let me know if I can do the for loop as follow:

[code]<% for i = 1 to 5 %>
my html code
my html code
my html code
<% Next i %>
instead of
[code]<%
for i = 1 to 5
Response.Write "<input name = 'id'"&i&" type='text' value = "&id& ">"
Next i
%>

View Replies View Related

More Than 1 Do Loop

I am using ASP and need a DO LOOP to get some info back from the db. but the asp reads the first do loop but does not read the second one ......

View Replies View Related

While Loop

is there any function or statements that work the same as the 'break' statement in C++ language?

for example:

While Not rs.EOF
If rs("LoginID") = userId Then
break 'what shd i use for ASP???

Else
rs.movenext

View Replies View Related

Loop Within A Loop

im writing some script to add records to my db. but if a value thats about to be added exists, then dont add that record.for example: if i want to add 7 records to my db with the values 1 - 7, but the db already has 3, 5 and 7, then it should only add 4 new records (1, 2, 4 and 6).

i have a record returning all records form my db, and an array with the values i want to add. i want to loop through my recordset of all existing entries, then for each loop, start another loop to see if the value exists, and if it doesnt , then add a new record.

View Replies View Related

For Loop Or Do While Loop

How to use the for loop or do while loop to create the age range from 10 -100 to let the user to select from the form object - list/menu by using asp? The coding below is just a concept. For example

Response.Write("<select name=""select"">")

for (a=0; a<101; a++)
(
Response.Write("<option value=""" & age & """>" & age & "</option>")
)

Response.Write("</select>")

View Replies View Related

If Then Else Loop

I'm trying to create a page where images are displayed based on an id in a sql table (basically its an unlit candle until a value in the id field exists). I'm not getting an error with my code below - but its not working right either. Code:

<% If rs("my_id")="2" Then Response.Write "<img src=""images/07.jpg"" width=""56"" height=""97"" alt="lit candle">"Else Response.Write "<img src=""images/UNLIT_07.jpg"" width=""56"" height=""97"" alt=""unlit candle"">" End If %> ...

View Replies View Related

Sub And For Next Loop

I have a SUB which has input variables. If I run it once its okay, but I need to include it in a for....next loop. Can this be done ?

for i=0 to 100
call mySub(arr(0,i))
next

sub mySub(var)
.....code
end sub

View Replies View Related







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