| Check Existence of File using VBScript in ASP page |
|
 |
Index ‹ asp
|
- Previous
- 2
- Relating Session Key to Session IDWhat is it you are trying to do, specifically?
>-----Original Message-----
>Let me start by defining my terms. By Session Key, I
mean the value that
>IIS stores in the cookie at the beginning of each new
session. This value
>is reused until either the server is rebooted or the user
closes the browser
>window and opens a new instance of their browser. This
value can be
>obtained in ASP by using Request.ServerVariables
("HTTP_COOKIE") and is
>generally ASPSESSIONIDxxxxxx=xxxxxxxxxxxxxxxxxx. By
Session ID I mean the
>numeric value that the user is given for each session.
This number is reset
>when the session timesout. This value can be obtained in
ASP by using
>Session.SessionID.
>
>Is there any way to match these values for a given
session, or keep track of
>the Session ID's used for a given Session Key? This is a
new area for me so
>I apologize if this is a dumb question, or if this is the
wrong place to ask
>it. As I understand it, the Session Key is used whenever
a request is made
>to access Session specific information. If so, what
relevance does the
>Session ID have other than being client specific for the
duration of the
>session? To state my problem a different way, I need to
be able to retreive
>a Session ID and make a match to what the Session Key
is. I realize that I
>can just retreive these two values in the manner I
described above and store
>them in a DB table, but I'm wondering if there is some
intrinsic
>relationship between the two in IIS already? The end
result is to better
>track information web sessions and the data that was
submitted to the
>database during those sessions.
>
>I apologize if this is not the correct place to ask this
question and I give
>my thanks in advance for any help that can be given.
>
>Tim
>
>
>
>.
>
- 2
- Riddle me this error ADODB.Recordset (0x800A0E7A)This is a weird error, it seems if we reboot the web server, which is also
the SQL server, I get this error,
ADODB.Recordset (0x800A0E7A)
Provider cannot be found. It may not be properly installed.
/swvtc/CliDrAppts/detailDrAppts.asp, line 31
Now line 31 of my asp page is the connection string, so there is nothing
that I can do to get my apps working again.
BUT! (it gets weird here)
If I get the network admin to navigate to this page, it shows it for them
and then after that it works like a charm. Any ideas what could be going
on?
Thanks,
Drew
- 2
- Quick Question Need HelpHi,
I wrote an application that generates reports. It then presents a page where
I click a button [javascript:print()] to open the print page. However, I
have a fixed printer and would like to know how to print to the default
printer without me clicking anything. So the page will just load up and
print. Or when I click a button. I just don't want the select printer screen
to pop up. Much similar to clicking the print button on top of the address
bar in Internet Explorer.
Thanks,
Eric
- 4
- extend web formI have an asp page with an server side panel at the end
of the page this panel shows some results according to
these results the form is enlarged so scrollbars appear.
how could i extend the web form as to show the results
when the form is submitted
- 4
- Stream SpreadsheetML (XML for Excel) fileOk, I'm stumped on something that really shouldn't be this hard. I've
created some cool code to transform a dataset via XSLT into SpreadsheetML
(XML for Excel) and I'm storing the physical file on a file server. Now... I
currently provide a hyperlink to view/save the file, but this won't work
outside the network. So, I've been working on making this
hyperlink/linkbutton/button/whatever stream the file back to the user. How
in the name of Zeus's butthole do I do this?
So, in simpler terms; how do I take a physical file and stream the sucker
back? Ideally, I'd like this to work just like it does now with the physical
link to the file. Click the link, it prompts you to save/open/cancel.
Clicking Open pops up Excel and looky-looky, you see the file.
Heeeeeeeellllllllpppp. AAaaaaaaaaaaaaaarrrrggggghhhh.
- 5
- MI5 Persecution: Watch Out, Forger About 27/9/95 (4033)From: email***@***.com (Ray Dunn)
Newsgroups: uk.misc,soc.culture.british
Subject: Re: An apology from Mike Corley
Date: Wed Sep 27 14:20:36 1995
In referenced article, David Wooding says...
>Well, Mike Corley might or might not have written the apologies, but I
>think not. I thought the following line both witty and imaginative.
>
>>>It was the razor blades stuffed down between the keys that told me.
Corley himself denies posting this "apology", but I'm impressed if it
is a forgery.
Here's the header of my received email. It looks very genuine except
for the fact that postings to newsgroups are directed through demon's
mail to news gateway, which is strange.
Also the message id is <email***@***.com> which seems
to be in a different format from previous Corley postings, e.g.
<email***@***.com
The mail seems to have been received directly from mail.torfree.net.
One way of telling for sure would be if anyone on the recipient list
contacted torfree, but did not publish any complaints on the newsgroups
- he would not have had access to their address in that case.
>Received: from SpoolDir by ULTIMATE (Mercury 1.20); 26 Sep 95 12:00:14
+0500
>Return-path: <email***@***.com>
>Received: from mail.torfree.net by smtp.ultimate-tech.com (Mercury
1.20);
> 26 Sep 95 12:00:04 +0500
>Received: from bloor.torfree.net ([199.71.188.18]) by mail.torfree.net
> (/\==/\ Smail3.1.28.1 #28.6; 16-jun-94)
> via sendmail with smtp id <email***@***.com>
> for <email***@***.com>; Tue, 26 Sep 95 11:31 EDT
>Received: from torfree.net by bloor.torfree.net with smtp
> (Smail3.1.28.1 #6) id m0sxbx2-000JEeC; Tue, 26 Sep 95 11:29 EDT
>Message-Id: <email***@***.com>
>Apparently-To: email***@***.com, email***@***.com,
> email***@***.com, email***@***.com,
> email***@***.com, email***@***.com, >
email***@***.com,
> email***@***.com, email***@***.com,
> email***@***.com, email***@***.com,
> email***@***.com, email***@***.com,
> email***@***.com, email***@***.com,
> email***@***.com, email***@***.com,
> email***@***.com,
> email***@***.com,
> email***@***.com,
> email***@***.com,
> email***@***.com
>Newsgroups: uk.misc, uk.media, soc.culture.british,
soc.culture.canada, uk.legal, alt.conspiracy
>From: email***@***.com (Mike Corley)
>Subject: Oops! Sorry!
>Organization: Toronto Free-Net
>X-Newsreader: TIN [version 1.2 PL2]
>Date: Thu, 26 Sep 1995 01:23:45 GMT
>Lines: 27
>X-PMFLAGS: 33554560
4033
- 5
- Need help in formulating a HREF linkHi,
I am trying to get a printer.asp page linked back to a main report page.
However, in the final url, the grantid is missing which should not be, if the
href statement is correct. I checked the correct value of grantid via
response.write and I can see the correct value. However, the href statement
cannot pick the value properly. Any help is appreciated. Thanks.
CODE:
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY text = "red">
<center>
<b>
Printable.asp page <br>
This page is under construction.<br>
<%
GrantID = Session("sess_GrantID")
Response.Write "<br>"
Response.Write GrantID & "<br>"
Response.Write "<A HREF=""mainreportagain1.asp?GrantID="" & GrantID>Click to
return to main report page</A>"
%>
</b>
</center>
</BODY>
</HTML>
THE url of the clicked to e is:
http://localhost/gwisbrandnewready3/mainreportagain1.asp?GrantID=
while the correct url of the clicked to page will be:
http://localhost/gwisbrandnewready3/mainreportagain1.asp?GrantID=5718
- 7
- Character conversion in ASPI have a generic ASP page that creates MD5 hashkey, gets included in more
than 1 other ASP page. Other including ASP pages seem to be setting charset
meta tag to various non-ascii charsets. I found how to convert in ASP.NET,
but not ASP? The same string "email***@***.com" generates different keys in
different charsets... I tried the "@CODEPAGE=1252" directive at the top
of the hash asp page, no luck.
Thanks in advance!
- 7
- Open a PDF file inside browser?I have a asp web page with a link point to a file which depend on the
database information.
Sometime is a picture file sometime a word and some time is a PDF file.
For picture file, when user click the link, it will open the picture inside
the IE browser.
Now here is my problem:
On some of the computers, for PDF file only, it opens outside of the IE
browser. Like the Acrobat program is not in the browser. With the same code,
some computer works good.
But I want to force it open inside the browser.
Does anyone knows why and how to fix it?
Thanks in advance.
Lin
- 9
- IIS session and IE7I have asp and asp.net web application. When I run it in IE7 in first tab it
starts a new session. When I open second tab and browse to the same site the
new session is not started (infact I need to have new session there).
Whereas, 2 IE instances generate 2 unique sessions. Only issue is with IE
tabs. Firefox also has similar things but lets not talk about firefox here.
I am more concerned with IE only.
Any tips/tricks/missing knowledge.
[sorry if I have posted this to the wrong audiences]
- 9
- XP Home won't open a remote page that XP Pro willHi all,
I've got a really wierd problem here.
When I access a remote web page that adds information to a database on a PC
running
XP Pro it works as it should.
When I access the same page from a PC running XP Home I get an ' Internal
server error - page cannot be displayed' message.
I've tried it on 5 PC's running XP Pro & 5 running XP Home - same result.
ASP code is:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
dim conn2,sql2
set conn2 = server.createobject ("ADODB.connection")
conn2.Provider="Microsoft.Jet.OLEDB.4.0"
conn2.Open(Server.Mappath("dat48372.mdb"))
sql2="INSERT INTO Tracker (qReferer, qLocAdd, qRemAdd, qUAgent)"
sql2=sql2 & " VALUES "
sql2=sql2 & "('" & request.servervariables("HTTP_REFERER") & "',"
sql2=sql2 & "'" & request.servervariables("LOCAL_ADDR") & "',"
sql2=sql2 & "'" & request.servervariables("REMOTE_ADDR") & "',"
sql2=sql2 & "'" & request.servervariables("HTTP_USER_AGENT") & "')"
conn2.Execute sql2
conn2.close
set conn2 = Nothing
%>
Can anyone help pls. page is http://wavestation.biz/scotty
Thanks in advance
xool
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.501 / Virus Database: 299 - Release Date: 14/07/2003
- 13
- 13
- 14
- FileSystemObject and aspHey gang. Is there a way to use FileSystemObject to loop through a folder,
and show the names of all the child folders within that folder? I have
searched on this and came up with empty pockets.
Someone?? anyone??
thanks
Jeff
- 16
- Retrieving a Web Page with XMLHTTPI would like to retrieve a remote URL using the XMLHTTP object.
However, I only want to "display" a certain portion of the page. How
can I go about doing this?
Thank you!
|
| Author |
Message |
me

|
Posted: 2005-9-23 6:56:00 |
Top |
asp, Check Existence of File using VBScript in ASP page
Is there a way to check if a file exist using VBScript in an ASP page.
So the code might go something like this:
If Exists("C:\Junk\1.txt") then
Do something
Else
Do something else
End If
Thx,
Scott Buerkley
--
The Source For Premium Newsgroup Access
Great Speed, Great Retention
1 GB/Day for only $8.95
|
| |
|
| |
 |
Slim

|
Posted: 2005-9-23 8:33:00 |
Top |
asp >> Check Existence of File using VBScript in ASP page
"Scott" <email***@***.com> wrote in message
news:email***@***.com...
> Is there a way to check if a file exist using VBScript in an ASP page.
> So the code might go something like this:
>
> If Exists("C:\Junk\1.txt") then
> Do something
> Else
> Do something else
> End If
>
> Thx,
> Scott Buerkley
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/jsmthfileexists.asp
>
> --
> The Source For Premium Newsgroup Access
> Great Speed, Great Retention
> 1 GB/Day for only $8.95
|
| |
|
| |
 |
me

|
Posted: 2005-9-23 20:17:00 |
Top |
asp >> Check Existence of File using VBScript in ASP page
On Fri, 23 Sep 2005 08:33:36 +0800, "Slim" <me@home> wrote:
Thank You!! This worked.
Thx,
Scott Buerkley
>
>"Scott" <email***@***.com> wrote in message
>news:email***@***.com...
>> Is there a way to check if a file exist using VBScript in an ASP page.
>> So the code might go something like this:
>>
>> If Exists("C:\Junk\1.txt") then
>> Do something
>> Else
>> Do something else
>> End If
>>
>> Thx,
>> Scott Buerkley
>
>
>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/jsmthfileexists.asp
>
>
>
>>
>> --
>> The Source For Premium Newsgroup Access
>> Great Speed, Great Retention
>> 1 GB/Day for only $8.95
>
>
--
The Source For Premium Newsgroup Access
Great Speed, Great Retention
1 GB/Day for only $8.95
|
| |
|
| |
 |
| |
 |
Index ‹ asp |
- Next
- 1
- Block "HEAD" method?Just wondering if anyone knows of a way to block the HEAD method from being
used outside of the server? (i.e. by a program, or external website).
Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk
Keeping it FREE!
Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
- 2
- Using Safe Arrays in ASPsI need to find some way of using Safe Arrays within an ASP without using an
external application.
Here is the senerio:
I have one ASP and sends XML data to another ASP which returns Data from a
Database. Pretty straight forward, however the XML string is quite long and
I would like to pass it to the second ASP via a POST rather then a GET.
Problem is that the only way to retrieve the data is to use the BinaryRead
method of the Request object. This data is only text, but I can not find
any reference of how to use the data once I have retrieved it?!?!
So my question is how do I access the Data from the REQUEST.BINARYREAD?
Or, how else do I read the POSTed data?
Thanks
Bob Brandt
- 3
- ASPPop3 (Server Objects) fails to return email details (Revisited)I hate to revisit this old issue, but I have a question about how mail
servers assign email IDs. This script attempts to retrieve mail with
ID 1 to n with n being the number of messages on the server for the
account.
Can anyone tell me how Email IDs are assigned? Is it likely that the
first message isn't number 1 and therefore my script returns nothing?
If this is the case, is it possible to determine which email IDs are in
the mailbox so they can be retrieved?
If it makes a difference, the account in question is on a shared server
and the script does not produce any errors when it runs.
- 4
- Numbers to wordsHello
Does any one know of any utility in asp which would convert the numbers
entered in to words - eg 20 would convert to twenty.
Thanks
- 5
- ASP Records & Repeat RegionsHello,
I want to create a table with records from a database but I want the
background colour of each row to be different. For example:
Record 1 - blue background
Record 2 - white background
Record 3 - blue background
Record 4 - white background
Record 5 - blue background
Record 6 - white background.... etc.....
I am able to do repeating regions but I do not know how (or if its
possible?!) to change the background colour of the row afterwards. On
the other hand I can repeat two rows that have the colours already set
but I cannot get the second record to appear in the second row before
it is repeated. Again I have no idea if it is actually possible?!
If anyone can help it will be greatly appreaciated.
Regards, Gareth
- 6
- Refreshing a href variable using OnChange of a select listHi all,
I'm trying to use the following script:
<script language="javaScript">
function setrepto(){
document.aForm.repno.value =
document.aForm.rep.options[document.aForm.rep.selectedIndex].value;
}
</script>
On the following form (Partly in asp):
<form name="aForm">
<select name="rep" OnChange="setrepto();">
<option value="ALL">Select a Rep Here</option>
<%
while not slsrs.eof
repno = slsrs("SLS#")
repname = slsrs("SLSNAM")%>
<option value="<%=repno%>"><%=repname%></option>
<%slsrs.movenext
wend%>
</select>
</form>
To change the value of 'repno' in the following href, which is on the
same page:
<a href="nextpage.asp?rep=<%=repno%>">Click here</a>
So basically, as a user changes the selection, the value of repno in
the above href should change.
Can't get it to work. Can anyone help?
TIA,
Paul
- 7
- Editing Field Property Through ASP !Look up ALTER TABLE in Access online help.
Cheers
Ken
"Lovely Angel For You" <email***@***.com> wrote in message
news:email***@***.com...
: Dear Friends
: Hope you all doing great.
:
: I asking this question second time. This time please help me to solve
: my problem.
:
: I have a database (Access 2000) uploaded to webserver. I need to edit
: a field property in one of the tables. I cannot download and then
: again upload the database as this would be very time consuming. So is
: there any way I can edit the field property of a certain field in a
: table.
- 8
- asp.net vb6 AdvAPIHi, I have a vb6 dll that would make use of the AdvAPI. Then I have a asp.net
project that would call this vb6 dll, but the returned value is not correct.
From what I checked, the vb6 dll is called, but it fails on AdvAPI. What is
the problem and how to fix it. This vb6 dll would works well when I calls it
thru windows application.
I have very little knowledge on web development, so I don't know how to
debug it, or what might cause it, thanks for the help.
Eugene
- 9
- asp file with Report in Word templateHi all,
Can i create a template in Word and just out in all
the information from database using ASP?
I have to do :
1.Collect the information from the ASP froms into database
2.The information what i collected should be inserted into
an word template.
any help will be appreciated
thank in advance
with Luv
Rajneesh
- 10
- String Parsing Query <SELECT name="txtServices" size="3" multiple>
<OPTION value="Massage">Massage</OPTION>
<OPTION value="Facials">Facials</OPTION>
<OPTION value="Wet & Dry Body Treatments">Wet & Dry Body
Treatments</OPTION>
<OPTION value="Medical Treatments">Medical Treatments</OPTION>
<OPTION value="Nails, Pedicures, Manicures">Nails, Pedicures,
Manicures</OPTION>
<OPTION value="Hair">Hair</OPTION>
<OPTION value="Pools">Pools</OPTION>
<OPTION value="Waxing">Waxing</OPTION>
<OPTION value="Make-up">Make-up</OPTION>
<OPTION value="Aromatherapy">Aromatherapy</OPTION>
<OPTION value="Specialties">Specialties</OPTION>
<OPTION value="Tinting">Tinting</OPTION>
<OPTION value="Fitness & Nutritional Counselling">Fitness &
Nutritional Counselling</OPTION>
</SELECT></TD>
Since this is a muliple select box the values are passed to the search
string comma delimited IE: facials, hair, pools etc
Can anyone tell me how to parse this string and then build a select
statement whereby I can search for Facials OR Hair OR pools
I've been searching all over and can't find anything that does just this.
Thanks in advance
- 11
- enclosing csv fields in quotesHi
I am trying to create a CSV file with some fields in double quotes ("). I am
not having any luck.
This is what I want;
"8684","COSTING","000010001","REG",X4,15.00, ,14,0,14,9,6
I am not sure how to create the double quotes. The ASP is this;
strTemp = rsCAExport.Fields("Employer Number") & "," & _
rsCAExport.Fields("Import Type ID") & "," & _
rsCAExport.Fields("Employee Number") & "," & _
rsCAExport.Fields("Cheque Type") & "," & _
rsCAExport.Fields("Code") & "," & _
rsCAExport.Fields("Value") & "," & _
rsCAExport.Fields("Distribution") & "," & _
rsCAExport.Fields("Rate") & "," & _
rsCAExport.Fields("Premium") & "," & _
rsCAExport.Fields("Day") & "," & _
rsCAExport.Fields("Pay Period") & "," & _
rsCAExport.Fields("Batch ID") & VBCrLf
Can anyone help?
Thanks
Tim Cowan
- 12
- Reg expHello
I was wondering if you guys could help me with a pattern.
Im trying to remove every single letter word in a sentence [a-z] or [0-1]
and remove duplicate spaces in the result if any.
"a car is good" = "car is good"
"drink a beer" = "drink beer"
TIA
/Lasse
- 13
- IIS6 doesn't include client side scriptI have several pages where we inlcude client side script using the following
syntax.
<script type="text/vbscript" language="VBScript"
src="<%=Session("BaseURL")%>library/common.vs"></script>
where the BaseUrl = http://localhost/ (for testing) and
http://www.blablabla.com/ for live.This works in IIS4 and IIS5 but not in
IIS6. The include is CLIENT SIDE script
David
- 14
- Cant get ADO running under IISI have a new W2K3 box running IIS
Is there anything I have to install in order to use ADO?
When I perform the following
Set Connection = Server.CreateObject("ADODB.Connection")
Connection.Open "mydsn"
I get the error
Provider error '80004005'
Unspecified error
- 15
- javascript or...Hi
I want to update my database when somebody clicks on my link. I'm not sure
what the best approach is or how to do it in javascript. I have tried some
different things but they don't seem to work.
This would be my call
<a href="#" onClick="Add_OpenWindow(URL, 'Value to update in database')">
I still want my link to open up in a new window which it does. But how to
add the value to my database without calling vbscript... Or can I.
Thanks
Kez
|
|
|