well, the following script that i wrote using the aspSmartMail component, keeps timing out on me. i tried setting the timeout higher through both IIS and in the script itself, but all that does that it take longer for it to timeout.
i have written a few email programms using this component, so i don't think it is the component. i have just never tried sending emails with it automatically that each have certain unique fields in it. well anyways, here is the code:
I've written a page that uses a emailer component and it keeps timing out. It takes 2-3 seconds to send each mail, gets part way through the list of recipients and dies.I have tried changing the Script Timeout setting in IIS to some huge number(2147483647?).I hve tried setting Server.ScriptTimeout = 0 and Server.ScriptTimeout =2147483647. None of these make any difference. What can I do now?
I have a class that access an MS SQL database.I have another class also accesses an MS SQL database and this second class uses objects from the first class.I have a third class using the DB and objects of the second class.
Each of these classes contain all the code needed to access the database and this means much duplicated code. What I'd like to know is if there is a way to avoid the duplicated code?
I know I could write the code once,then do an #include to include the code into the class,but that still means multiple occurances of the code.
There is 600 lines of code. This page gets available rooms from RoomInfo and compares the rooms againest rooms in use from EventRoom by RoomID. RoomInfo RoomID field is text. It can contain multiple rooms (i.e. 5,6,7) based on room setup type. I had to do it this way so that users could book multiple rooms based on configuration and how many people.
Line 412 is where the time out occurs. Also if I use split on rs2(RoomID) {line 415} then I can't start at 0, I have to start on 1. Which means 1 room is not being checked. I tried to annotate the code as best as possible. The page is zipped so you can download and view it. It will bomb if you try to run it on the server it is being hosted on.
I've done this before but cannot remember how. I have a field (FIELDNAME) in a sql2k environment. I just need to know how many times an "_" appears in that field. I cannot figure it out right now.
If Now() >= tstart1 OR Now() <= tend1 Then 'if tcurrent > tstart1 or tcurrent < tend1 then strLink1 = "/images/2.jpg" else strLink1 = "/images/1.jpg" end if
When I look at the page, the image never changes. It just always displays 2.jpg and not 1.jpg. I need help ASAP!
I am trying to simply print to screen all the data in a colum from a .mdb file. Later I will do more advanced things but for now this would be good.
What I have WORKS, but takes a LONG time to retrieve the first record, if I tell it to retrieve more than one row it will time out. I was hoping to connect to the file directly and not have to create an ODBC connection. The code seems simple enough and the server is no dud (p4 2.4ghz) so do I need to setup a DSN and connect to it that way? Code:
im making the web site for a small internet radio station and would like to add the feature to show which DJs are currently on air. I would like to do this by swaping an image at certain times or even dates.
For instance
dim image
if time = 05:15:00 then image = bob else if time = 23:30:00 then image = dave end if
Something along those lines but I dont know the exact code required to do this.
Would be really greatful for any help, I think it would be a nice feature for our listeners.
I'm currently developing on IIS 5, ASP 3 and MySQL 4.1 using the latest ODBC driver from MySQL.
Any time field I have return from the database is returned as the current date. I've tried every table which has a date, created tables which soley keep records on the date.
I've submitted the date from MySQL Query browser using CURRENT_TIME and from an ASP page. Both submit fine.
I've returned the record using a Recordset to move through each and filled an array using GetRows().
My interest is to guarantee that my users never need to logon again. Can’t put a session.Timeout to high because of memory on server. So how can I get the session refreshed before session times out?
I'm sure you've seen them all over the place. Before downloading a file, it tells you the size of the file and the approximate download timedepending on your connection.
I have found a lot of javascript calculators out there where you input the size of the file and it calculates the time you need. These provide the end result I need, but 1) I hate javascript with a passion and 2) I want the download times to be displayed automatically when you select a file to download.
As a last resort, I can spend some time re-writing it for ASP, pulling the file info directly from the file in question (which would be a variable) rather than requiring an input of the size; but I'm wondering if anyone has an ASP version already done. Save me some time and hassle that way.
I am creating a news page for a fun website just to learn, it has a simple html form that lets me post new news items to a MSSQL database.
The thing I am trying to do now is have the loop only run about 5 times, so that it displays only the last 5 news items from the database, I will then create an archive page which will display them all.
I have a book that I read and I found the for..next statement and I t would work nicely from what I am reading,
I ported a script I made over to SQL Server 2k from Access and went from queries that took a tenth of a second to up to 30 seconds! Typically they are between 5-10 seconds.
All I can think of is I screwed something up in the connection procedure, and here that is:
I'm almost finished creating a simple events calendar that will allow users to book rooms and see at a glance, which rooms are booked, and at what times. Unfortunately I've hit a brick wall with the final stages of development.
I've created a screen shot of what I would like to display on the screen (see below). I can't for the life of me figure out how I'm going draw each cell and populate it with the database information (should it require populating).
I have a project where I want an email to be sent at a certain time, say 10 PM every night if there are new hits to my site. The email will be only going to my email address. does any one know of a way to do this?
I have an html page with standard contact us type form. This when posted goes to an asp page which stores the data and then sends an email to me. It then redirects back to the original email form with a message thanking the user for the contact.
The problem is I am getting multiple spoof emails which are being generated form the asp page. Some one is accessing and then just refershing the page so it generates numerous emails.
Is there a way of either hiding the asp page in the original HTML form or checking that the page has been called by the html form rather than just refreshed.
<% RMABarCode = Session("rmaID") IF Len(RMABarCode) Then response.write "<img src='barcode.asp?code=" & RMABarCode & "&height=25&width=1&mode=code39'>" End If %>
But I need to be able to display that barcode multiple times.
Say the user needs 4 displayed, he/she will enter the number and it shows that many.
I am using the XMLHTTP object to request a page from within another ASP page. For my scenario, the two pages should operate in the same session. However, when I request the second page, a new session is created. This makes sense since it is coming from a different client (the XMLHTTP object as opposed to my browser).
I've tried to pass the ASPSESSIONID cookie along with the XMLHTTP post, but every time I pass the valid cookie, the XMLHTTP request times out.
Has anyone experienced anything similar to this? Is what I am trying to accomplish even possible?
I am using a javascript function to draw a graph on my page, which all works fine. One of the parameters that I pass to the javascript function is the maximum value of the x and y axes.
I have encountered a problem, in that if I hardcode the maximum value of the y axis to 1000, and the maximum value that I am plotting is very low, eg 10, the bar is so small it can hardly be seen. It would be better in this case if the maximum y value was something like 15 to ensure that the bar went almost to the top of the grid.
The code which is doing the count is a simple loop which is looping through each of the months in the financial year counting the number of meetins which have occured in each month. Code:
Our store software currently displays the total amount saved (the list price minus our price) for every product using the code below:
'Calculate "YouSave" If Product_ListPrice > 0 Then Product_YouSave = Product_ListPrice - Product_LowestPrice End If
I, however, would like to also diplay the percentage saved next to the amount saved. I tried using the code below but it won't work. Can someone help me out?
'Calculate "YouSavePercent" If Product_ListPrice > 0 Then Product_YouSavePercent = ((1 - (Product_LowestPrice / Product_ListPrice) * 100) End If
I am building a database that users will update. I have a table named "products". Every product has a shelf life of 3 years and expires exactely at the end of the 3rd year. Here is my table: Productid ---- int productName ---- varchar manufacture_date ----- datetime default (getdate) Expire_date ----- datetime
What I want is this, whenever a product is entered, the defualt date is the date the entry was made. (I am using the "getdate") to automatically grab this. BUT I also want the "Expire_date" field automatically calculated and then filled in. That is, a user enters a product "manufacture_date" as 05/22/2003, Then I want the expire field to be filled with 05/22/2006. My preference is to handle this on the DB site and not ASP.
How to take values from a query and add them together to get totals.The current setup I have:
User selects home they want and clicks on link that passes variable (model home #) that takes them to page 2.
Value in query string is taken and used to bring information about home such as base price amongst other things.
What I would like to do is start with home base price and then call upon options stored in database(each option has their own price)and user can go down a list and select the options(via checkboxes)they want and then at bottom they have a total button that totals base price of home and each option they chose.
i'm getting from querystring *, /, - or + like ...&calculate=* now i want to use this in the calculation like var1 calculate var2 . how do i get it to understand that it's not a string but an actual calculation?
I have a table named tblsheets (access 2000), There are 4 fields I'm concerned about. Size, Material Grade, Module and Weight.
I wanted to be able to give the user the ability to calculate the sum of weight according to a specific material grade and specific size in a specific module.
How would I go about creating an asp script that will allow me to do so? There has to be an option in which the user can select from a combo box the module, and then select material grade and size, also from a combobox if possible (getting the data from tblsheets).