Object Stored In Session
I created a class ImageEdit to help me get more from an image component i'm using. The class has few private properties and public methods. One of the methods is the Load() method which requires 1 parameter: the complete path to the image.
As long as i have the class definition included in the page and create and instance of the class on a page and use the properties and methods, everything is fine. The problem arises when i try to set this instance in a session variable like so:
set session("imageedit") = new ImageEdit
And this also seems to work fine as long as i'm still executing the code on the same page the new object has been created on. However... i can not get this object to work on any other page. Weather i use this: Code:
View Replies
ADVERTISEMENT
I'll admit my ASP skills are very rusty, and come seeking help.
I'm currently using a dictionary object to store a multi-dimensional array.
I want to pass this dictionary object to an object, which holds an array of dictionary objects.
However I'm finding that the array is not getting set, thus I'm having great issue with dynamically resizing the object's property for every new dictionary object I'm adding.
View Replies
View Related
I have been fighting with this for days now, and I can't seem to get it to work. Images are stored in an Access db as an OLE object. I have the following on my page Code:
View Replies
View Related
I have the following stored procedure:
[code....]
I'm getting the error "operation is not allowed when the object is closed" on the following line:
<% If Not rsAlloAmts.EOF Or Not rsAlloAmts.BOF Then %>
I haven't dealt we this particular type of situation and not sure how I can bind the necessary values to the page based on what is passed in to the procedure. I'm not sure how to handle this type of logic on the page?
View Replies
View Related
There are two cookie types:
1) session cookie.
2) persistent cookie is the same as tracking cookie?
Is that correct?
For windows machine, the files in C:Documents and SettingsAdministratorCookies
are all persistent cookie, it doesn't have session cookie?
How session cookies are stored? Session cookie should expire once the browser is closed.
View Replies
View Related
i built an adminisrator page that needs to be under SSL,when its under SSL i cant use the Session object so i cant really know if he is an administrator.
i can make a unique password to the page but the problem is its a page that reloaded often to show different things & then each time he will need to enter the password, a little bit annowing.
View Replies
View Related
I have a page with about 90 input fields all on one page, I would like to split it up into about 5 pages, with each one a next button.
I would like to know, must I put each value into a hidden field to reference on the last page, or should I use session objects?
Can I use a session like this?
session("property").Bathrooms = 2
View Replies
View Related
I am working on a web store that has been having some problem with memory leakage; so I am working thought my code and I am just following up on an issue I have discovered I don’t know the answer to. I am self taught so if my question looks stupid please bear with me.
Set objMyObject = Server.CreateObject(Name)
Do I need to use the objMyObject.Close? before the Set objMyObject = Nothing is called? Could someone please explain or expand as to when and why I use the .Close call.
View Replies
View Related
This is a strange thing. My Session object is expiring when the page is refreshed.This is happening in just one partiular page. Rest of the pages are working fine
View Replies
View Related
I have a class declared as this:
Class CShoppingCart
dim sTableName
Public Property Let TableName (sNewTableName)
if sNewTableName <> "" Then
sTableName = sNewTableName
end if
End Property
Public Property Get TableName ()
TableName = sTableName
End property
.....
Then in a login page i do this
Set Session("cart") = New CShoppingCart
so now, the cart is a session object that can be called from every page in this session BUT.... when i do this in a different page:
Response.Write Session("cart").TableName
I get an asp error (Erreur d'exécution Microsoft VBScript (0x800A01B6) )saying this is not a supported method (the error is actually in french! i can paste it if u want)
The object seems to be valid (IsNull return false and IsObject returns true) but i cannot invoke its methods and read its properties ....
View Replies
View Related
I would like to be able to get the type of object that a session variable contains (for example, determine whether it is a string, integer, single precision floating point, ADODB.Recordset, etc...)
I need to know this for a ASP <----> ASP.NET session management script I am writing. I would like to be able just to copy strings and numbers. I already have code that does this, but I don't want my script to blow up when it finds a recordset in the session object.Is there any easy way to detect the object type in ASP?
View Replies
View Related
I have a session object Session("login") whereas I need to extend the time on this to 1 hour, instead of the default 20 minutes. After initializing Session("login"), how would I change the timeout value?
View Replies
View Related
Here's a question that I've not been able to get a definitive answer to.
Creating an STA object (such as a typical VB6 object) and assigning to the
ASP Session store is a bad thing.
It's a bad thing because it forces IIS to affiliate the Session with the
Thread on which the STA object is created.
This means all subsequent requests for that session can only be handled by
that worker thread and can therefore result it in poor performance as
requests queue up to access the thread they are affiliated with.
My question(s) is/are this:
Is this affilation now set in stone for the life time of the session?
Does removing the STA object from the session remove the affiliation or is
IIS/ASP just not that clever?
View Replies
View Related
I'm wondering where the data is stored for Session objects. Is it passed to the browser, and then passed back to the server during page requests? Or, is the Session data always on the server, and the browser simply passes the server it's unique session id?
View Replies
View Related
How can I give a user-defined object session scope? From
http://www.microsoft.com/windows200...asp/iiwaobu.htm
I gather that it can be done, but there are no examples. Simply setting
Set Session("tag") = new MyClass
doesn't work.
View Replies
View Related
Need to query an access db usign the contents of a text file that has one entry in it, and id ie: drsmith
Here's what I have thus far (the db call is in an include file)
<%
Dim fso, read
set fso = createobject("scripting.filesystemobject")
set read = fso.opentextfile(server.mappath("settings.inc"))
SQL = "SELECT * FROM news WHERE Company_id = (??????)"
Set rs = Server.CreateObject("ADODB.RecordSet")
Set RS = Conn.Execute(SQL)
%>
View Replies
View Related
I'm completely lost as to what's causing this error on my browser. When i try to view my site with Internet Explorer my asp pages show nothing but the below error:
Session object error 'ASP 0102 : 80004005'
The problem is we are still getting orders and the tech support from our hosting company says he's not getting the error so it seems i'm the only one getting it, to make it stranger if i look at my site using Mozilla Firefox i don't get any error. This seems to conflict with the fact that asp is a server side script and so the browser shouldn't make any difference to asp errors but in my case it does?
What's stranger still is if i try to log into my sites Helm control panel i get a similar asp error but this time no matter what browser i use i get the same error and can't log in.
If anyone has any idea what could be causing this or more importantly what i can do to fix it I'd be very grateful to hear about it. I hadn't changed anything on my site or my browser when this error started appearing about 2 days ago and the tech support say if they aren't getting the error their end they can't fix it so I've no idea what to do.
View Replies
View Related
I have a VC++ COM object which fires an event. I've written VB EXE apps against it and they receive the event notification.
I've now built a simple VB COM object which uses the VC++ COM object internally.
My question is, assuming the ASP page which loads the object does not immediately exit, will the VB COM object be able to receive the events from the internal object?
View Replies
View Related
We are using .net 1.1 on windows 2003 server. This is we are facing in our
production server.
When we are doing the load testing we are getting the bellow error. While
the load testing this error is not coming frequently. When we run 20 threads
for 3 mins we are getting this error message 2 or 3 times. But this line of
code is executed by all the threads. Code:
View Replies
View Related
I want to open a recordset object on an .asp page. When I open the recordset I would like to use a stored procedure that expects a parameter to be passed for the stored procedure. I will then use the recordset to loop thru the recordset, update values from the recordset and then update the database by passing parmeters to another stored procedure.
I would like to use the recordset object but can it be used to pass a parameter to a stored procedure? Do I need to use a command object to open the records instead in
order to pass the parameter to a stored procedure?
View Replies
View Related
I have a custom function for checking if a variable has been set or not to make the code easier to read, as well as to keep it shorter.
However, I'm getting errors that "Object Variable not Set", even after I've already checked for null and empty. Code:
View Replies
View Related
how to find the session expired or not without using any session varaibles?
View Replies
View Related
A three-tier user authentication system was running without a problem for almost a year and now is suddenly dysfunctional. We don't know of any changes to any of the servers. It's quite maddening. The details:
1) We know the COM+ app is instanced on the COM+ server (Win 2000). The component graphic spins when CreateObject is called.
2) The proxy is installed on an IIS server (Win 2000) with delivers the interface, written in ASP, to the client PC.
3) These are the error messages displayed when a method of DAMS is called: Code:
View Replies
View Related
I know that cookies are stored with a txt file in the client PC. but are cookies even stored in RAM? cuz i can access the cookie information but i cannot see the cookie a txt related to that in my PC...
View Replies
View Related
I am running the following code to an access database
' Recordset Object
Dim rs
' connecting to database
con.Open connStr
' executing stored procedure
Set rs = con.Execute ("exec SpotDesc")
' showing all records
While Not rs.EOF
Response.Write rs(0) & " " & rs(1) & "<br>"
rs.MoveNext
Wend
' closing connection and freeing resources
con.Close
Set rs = Nothing
This works and runs the stored procedure SpotDesc.
One question I have is that this line brings back the results
Response.Write rs(0) & " " & rs(1) & "<br>"
but requires me to know how many colums are being returned, ie rs(0) is column 1 and rs(1) is column 2
Is there a way of writing this line and it places all the columns there wheter it be 1, 2, or 3?
Ie a way of know how many columns are returned...
Is there also a way to show the column heading?
View Replies
View Related
Just a quick question. I am using Sql Server 2000 and calling stored procedures from asp.
At this stage i am forgoing using the ADO command object and am simply create dynamic like sql statement for store procedure execution.
My question is, I find the code below quite messy, particularly when it comes to checking for option parameters using if statements. Is their a better way to write this, keeping in mind i have to check in a value exists before adding the appropriate parameter
to the stored procedure call.
Is there are more elegant way?....
View Replies
View Related
I'm trying to access a stored procedure on our AS400 that is written in RPG. I know that the stored procedure works (I've called it from an RPG program on the AS400), and I know that the connection to the AS400 is good, because this same ASP page is reading data via SQL. However, when I try to call the stored procedure, I can't tell if anything is actually happening. All that I know is that the end result is not being changed, so I suspect that the procedure isn't being called correctly.
My stored procedure is used to encrypt/decrypt data. It has 3 parameters - a 1 character flag telling it whether to encrypt or decrypt, a 25 character field for the plaintext data, and a 50 character field for the encrypted data. The last two parameters are used for either input or output, depending on the value of the first
flag (if the flag is "E", then the plaintext is used as input and the program fills the encrypted data field. If the flag is "D", then vice - versa).
Here is the code where I call my stored procedure. I'm trying to decrypt data from the queryString and place it in some program variables. I'm new to ASP, and can't find any good examples for my situation, so I pieced this together from what examples I found
online. Can anyone tell me what I'm missing?
View Replies
View Related
A while back people were looking into stored procedures and code to list which ones exist
Does anyone know the code to list all the stored procedures in a my sql database?
View Replies
View Related
I need to also add an AND after the where like
WHERE (Id = @CId)
and MAX(end) < NOW()
CREATE PROCEDURE dbo.[sp_rsgroup]
@Id int
AS
SELECT ISNULL(Group, '') AS GroupCalc, MIN(start) AS START, COUNT(Id) AS Count
FROM Table
WHERE (Id = @CId)
GROUP BY ISNULL(Group, '')
ORDER BY start
GO
View Replies
View Related
I have a problem with input parameter which has Decimal DataType. Stored procedure works but it rounds all
values, i.e 5.555 input becomes 6 and 1.3 input becomes 1.
In table QTY has data type decimal(5) - precision(8) scale(3).
Please, suggest what's wrong with this:
newqty = Request.Form("quantity")
..........
cmd.Parameters.Append(cmd.CreateParameter("qty", adDecimal, adParamInput, 5, newqty))
cmd.Parameters("qty").Precision = 8
cmd.Parameters("qty").NumericScale = 3
View Replies
View Related
I have included in my database a location (web URL) of a file that the person using my site can click on and it will work as a normal hyperlink and go to that page.
In case that doesn't make sense,
Say this is my database:
IMEtitle
Sarah
LocationURL
http://this.com/here.html
I want to display on my page Sarah and Sarah be hyperlinked. The hyperlink is pulled from the database as well as Sarah.
Here is the code I have,
<a href = "<% =recordset("LocationURL") %>"> <%Response.Write recordset("IMEtitle")%></a>
Everything appears fine, but when I click the link it says just adds it to the end, it looks something like this:
http://www.nps.navy.mil/Content/DLR...S/Southwest.swf#
Whereas it should look like:
http://www.nps.edu/DL/DLRC/media_de...S/Southwest.swf
I have done this sort of thing in PHP, but I am not sure how to do it in ASP.
View Replies
View Related
there will be 4 files for 2 questions. Qn1.asp Q2.asp Check1.asp Check2.asp
Check1.asp consist of the codes below to check Q1.asp and Check2.asp is to check Q2.asp
What do i need to put in the "" in both check1.asp and check2.asp so that if the user answer both the qn correctly it will 2 out of 2.. both wrong 0 out of 2 and so on.. I want the points to be stored inside a database..
<%
r1=Trim(request.form("r1"))
r2=Trim(request.form("r2"))
r3=Trim(request.form("r3"))
I=Trim(request.form("I"))
urans=Trim(request.form("Answer1"))
result= Round(CLng(r3)*CLng(I)/(CLng(r2)+CLng(r3)))
if (CStr(result) = CStr(urans)) then
" "
elseif (CStr(result) <> CStr(urans)) then
" "
End if
%>
View Replies
View Related
could anyone provide me with some simple example code of asp classic
calling adodb? specifically, i'd like the code to:
- call a couple of stored procedures that have optional parameters
- share a connection over the two calls
View Replies
View Related