ServerVariables("URL") Return Incorrect Pagename

From Page1.asp, I use "Server.transfer" to "REDIRECT" to another asp page
(page2.asp),
in page2.asp I use Request.ServerVariables("URL") and
Request.ServerVariables("REFERER") to get the lastpage and the actual page,
this method (or property) return incorrect values: "Page1.asp" and ""

Why?

View Replies


ADVERTISEMENT

Pagename

I want to isolate an item from within a menu.inc file on the condition that a particular file is including the menu. Eg. Code:

<% if pagename = page1.asp then %>
<li> <a href="abc.asp">Option1</a></li>
<% ElseIf pagename = page2.asp then %>
<li> <a href="def.asp">Option2</a></li>
<% EndIf %>

How to I declare the pagename? I could embed something in the header of the .asp page before the menu.inc is called but not sure if that would work nor how to do it. Any ideas?

View Replies View Related

Incorrect Syntax Near ')'.

StrSql = "SELECT * FROM [" & Screen & "] WHERE (CPN="&(COORDID)&") AND (CNUM="&(CNUMQS)&")

View Replies View Related

Incorrect Syntax Near '' ?

I get this error with this sql statement in MSSQLincorrect syntax near '' ?

this is part or the sql statement:-

ORDER BY Sum([Ratings].[Rating])Count([Ratings].[RatingID]) DESC

View Replies View Related

Incorrect DB Schema?

I need from an Access database using ASP. Everything I need can be found in the database, but it is scattered among different tables. Here's the situation:

Currently many tables exist, one for each event. Each table contains participants and results. Each table is for only one venue, but many tables for the same venue may exist (different events at the same location on a different date).

I need a table of participants that automatically updates if a new participant is found.

I need a table of venues that automatically updates if a new venue is found.

I need to be able to show a particpant's results at any given venue for any given time period. Code:

View Replies View Related

Incorrect Sessionkey

Recently i noticed that there was an incorrect piece of data displayed in a
page and after investigating i noticed that it belongs to another sessionkey.

Have you experienced anything like this? i.e. when you retrieve the
sessionkey from the session variable, you get a different one?

View Replies View Related

COUNT Field Incorrect

Getting this error:

[vbs]Microsoft OLE DB Provider for ODBC Drivers error '80040e10'

[Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect

/admin/articles.asp, line 277
[/vbs]

On this line:

SQL="UPDATE article SET title='" & request.form("title") & "',topic= " & request.form("topic") & " ,article_text='" & request.form("article_text") & "' WHERE title='" & request.form("hidden") & "'"

When it is just one line coming from the article_text thing it works fine, when it is several lines it gives this COUNT error...

View Replies View Related

Incorrect Syntax Near The Word

I converted my Access databases to MS SQL. I then changed the code in my ASP pages to compensate. I wanted to check that it would work. I ran into a problem: It keeps saying:

[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'User'.

BTW this piece of code works fine in Access and only crashes when using SQL. Can't find anything relevant on the Internet. Can someone help please? Code:

View Replies View Related

Error Incorrect Syntax Near

When i insert some values float in a form made with ASP appear an error message like this:

Microsoft OLE DB Provider for SQL Server (0x80040E14)
Line 1: Incorrect syntax near ','.

sql="select id from tbl_monete where id_taglio="&idtaglio
rs1.open sql, conn

idTaglio it's the value of money that can be like 0,5 0,2,
0,1 etc etc
If i try one or two times it'll work correctly, why?
Table tbl_monete has field id_taglio that is float.

View Replies View Related

Incorrect Date Format

my problem is the FormatDateTime function it is changing the date format to MM/dd/yyyy but we need dd/MM/yyyy. We already changed the settings for the administrator user. Access the regedit tool and change the format to dd/MM/yyy on all the users on the server but we are still getting the incorrect format.

First we got for every case the format switch. For example we ask for this FormatDateTime("01/10/2003",2) Octuber 1st, 2003 an the result was "10/01/2003" January 10th, 2003
for days lower than the 12th and even if we send FormatDateTime("31/10/2003", 2) we got "10/31/2003". The server is running Windows 2000 Advanced Server with IIS 5.0

After some changes this is what is happening know

FormatDateTime("01/10/2003", 2) -- > 10/01/2003
FormatDateTime("31/10/2003", 2) -- > 31/10/2003

View Replies View Related

Incorrect Http Form Parsing

When I do testing with a test post page, everything functions properly. When
the actual customer does the post, the attribute following the "file"
attribute is concatenated to the file itself. When I execute the
HttpPostedFile.SaveAs(), the resulting file is what is sent Plus the
following form attribute. This following attribute is not in any Collection
from the Request object. Code:

View Replies View Related

IE's Default For Save As Type Incorrect

I'm using a binary stream to send down a file with ASP from the web
server. I've been having trouble with IE and getting it to recognize
my file. I've added the filename as a paramater(?filename=file.jpgw)
to handle IE's mime type mangling, but I'm still having trouble with
IE's default Save As Type being HTML.

When we send down a jpgw
(geo-jpeg) file IE wants to save it as an HTML file. I've got the
correct filename showing in the Filename box, and if I choose the All
Files option from the Save As Type drop down then the file is saved
with the correct extension. I'd like to have the All Files option
choosen by default. I know it's just a couple of clicks but we have
some noivce users that can't seem to get that.

View Replies View Related

MS Access Date Format Is Incorrect

I am storing dates in a database. WHen i come to do sql queries on the dates access is interpreting them as US format (mm/dd/yyyy). When the date is stored in the db it is in the correct uk format (dd/mm/yyyy) but when asp passes the queries to access the date format changes if the day is above 13.

For example if the date being searched is 10/2/2006 (10th feb 2006) it is searching the database for 2nd October 2006. If the i pass is 13/02/2006 (13th feb 2006) it searches it correctly.

I have tried setting the session.lcid to 2057 but this makes no difference. I read somewhere that access automatically treates dates as US format and only tries another format if the us format doesnt make sense. Is there any way around this?

View Replies View Related

Formatting Date Incorrect Code

I have two dynamic listboxes.One is a date and needs formatting.I am using DWMX and therefore used the format function within the dynamic listbox wizard.When I run the page the listbox without formatting is ok, but the date listbox returns the following:

Microsoft VBScript runtime error '800a000d'. Type Mismatch 'DoDateTime' /admincontacts.asp, line 189

Line 189 is the following:

<option value="<%=(rsAdmin.Fields.Item("Date_Added").Value)%>" <%If (Not isNull(DoDateTime((rsAdmin.Fields.Item("Date_Added").Value), 1, 4105))) Then If (CStr(rsAdmin.Fields.Item("Date_Added").Value) = CStr(DoDateTime((rsAdmin.Fields.Item("Date_Added").Value), 1, 4105))) Then Response.Write("SELECTED") : Response.Write("")%> ><%=(rsAdmin.Fields.Item("Date_Added").Value)%></option>

View Replies View Related

Configured Identity Incorrect Error

we have just migrated to a new server both with database and web server-
migrating all web projects and all databases.then we decided to rename the
new server.we tried running all web projects on the new server but it doesnt
work causing error "configured identity incorrect, check username and
password" in a certain line in the code.

i have searched for possile solutions like synchronizing identity account in
the 3 locations where this account is stored but it seems it doesnt work.
Earlier i was able to fix scheduled jobs in the database not working caused
by renaming the new server which is also the name of the database server.But
problems in the web files itself (asp) are giving me headache particularly in
code lines with "createobject."

Whats seems to be the particular problem?Can anyone point me to the right
resources to fix this prob?

View Replies View Related

ASP/mySQL Incorrect Date Format Returned

I have all of the dates I use in my tables stored as date in the YYYY/MM/DD format, with the columns set to DATE.

When I do any queries on the database (not usinf ASP) I get YYYY/MM/DD format returned.

When I do a recordset("datefield") ASP request I get D/M/YYYY returned. I have not asked anything to convert it, I have no idea where it is getting converted. It is a real pain, as I need to copy these dates through out the table, and they are getting returned in the wrong format.

View Replies View Related

XMLHTTP - Trying To Replace Incorrect Displayed Chrs With The Correct Ones

I have used xmlHTTP to grab a page from a server.. The page has the '£'
symbol in it, when it get to my site it is displayed as a '?'.. I have tryed
replace every way I know and it does not swap back..

I have tryed replace "?" , "£"
I have tryed chr(63) , chr(163)
I have tryed "?" , &pound;

nothing works, except it does change the real '?' on the page, I mean the
'?' that started out as '?' and not as '£'
if I right a bit of code to count the '£' on the page it get the total right
including the original '?' and the '?' that are supposed to be '£'.. I dont
understand it I can count them by saying if {loopchr} = chr(63) but the the
chr(63) does not work in a replace statement..

I have examend the feed from theXMLHTTP and they are or seem to be got a '?'
and yet I cant replace them

View Replies View Related

Problems Wiht .hta Page. Error 405 - Address Incorrect.

I have IIS 5.0 running on a Win2000 server. I have
scripts that I want to run on the web page. It was
suggested to me to create an .HTA page instead of .asp
or .html to make them run. The scripts now run fine, but
when the action is finished, I get the error:

The page cannot be displayed
The page you are looking for cannot be displayed because
the page address is incorrect.

HTTP 405 - Resource not allowed

after completing a task associated with a button press,
in this case a folder copy!

I'm not very familiar with .hta pages, can someone help
me with why I might be getting this error. Are .hta
pages supposed to be used with newer version of IIS
instead of 5.0

View Replies View Related

ServerVariables

Whats wrong with this line?Code:

if instr(lcase(Request.ServerVariables("HTTP_REFERER")), "OrderReceipt.asp") = 0 then
Doesn't that line translate to:
"if the user did not come from OrderReceipt.asp then..."
For some reason it will not work this way.

View Replies View Related

The ServerVariables Collection How Do You Use Them

I am doing a project and I have a form in which I am putting information inside cookies then I am to display the information in the cookies on another page. So when they click submit they goto this page and this is my code:

View Replies View Related

Request.ServerVariables

Request.ServerVariables(&quot;HTTP_REFERER&quot;)can that be spoofed?

View Replies View Related

Request.ServerVariables

I am trying to use Request.ServerVariables("SCIPT_NAME") - this is
ok normally, but when I try to use the script behind SSL - it does not
pick up the full path to where I am - eg:

https://sslrel.com/sslcert.mysite.co.uk/Default.asp

Request.ServerVariables("SCIPT_NAME") in this file, would show:
https://sslrel.com/Default.asp
Which makes all my redirects etc - not work!
Is this a known feature of SSL, or has it just been setup incorrectly?

View Replies View Related

Request.ServerVariables

Our intranet was running on a Windows NT4 server using IIS4. We have just upgraded to Windows 2000 & IIS 5 but we are now having a few problems.
A lot of our code uses Request.ServerVariables("auth_user") to get the users logon name. This used to work fine but now it doesn't work at all. We don't get an error, just a blank value.
I have searched around for help but it seems that there is no reason why it shouldn't work, which makes me think that maybe it's not the code that's the problem.

View Replies View Related

Unreliable ServerVariables?

Why does Request.ServerVariables("AUTH_USER") suddenly start returning a 0
length string? I've experience this before...it works fine for a while and
suddenly it quits returning values. Other ASP on the same server continues
to return valid values. Any ideas what is causing this?

View Replies View Related

Request.ServerVariables

I have a asp page that use the request.ServerVariables("Logon_user"). I'm used fine but then i need to restart the web server. After that request.ServerVariables("Logon_user") has no value, a null string.Why?and How can resolve this problem?

View Replies View Related

Request.ServerVariables

I have had issues with Request.ServerVariables("HTTP_REFERER") because it seems that in many cases it returns an empty string or NULL value. I use it when it works correctly to enable my scripts to be somewhat universal, not requiring hard coded values or "email an associate" scripts etc.

I just noticed that a script I'm working on does work in FireFox but not in IE. I've run the script in XPPro as well as Win2K Server to rule out it being a local setup problem. It seems that if I use Javascript to open an new window FireFox recognizes the referer but IE does not.

I realize this is probably a difference in the way IE handles the Javascript function of opening the window but as it is a Request.ServerVariable that is not being passed maybe someone else in ASP-land has run into it and knows a fix.

View Replies View Related

Request.ServerVariables

i want to know the usage of Request.ServerVariables.I'm not sure this is really a ASP question,so redirects to a more appropriate newsgroup are welcome.

I have a variable that is being passed to me through HTTP headers "Test."I am able to see this variable and its value when I use Request.ServerVariables("ALL_HTTP").

when I iterate through Request.ServerVariables using a "For Each key in Request.ServerVariables" the key of "Test" comes up.However, when I use Request.ServerVariables("Test"), the value returned to me is always empty.

View Replies View Related

Request.ServerVariables

I am trying to ensure that Request.ServerVariables can not be spoofed. Does anyone know?

View Replies View Related

Request.ServerVariables

Is there a way to find the url of a page, in html page, and not in asp page? Anything like Request.ServerVariables("URL") in jscript?

View Replies View Related

Request.ServerVariables

I want to have one of my asp pages ONLY load if someone reached it by my main page. I am new to ASP, but I think I have the theory down, I just need help with the actual commands, syntax, etc... Here is what I got so far, any suggestions?

ref=Request.ServerVariables("HTTP_REFERER")
If ref=http://website.com/main_page.htm then goto continue
Else goto end

continue()
..... run the code on this page .....

end()
Response.Write "You Have Not Reached This Page From Our Main Site"

View Replies View Related

Request.ServerVariables

I have an ASP page which collects the "logon_user" and assigns different permissions based on their "names". It is working properly under Windows 2000/XP, but Windows 9? is NOT recognizing. Could anyone tell me what I have missed? Updating new versions or changing my code?

View Replies View Related

Request.ServerVariables

I have written an application that catches the logon user's name in order to assign different levels of permissions, but the users logon under different OS (Windows versions).

the "logon_user" is recognized under Windows 2000/XP but not Windows9x. The server is under Windows 2000 which connects all kinds of workstations with different OS. Do I need to update the pathes of Windows9x or I need to use different Server variable to catch up the logon user's name?

View Replies View Related

Request.ServerVariables

I am using Request.ServerVariables("HTTP_REFERER") to refer back in some pages but on clint side some pages refered back and some show error page not found. I dont know whats wrong with code.

retstr = Request.ServerVariables("HTTP_REFERER")
if instr(1,ucase(retstr),"STEPPAGE") > 0 then
returl="wm_steppage.asp?step=2"
else
returl="wm_mainpage.asp?step=2"
end if

Response.Redirect(returl)

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved