|
How would I be able to do something in ASP along the lines of:
Application("s") = this Session;
and then later on:
if (Session(Application("s")) != null) ...
I want to be able to check periodically if a session has ended and unfortunately I am not able to access the Session_OnEnd function.
If this was C++ it would be easy, I'd just store a pointer to the Session object in an array in the Application object and then check if it was still valid. But as you know with ASP I cannot store a Session object in the Application object, at least not as far as I can tell. Is there some way to determine if a session exists from an abstracted level, i.e. something like "doesSessionExist(1298347809)" where 1298347809 is the session ID? There must be a way to do this? I'm all dried up idea wise - am I approaching this from the wrong perspective?
|
|
|
|
|
David Wulff wrote:
There must be a way to do this?
I asked the office and the first response was:
If Len(Session("wally")) > 0 Then
exists
else
doesnt exist
end if
Have not tried or ever done it that way. I like ASP.NET and C#. IT is all an ojbect so checking for null works well. Damned ASP.
Paul Watson Bluegrass Cape Town, South Africa
Roger Wright wrote:
Using a feather is kinky; using the whole chicken is perverted!
|
|
|
|
|
I made a cameo in some code!!!
Or is this just of an inflated ego?
|
|
|
|
|
|
Id say that instead of checking for Len...just check if its empty or not..
If Session("wally") <> "" then
exist
else
doesnt exist
end if
GET TO KNOW ME
|
|
|
|
|
Hi everyone.
I have a problem...
I get an error when I want to insert an object into a table. I use asp VBScript and an access database.
The query is as follows: (it works i checked it)
strSql = "INSERT INTO sessionLog (userName, loginTime, sessionID, sessionActive) VALUES('"& strUser &"', '"& Date &" "& Time &"', " & Session.SessionID &", true)"
The recordset opens as follows:
rstSession.LockType = adLockOptimistic
rstSession.CursorType = adOpenDynamic
rstSession.Open strSql, cnnAcc
The error I get is:
Microsoft JET Database Engine (0x80004005)
The operation must use an updatable query(question)
Also tried to use the connection.Execute strSql, rowsAffected same error however.
Anyone?
/Mike
|
|
|
|
|
Ensure that you have write permission on the Access MDB file.
Also, here's the MS help KB[^].
Cheers,
Simon
"The day I swan around in expensive suits is the day I hope someone puts a bullet in my head.", Chris Carter.
animation mechanics in SVG
|
|
|
|
|
You should have read/write permission for the directory where the database is placed!!
I was born intelligent Education ruined me!.
|
|
|
|
|
Hi,
For a long time I have been working around with my C coding in unix. And I didnt really need a IDE for that. I just escaped with the 'emacs'. And for the code maintenance purpose, I prefered the 'diff'. It all went fine until I was pushed to this ASP stuff.
Huh!! I now work around with the ASP/HTML/jscript files. And OMG, I use the notepad. What do I do to see the difference between my yesterdays file and now?? Open the cmd and make a diff there. I am tired of that now... Can u people suggest me a 'good' IDE for my HTML/ASP/jscript files, to show the diffs atleast? I dont need a complier there A preview would be better!!
I was born intelligent Education ruined me!.
|
|
|
|
|
Maybe try VIM[^].
I'm sure they have a plugin for doing windiffs.
At the very least you'll get syntax highlighting.
Cheers,
Simon
"The day I swan around in expensive suits is the day I hope someone puts a bullet in my head.", Chris Carter.
animation mechanics in SVG
|
|
|
|
|
Thanks.... it looks fine!
I was born intelligent Education ruined me!.
|
|
|
|
|
http://www.textpad.com/[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
looks cool and good. But lotsa configurations...
I was born intelligent Education ruined me!.
|
|
|
|
|
|
Thanks ... will give it a try
I was born intelligent Education ruined me!.
|
|
|
|
|
Hey....
The site html-kit.com isnt going through?? Is that the right address?? I guess the right address should have been http://www.chami.com/html-kit/
I was born intelligent Education ruined me!.
|
|
|
|
|
|
Hi all,
I am using mySQL on winXP PE. After installing mySQL, I created C:\Inetpub\wwwroot
With the help of ODBC I configured "Shop".
In my ASP script I get the following error when I try to call:
DBConn.open ("Shop")
Error:
[Microsoft][ODBC Driver Manager] Data source is not found and no standard drive routine is
given.
/shop/init.asp, line 11
where "shop" is a catalogu as below:
C:\Inetpub\wwwroot\shop\
What can be the possible reason?
I have spent a lot of time without any result. Hope someone can help me.
thanks in advance
regards
/rsasalm
|
|
|
|
|
Hi,
I've read on this site how to retrieve some email from a POP3 server, but I need to build a program (in C++\C#\Java) that can get email from an existing hotmail account. So there won't be a POP3 server to communicate with.
Please help me by mailing some suggestions or solutions to boudewijnector@planet.nl
Thank you!
|
|
|
|
|
Check this out:
Source Forge Clickety[^]
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
|
|
|
|
|
For eager web-site developers, there's this program which I wrote to let others know what I'm listening to. You need Windows Media Player 9 and a web and/or ftp server...
http://www.wmplugins.com/ItemDetail.aspx?ItemID=179
|
|
|
|
|
I managed to upload a file, but I need to rename this file (image) with the recordset's asigned ID.
Process:
1a.- Generate ID
1b.- Capture Data
1c.- Select Image to Upload
1d.- Send
2a.- Record all the info in the Database
2b.- Rename the uploaded image with the recordsets ID
ca- Load Page.
cb.- Substitute the following:
">
thanks for your help,
Jon
GET TO KNOW ME
|
|
|
|
|
|
can anyone speed me up here so I can avoid spending too much time digging up too much?
QUESTION 1:
I know in ASP.NET you can load data from SQL server into a DataSet, then have the dataset to format the data in XML. You can pre-load a static xsd file from disk to validate your XML doc.
Here's a code snippet from learnxmlws.com:
Dim schemaCache As MSXML2.XMLSchemaCache40
Set schemaCache = New MSXML2.XMLSchemaCache40
schemaCache.Add "", "C:\myschema.xsd"
Dim doc As MSXML2.DOMDocument40
Set doc = New MSXML2.DOMDocument40
set doc.schemas = schemaCache
Question is, how can you then load a static xsl schema from disk and load the XML to screen? Can you quote the APIs and some URL which I can read up on?
QUESTION 2:
some pages are already written in ASP, can I have a form written in ASP that POST/GET parameters to an aspx page? Vice Versa? From aspx to asp? I'm rather new to ASP.NET and have only tried out a few things.
QUESTION 3:
How can you do what I mentioned in QUESTION 1 but in VBScript/classical ASP?
Thanks a bunch.
norm
|
|
|
|
|
I used to have a small code snippet (I believe it was javascript) that allowed me to have a page pull up a different image each time the page was loaded. The images were kept in a specified folder and each time the page was refreshed or revisited a different photo would show up. I have searched for days and can't find anything anywhere!! Does anyone have this code or something similar?
I am looking because I have a small client who has photos of office staff and drivers from 3 offices that all need to be displayed but they are not worthy of their own page.
Help!
|
|
|
|