Pick Wrong Time Interval,scheduling
The interval that a driver is available from 5:00:00 AM to 8:00:00 PM....
And I dont want to pick this route that runs from 10:15:00 to PM 4:00:00 AM...because the driver is not available btw those times..However my query picks that tooo..Why? Code:
View Replies
ADVERTISEMENT
The interval that a driver is available from 5:00:00 AM to 8:00:00 PM.... And I dont want to pick this route that runs from 10:15:00 to PM 4:00:00 AM ... because the driver is not available btw those times..However my query picks that tooo..Why?
rs3.Open "SELECT * FROM Routes " &_
"WHERE instr(Day_Runs,'"&trim(rs("sch_day"))&"') " &_
"And ( (start_time = #"&FormatDateTime(rs("sch_time_start"))&"# AND end_time = #"&FormatDateTime(rs("sch_time_end"))&"#) " &_
"OR (start_time > #"&FormatDateTime(rs("sch_time_start"))&"# AND end_time = #"&FormatDateTime(rs("sch_time_end"))&"#) " &_
"OR (start_time = #"&FormatDateTime(rs("sch_time_start"))&"# AND end_time < #"&FormatDateTime(rs("sch_time_end"))&"#) " &_
"OR (start_time > #"&FormatDateTime(rs("sch_time_start"))&"# AND end_time < #"&FormatDateTime(rs("sch_time_end"))&"#) )" ,conn
View Replies
View Related
I am developing site in asp where I need to call a url at every interval. Is there a way to automate this. I want to call the url every 15 or 30 mins.
Cureently I have written a asp script tp call it using
Set objWinHttp = Server.CreateObject("WinHttp.WinHttpRequest.5.1")
objWinHttp.Open "GET",URL
objWinHttp.Send ' Send it.
strResponse3 = objWinHttp.ResponseText ' Get the response string from the object.
But it is not schedule..I can call it only when I rum the asp script. So is there any way I can schedule this url call for every 15/30 minutes.
Also forgot to mention : the site does not have that much traffic that I can add it in index page...there may be a user visiting the site in 5 hours time or within next 5 mins or for next 2 days there may be no visitor.
View Replies
View Related
I want to send automatic emails from my website after a definite interval of time.
I need a way to execute my ASP script repeatedly without any external triggering....
View Replies
View Related
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
On a form I have
Date_Start Date_End
I have a new
Date_Start1 Date_End1 which the use
inputs.
I need to validate that Date_Start1 and Date_End1 are a date range entirely separate from Date_Start and Date_End i.e. no overlapping whatsoever. In effect checking a date interval.Are there any functions out there already written that can do this? It seems to basic to start comparing and contracting dates! Would like to do it in Javascript, but happy in vbscript also.
View Replies
View Related
I am creating a scheduling application like that of what Mcdonalds' uses.The screen shows which cars are in need of services in which they were entered into the system. The application will refresh and show the mechanics, which car arrived first for an oil service. Does anyone have any demos, samples, or examples of something like this? This is my first full-fledged ASP application and I need some help getting started.
View Replies
View Related
I've seen questions about scheduling ASP scripts posted in this group
many times so hopefully this will be useful information to a few
people.
I just wanted to let you all know that our script scheduling service at
www.cronservice.co.uk has been rewritten from the ground up and is now
better than ever. If you are looking for a way to schedule your ASP
scripts and don't have access to cron or task scheduler then you need
this service.
We've also just launched an affiliate program so if you run a Website
for ASP/Web Developers why not sign up as an affiliate?
View Replies
View Related
I've got an ASP page that needs to run once a day at 7:00 AM. I've currently got task scheduler setup to run it then but have come across a limitation. The task scheduler doesn't think the task (the ie window) has finished running because the window doesn't close itself. Can you come up with some suggestions?
I've tried making a page that closes itself, but that doesn't work because the page that closes itself needs confirmation from a user that the page close request is true.
View Replies
View Related
how do i pick the Mac address of a NIC of a computer ?I know how to get the IP address. but wondering if its possible to pick the NIC.
View Replies
View Related
I'd like to run an asp script at a specific time on a Windows 2k/IIS 5 server. (The script queries a database and sends an email to an administrator if a record has a datestamp older than 24 hours and another field = no).
I've tried the following method but can't get it to work: ....
View Replies
View Related
haven't got the db at home... but do you think this will work...
<%
dim client
dim username
dim directory
dim fs
dim create
set fs=Server.CreateObject("Scripting.FileSystemObject")
if fs.FolderExists("h:"&client,&username)=true then
response.write("Folder already exists!")
else
set fs=fs.CreateFolder("h:"&client,&username")
end if
set fs=nothing
%>
View Replies
View Related
How to i search the colon in the data and then pick characters after colon. for eg:
ACTUAL DATA
Date: Fri Aug 04 15:14:38 EDT 2006
REQURED DATA
Fri Aug 04 15:14:38 EDT 2006 .
View Replies
View Related
I'm using Asp 3.0 and windows 2000 and SQl server 2000 as back end My problem is every day morning 8 i want to take some data from the data base and send a mail to some mail ids which i retrieve from the database.
I want this to be executed at 8 Am every morning automatically. Is there any way to schedule the execution of the asp page at a particular time. Or any other ways r there like using vb script?
View Replies
View Related
I wanna write asp code to pick up *.MAI from particular folder and read them. There is no problem with reading the file but how can I pick up the latest file from particular folder?
View Replies
View Related
Something is not right when I generate the results for assigning drivers to routes...My [ response.Write(rs5.recordcount & " " & rs5("Tot") & " " & rs1("Full_Part") & "<br>") ]
The rs5("Tot") is always zero when the recordcount is 1...with rs5 I am trying to control not to assing more than 42 hours for full timers and 22 hours for part-time drivers per week.... What is wrong with the logic ?
View Replies
View Related
I'm trying to work out a reg.exp. that will pick out a sql statement against a certain set of tables - in this case any table named "Survey~something~", but I only want to pull back those statements where the CompanyID column doesn't appear in the query. (The expression is being used in my editor so it might appear a little strange, but by and large it works the same as you'd expect.)
[^']select(.){0,100}from(.){0,100}Survey(.){0,25}where (.){0,200}
What do I need to add so that I get those without a companyid column?
Something like...
[^']select(.){0,100}from(.){0,100}Survey(.){0,25}where (.){0,200}(^companyid)
(tried this one, but it doesn't work)
View Replies
View Related
I need to pull five records randomly from a database, and display them on a web page. These need to change weekly.
Is there a way to do this in ASP?
View Replies
View Related
I'm using the following code on my website:
if left(session("lastPage"), 5) <> "admin" then
session("return") = session("lastPage")
else
session("return") = ""
end if
My problem is even the "left(session("lastPage"), 5) is equal to "admin" it still not equal the variable session("return") to "". Can anyone please tell me why or what Im doing wrong?
View Replies
View Related
I'm Trying this code to switch the user group , so this code select users with groups only if the user doesn't have a group or does'nt exist redirect it to another page
Her is my code please check it
Code:
sql="select * from users,groups where users.user_id='"&id2&"' and users.group_id=groups.g_group_id"
set rs=conn.Execute(sql)
if rs.eof or rs("group_id")=null then
Response.Redirect("switch.asp?id="&session("session_id")&"&page=management")
else
dim group
group=rs("group_id")
end if
and It gives me this error message
Error Type:
(0x80020009)
Exception occurred.
View Replies
View Related
I have web prgramming to check login. After first time login, I still could login even type wrong password and username, but I need correct login when trying different computer. Is the problem with cache?
View Replies
View Related
The output contains only one record it is supposed output 2.. sch_date in db are 10-Oct-07 and 14-Oct-07 ....
Code:
rs.Open "SELECT * FROM schedule WHERE trim(sch_date) between #"&FormatDateTime(trim(x),2)&"# and #"&FormatDateTime(trim(y),2)&"# ",conn
response.Write(rs.recordcount)
response.End()
View Replies
View Related
I am getting the error message
Microsoft VBScript compilation (0x800A0409)
Unterminated string constant
Here is my Query, It is slight incorrect:
newest_sql = "SELECT TOP 5 CatID, ContentID, DateAdded, Title, FeaturedLabel, NewestLabel FROM Content, ContentTypes Where Content.ContentTypeID = ContentTypes.ContentTypeID
AND (((Content.Display)=1) AND ((ContentTypes.ContentTypeId)=4))
ORDER BY DateAdded DESC"
View Replies
View Related
I've taken over the development of a web app written in ASP. It's not
very well coded. In the live environment it's fine, but on my local
machine it falls over whenever it tries to pass a date to a SQL Server
sproc. No idea why the person before me's been doing all this string
formatting with his dates, but anyway, the error is:
Application uses a value of the wrong type for the current operation.
The dates throughout are in mmddyyyy format, and presumably ADO
running on my local machine wants ddmmyyyy. I'm rebuilding the whole
app in C#.Net anyway so I don't think it's worth me running through
and making this jumble of code international date friendly, so my
question is, where exactly is the date format for ADO defined?
Windows? SQL Server?
View Replies
View Related
I am not sure if this is in the right thread, but...I am making my new website and I haven't been able to get a 'siteinclude' file to work with my default page.
I created a site wide file, basically, includeing the header and table of contents and eventually the footer. I have other sites like this, but cannot figure out what is wrong with this one.
I thought that by putting together a site wide file, i could easily generate many pages that are similar, by adding <!--#include virtual="/siteinclude.asp"--> to the top of the page. Then making the page regularly, save it as .asp and it should have when I just created as well as the 'siteinclude' info, right? Well, the problem I am having is with the default file. It is appearing BELOW the 'siteinclude' info, instead of within it.
View Replies
View Related
Is there anything wrong with my code (see below) bcoz when 10p-6a shift my
browser returns the error cannot be a zero-length string. Im wondering why,
bcoz the 2 other shift works perfectly.
<%
'Shift: 6a-2p
if DatePart("h", Now()) 5 And DatePart("h", Now()) < 14 then
ShiftID = "A"
end if
'Shift: 2p-10p
if DatePart("h", Now()) 13 And DatePart("h", Now()) < 22 then
ShiftID = "B"
end if
'Shift: 10p-6a
if DatePart("h", Now()) 21 And DatePart("h", Now()) < 6 then
ShiftID = "C"
end if
%>
View Replies
View Related
I have the following SQL in my ASP:
sql="select * from [tblbuy] where Location like '" & request("location") & "' "
The above code is working fine. Now i wondering in case the request "location"
value is: * is it possible to modify my sql statement that will retrieve ALL when the value is * (an asterisk)?
View Replies
View Related
Why do i keep getting the following error?
ADODB.Recordset error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/_script/main.asp, line 22
I have a simple script that has always worked!
Code:
View Replies
View Related
In one of my setup, the server REMOTE_ADDR(url = Request.ServerVariables("REMOTE_ADDR")) does not work, itgives a IP address but the wrong one. It does not give the IPaddress of the machine surfing the page. It seems to me that itis giving me the IP of some proxy server. Is there a work around to this issue ?
View Replies
View Related
I'm getting the following error:
ADODB.Recordset error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another. Code:
View Replies
View Related
I got the following error:
ADODB.Command error '800a0d5d'
Application uses a value of the wrong type for the current operation.
/Include/Authors.asp, line 71
Line 71 is the one with sphone: Code:
View Replies
View Related
I am using access with sch_time_start,end,start_time,end as text fields not as Date/time....I am getting wrong amount of record...Example:
If db has 6 records like start_time and end_time = 12:00 AM- 05:15 AM,
and person has sch_time_start and sch_time_end = 12:15 AM-05:12 AM.....I am missing smth...maybe logic is wrong.. Code:
View Replies
View Related
I'm developing a web page which displays the link popularity of a site from various search engines using xmlhttp. Yahoo, MSN, etc all work fine, but I'm having problems with Altavista and Excite returing the wrong results.
For instance, if I want to find the link popularity of URL from Altavista I would use xmlhttp on this URL:
URL
and it produces 1,412,312 results. But when I go to that same URL in my browser it shows 1,339,554 results. Can anyone shed any light on why this is happening?
View Replies
View Related