I can't figure out why all of a sudden my variable s1 doesnt have a value once I hit the submit button. Here's my long extensive code. The important bits are the part where I response.write the s1 and s2 and s3 values, they show up on the first page but when I hit the submit button for some reason, they have no value anymore.
I have a field in my database that records the date/time of various events in the usual format of dd/mm/yyyy/. I need to display this field on my asp page in a string format.
Is there another function out there that does the opposite of the cdate function?
I have tried using the FormatDateTime to convert, but without any luck?
I set my computer Regional Setting (Control Panel - Regional and Language Options - Customize - Date) to dd/mm/yy. In my ASP page I do the following:
FormatDateTime("1/20/07",2)
and it returns 1/20/07 instead of 20/1/07. I though my setting it to 2, it will display a date using the short date format specified in your computer's regional settings, how come it is not ? How can I set the string to display a date using the computer's regional setting ? IIS is running on my machine, I am not on a network, it is just my machine.
I set my computer Regional Setting (Control Panel - Regional and Language Options - Customize - Date) to dd/mm/yy. In my ASP page I do the following:
FormatDateTime("1/20/07",2)
and it returns 1/20/07 instead of 20/1/07. I though my setting it to 2, it will display a date using the short date format specified in your computer's regional settings, how come it is not ? How can I set the string to display a date using the computer's regional setting ?
I have a simple four line bit of code in a page on my web site that gets today's date, formats it (FormatDateTime(thedate,2), and compares it to a date drawn from a database which is formatted the same way, and then if the two match, writes a message on the page.
Dates in this format work just fine: Jun 09 1975 12:00AM
However, most dates in the database are in this format:
Monday, June 09, 1975 12:00:00 AM and I get Data Type Mismatch errors from those when it tries to format the date. Evidently, it doesn't think this is a valid date format. In the database (SQL Server), the field is set up as datetime, so I wouldn't think there'd be a problem. I'm just missing something small, I think, but I'm not sure what it is.
I'm using FormatDateTime(Now) on a form to include when the form was submitted. The problem is that my time zone is 1 hour ahead of the time zone in which my server is located. Is there an easy way to increase the hour by +1?
how to convert a date in (tuesday,may 17,2005) to a date in(17/05/2005) format. is it possibleto dowith the helpof formatdatetime() function. if possible how ?
I am trying to extract the time out of a date/time but recieve the type mismatch error. The data is stored in an Oracle database as a Date/Time and I am able to extract it from the DB and display it on the screen OK, but when I try and format it like this:
Dim timeofpurchase timeofpurchase = FormatDateTime(rscustomer("time_of_purchase"), 4)
I get an error. I have had a look at documentation on the web but all of the examples only show how to format the current date and time, not how to format a variable that contains a date.
My question is, how do I force my variable, rscustomer("time_of_purchase"), to be treated as a time?? or how do I declare the variable timeofpurchase to accept a date/time??
The problem is that I can run the ASP files in the wwwroot folder when I use http://localhost from my browser or RUN (and that's for the default.asp). But the asp files do not work when I call them from a hyperlink in an HTML file.
After I moved the site to new server the mailing method stoped working , the cdo pull the email from sql database on the same server .. although it says sent to # recipients. I send a webpage (newsletter) exisit on the server "I use full url" also the registration page gives when registration the error: CDO.Message.1 error '80040218'
Unknown Error
/extra/news/reg3.asp, line 251
line 251 is objSendMail.CreateMHTMLBody "http://www.example.com/newsletter.html" I saw description of the error it sayes that I have to use full url ...but I am using it ... any Idea ...
I have a sever 2003 machine of which I am trying to host a webisite on. The webpages I uploaded has lots of .asp files that could not be open. I'd contact the website disgner and complains about it and an he blaims it on my server not supporting asp technology. My question today, is there a way to test what the problem really is?
The server gets to the end since I place a response.write in to test.
If I cut and past this into VB declare the variables as objects and lineout as string and remove the "Server." from the line when setting fs, then it works fine in VB.
The problem is that I can run the ASP files in the wwwroot folder when I use http://localhost from my browser or RUN (and that's for the default.asp). But the asp files do not work when I call them from a hyperlink in an HTML file.If I do that, all I see are the contents of the asp file.
Just set up Dedicated Server Hosting with GoDaddy. I put a very simple ASP page in the home web directory and try to load it and get a very generic error. A simple HTML file works fine. Obviously it's a permissions issue or maybe some service is not running.
New to IIS, Why will IIS 5.0 not server up my ASP web pages? I cannot even get to the help because it is an ASP Page. I get an error in IE that states "HTTP 500 Internal server error". I have looked in the configuration and cannot find anything related to ASP. What can I do to serve up ASP web pages?
Im finishing up a content management system for a client. It works fine except the way they have the pages set its nessessary for someone to open each page made and change it to the new directory.
the script copys a folder from lets say
http://fake/templets
To
http://fake/user so now we end up with something like http://fake/user/smith
On the pages in smith is there a way to make the look at their url and strip off all but the /smith part?
Or maby someone could tell me what im trying to do is called and ill be able to do a better search online.
Here are the scripts. interest is 0, but, it will not execute then clause. Why?
interest = round(rs("CURR_WORKING_INTEREST")) response.write interest if sizeworkint < 3 OR interest<>0 then CURR_WORKING_INTEREST2 = left(rs("CURR_WORKING_INTEREST"),2) + ".000000" end if ..
I just noticed my upload function isn't working since I have move the folders and files to different directory.
Now I get this error:
Error Type: Persits.Upload.1 (0x800A003D) Wrong Content-Type. Make sure you have included the attribute ENCTYPE="multipart/form-data" in your form. /foldername/UploadScript.asp, line 54
line 54 is: Upload.Save "z: ewfolder"
I have given modify, read & write permission for IUSR_MachineName account on NewFolder and given Read & Write permissions in IIS.
I also included ENCTYPE="multipart/form-data" attribute in my upload form.
I'm using IIS 5 on a win xp machine for all my testing, before I upload to our live server. I've installed the SMTP service and it's running with no errors.
Dose anyone know anything about the above set-up not supporting "CDONTS.NewMail" for sending email using ASP..?
I get the following error message: "Server object, ASP 0177 (0x800401F3) Invalid class string".
I have taken some SQL from MS Access and got it working. I have since updated the SQL in Access but cannot get the additional part working in ASP. The working SQL I have in asp is:-
strQuery = strQuery & " HAVING ((OrderQuantity-Sum(QtyShipped)>=0) AND (OrderLines.SelectAll=-1) AND (PCBForecast.HeldMarker='Scheduled'))"
I need to add the following but keep getting errors saying my SQL is incorrect.
This is the additional part which should also be on this line:-
AND ((PCBForecast.ShipETA) Between Now() And #12/30/3000#))"
or another variant I require
AND ((PCBForecast.ShipETA)=#12/31/3000#))"
What is the correct way to write both of these, as I cannot get either to work in asp, yet they work in Access.
whati have is a table that alternates colour each row so making it easier to look at the info. I also have it to check so that if the stock level is below min change from standard to red.
I also want it to check now so that if it has been ordered instead of being red green instead. i thought this would do it but i dont know how to check database to see if the check box is ticked. Tried Yes/No True/False and even both "yes" or "true" and so on. Code:
I have the following ad rotator that dosent show any errors or pictures. In my root directory I have a folder called "ads" and in the folder there are a few gif's.
In my html folder I have the file called "banner-inc.asp" which contains the following code:
I am generating my menu dynamically as a dhtml menu. however the third level 'MenuSubCat'. I cannot get it to display properly and to loop all the third level sub menus to correct second leve menu. Code:
I'm using ASP to access an MS Access database. One issue that I'm constantly having problems with is Date/Time records.
What I'd like to know is how does one work with date variables in ASP?
My current problem is this...
I have two variables, Mnth and Yr, which each hold an integer. Mnth holds between 1 and 12 ( a month ), and Yr holds the desired year (2005 for example).
With only these two variables how can I generate a full date to use in an SQL query, such as:
SELECT * From Table WHERE DateAdded>??<date value here>??