One More Time/Diff Approach
I'm able to pull the image from the database but I'm not able to pull the text from the record using this script. What am I doing wrong? Code:
View RepliesI'm able to pull the image from the database but I'm not able to pull the text from the record using this script. What am I doing wrong? Code:
View RepliesIf I want to compare time, what is the best approach to go ? Any good
example ? DateDiff ( ) ?
Pseudocode
========
submitdate = rs.fields("submissiondate") -submissiondate is a date field
in a table.
if time for submitdate < = 8:15am then
do something A
elseif time for submitdate <= 10:15am then
do something B
elseif time for submitdate <= 12:15pm then
do something C
else
do something D
We need to create a user control (COM) in which it should be able to retrieve binary data from a given website after a user selects an item ID and clicks Retrive button.
We then can put this user control in a html page (generated by .asp page) so that internet users can use our data stored in our web server.
Any reference paper or sample source code?
you have a DB that contains about 2000 records.
Assume that the records are houses with addresses, already known to the user,
[remember, there are rooms, bathrooms fireplaces, garages etc].
What I want is this:
A user enters a known address in the form. The form seaches the DB and returns the address with full details.
That is, search results will be like,
Address 1234, number of rooms 3, bathrooms 3 etc.
If the address the user seached for is not found, the user is redirected to a page that prompts them to add it
to the DB. Also I would like for it [search results] to open in a mini window with an option for the user to close window after reviewing the records.
I have thought of using a drop-down but discarded that, 'cos what happens if the DB records gets to be in the thousands?
I will have a web site where hotels can list themselves on it.One thing I am encountering that is a challenge, is that every hotel has different types of rooms. Also, every hotel has the normal high and low seasons, and some even have more seasons such as shoulder, weekend, etc. which affect room rates. So here is how I concieve the design:
First, allow hotels to specify how many seasons they have, perhaps with a drop-down box of values such as 1,2,3...6,7 etc. They would then be presented with a series of text boxes, and asked to define the season, such as "High" "Low", etc. Adjacent to every season would be a beginning and ending date for that season. Next, they would be asked how many types of rooms they have, such as a drop down with 1,2,3,....5,6,7. Once decided,a form would present itself with form fields for the each room, such as description, ameneities, and most importanty, rates PER season. The seasons would be defined from previous step and would be unique for each hotel.
Once complete, this would give a web site where I could list hotels and each would have its seasons, rooms and rates listed uniquely.Is this a good concept?
I have a table which stores details of businesses. These businesses have associated links to 2 tables called areas and categories. What I would like to be able to do is display a list of all the businesses in a particular area with a breakdown of all the different categories in that area together with a corresponding count of records.
i.e. pull out all the businesses for a given area and order by business category
then for each category, display a count of the records in that particular category in that area.
Say I have a DB with 10,000 records and using MySQL paging. I want to put a link setup at the top of the page with the alphabet that will pop to the proper page for each of the letters.
So: 1 A B C D...
Click on 1, goes to page 1, click on A goes to page 7, click on B goes to page 10.. so on so forth. how to find the pages either through an SQL subquery or through ASP. I can write code to make it happen, but I'm looking for a solution that will not hamper performance as much as an array dump and search.
What would be the best approach to sending a mass email out without clogging the server or running the risk that emails maybe lost (possibly due to a timeout).
Currently, I've been given the task with sending out a monthly newsletter to our customers (upon request of course). It is an easy task from what I can tell, simply bcc all the emails, set HTMLBody and TextBody and send it off. But, I will be sending this to 5000 clients and dont want any dropped emails.
Plus, is there a way to determine failed email address (due to bad domain names, bad email address, etc) and report it to the web application?
anyone know of ways to show the dif btw two tables? if using left join . The LEFT JOIN returns all the rows from the first table even if there are no matches in the second table If there are rows in first table that do not have matches in second table , those rows also will be listed . this is not i want. i WANT to show ONLY the dif btw the two table. or can the sql statement be modified to suit my request ?
View Replies View RelatedWell i have txt file with abt 1000 Sentence i want that each sentence
appear on my website each time diff sentence on each visit on website
! i have done this:
<%
set Testfile=Server.CreateObject("Scripting.FileSystemObject")
set TfileStream=Testfile.OpenTextFile("C:InetpubwwwrootQuates.txt")
TextFormat=TfileStream.ReadLine
%>
<p align="center"><b>
<font face="Arial" size="2" Color="006699">
<i><align="center">
<%=TextFormat%></i></b>
</font>
But it happends for 1 sentense . i have 196 sentence in my txt file .
i want each diff sentence appear on each visit.
to download a file from same server we use
Response.AddHeader "content-disposition", "attachment; filename=text.mp3"
but what if i want to download a file from diff server. How can i do that? i have tried using virtual directory which is pointing to diff folder in different server but doesnot work. First is it possible use to download files from virtual directory pointing to diff server altogether?
I understand that all asp classic vars are variants and to always make sure that you are working with the type that you want it is best to use these built-in Cxx() functions, but I'm confused about whether I should use CSng or CDbl for my calcs.
I don't think they will ever be more than say 6 decimal places (at the very most usually 2 or 3) and the value the other way won't be in the millions (chance would be a fine thing!!) so should I be using CSng or CDbl? Is there any kind of performance degradation in using one over the other? Is there any kind of accuracy degradation in using one over the other?
I have one ASP page that has two separate FORMS, each that will update a separate SQL table. These tables are in the same DB with the same connection string for both.
The SQL statement seems to be writing correctly (when I test them) but neither of the tables updates when I try to update both of them. IF I try to update just ONE of the tables it does work correctly. Code:
i have a page that i need to load in an iframe that is on a diff domain (sub domain), i need to get the doc height of the page so that i can adjust the iframes height (so there will be no scroll bars).the problem with that is even though its on the same sever, because it is on a subdomain the browser sees it as different and restricts access to it (makes sense).
so, what we can do is have php read in the page with curl and parse it out in the iframe. that looks like <iframe src="reader.php?page=subdomain.pagename.html">but, we cannot use php on this server so i was wondering if there is an asp solution that can do the same thing (vb script). basically, i just need that asp page to grab the page on the sub domain, read it in and then output it.
I'm trying to grab a variable from a dropdown list and pass it to a paypal form, the problem is it's in two different forms.. Code:
View Replies View RelatedIs it possible to have, first n number of charectors in a text area in one
colour and the remaining in a different colour? If so how can it be done?
I need to execute different asp programs based on different values of a parameter. For example, if the user inputs ID of 1, program1 needs to be executed automatically, if user inputs ID=2, program2 needs to be executed in the background automatically. How do we do this in asp?
View Replies View RelatedI was trying to integrate a forum software to an existing site. The site is having a different database file already. What i want to do is, copy the forum tables from forum database file to the existing site database. How can I copy the tables from FileA to FileB using ASP?
View Replies View RelatedI want to send email with attachment. I have no problem if the file is located on the same server but i got error when attach file from different server. This is the code,
set mail=server.CreateObject("persits.mailsender")
mail.host="smtp.mydomain.com"
.....
'mail.addattachment "c:attach est.txt" ' no problem with this
mail.addattachment "websvrattach est.txt"
.......
mail.send
I got this error,
"Persits.MailSender.4 error '800a0007'
Logon failure: unknown user name or bad password."
when i changed the servername to static ip address also got the same error.
any idea? fyi, this user has an administrator rights to the server.
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.
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:
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
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:
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 RelatedHow will we convert the system date & time to other timezone for eg: Eastern Time zone using ASP?
View Replies View RelatedWhen 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. ?
Any some tools or sample codes drop down asp script execute time and
database connection time ?
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.
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.
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.
i am trying to get a time variable which is 30 minutes before the current time to use in a calculation.
The code I am using is:
validationtime=time-3000
response.write(time)
response.write ("<BR>")
response.write(validationtime)
but the response I get is incorrect along the lines of:
11:54:42
14/10/1891 12:05:18
What am I doing wrong, why is validation time also including a date
Can someone tell me how i can use a if loop
its related with time I want to display a registration form on 29 Jan 2007
only between 10am pacific time to 1pm pacific time
so only between 10am - 1pm pacific time the registration form should appear
i live in the central time zone
can someone tell me how i can make this happen.
I am trying to use the time function to determine whether or not it is morning, afternoon or evening.
I wrote my code and then changed the values it is comparing with to see if would work and it doesn't, it just stays on the good morning.
<% if time > 0 then %>
Good Morning <b><%= Session("sessFirstName") %></b><br><br>
<a href="logout.asp">Log Out</a>
<% end if %>
<% if time > 12 then %>
Good Afternoon <b><%= Session("sessFirstName") %></b><br><br>
<a href="logout.asp">Log Out</a>
<% end if %>
<% if time > 18 then %>
Good Evening <b><%= Session("sessFirstName") %></b><br><br>
<a href="logout.asp">Log Out</a>
<% end if %>
Do i need to put quotes around the number i am checking with?