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:
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?
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.
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....
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. ?
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.
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.
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?
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.
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: ....
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
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?
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?
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 ?
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.)
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?
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.
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?
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()
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"
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?
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.
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 %>
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)?
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 ?
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:
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?