Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Object Doesn't Support This Property Or Method....

Status
Not open for further replies.

LongFeiFengWu

Technical User
Nov 9, 2001
98
US
The error I get is this:

Microsoft VBScript runtime (0x800A01B6)
Object doesn't support this property or method: 'response.cookies(...)'
/interactive/getlogon.asp, line 12

<%

SQL = "SELECT * FROM [Emp Data] WHERE VZID='" & request.form("VZID") & "' "

objrec.open SQL,objcon,3,3

If objrec.recordcount = 1 then

response.cookies("ECT")("FirstName") = objrec("FirstName")
response.cookies("ECT")("FirstName").Expires = dateadd("d",1,Now()) <----LINE 12
response.cookies("ECT")("LastName") = objrec("LastName")
response.cookies("ECT")("LastName").Expires = dateadd("d",1,Now())
response.cookies("ECT")("VZID") = objrec("VZID")
response.cookies("ECT")("VZID").Expires = dateadd("d",1,Now())
response.cookies("ECT")("SupID") = objrec("SupID")
response.cookies("ECT")("SupID").Expires = dateadd("d",1,Now())
response.cookies("ECT")("Status") = objrec("Status")
response.cookies("ECT")("Status").Expires = dateadd("d",1,Now())
response.cookies("ECT")("Desk") = objrec("Desk")
response.cookies("ECT")("Desk").Expires = dateadd("d",1,Now())
response.cookies("ECT")("HostName") = objrec("HostName")
response.cookies("ECT")("HostName").Expires = dateadd("d",1,Now())
response.cookies("ECT")("Rockwell") = objrec("Rockwell")
response.cookies("ECT")("Rockwell").Expires = dateadd("d",1,Now())
response.cookies("ECT")("SPID") = objrec("SPID")
response.cookies("ECT")("SPID").Expires = dateadd("d",1,Now())
response.cookies("ECT")("WStatus") = objrec("WStatus")
response.cookies("ECT")("WStatus").Expires = dateadd("d",1,Now())1
IF "" & objrec("EMAIL") <> "" THEN
response.cookies("ECT")("EMAIL") = objrec("EMAIL")
response.cookies("ECT")("EMAIL").Expires = dateadd("d",1,Now())
END IF

LoginFound = true
else
LoginFound = false
End If

%>

Any help is greatly appreciated.

&quot;If nothing within you stays rigid, outward things will disclose themselves. Moving, be like water. Still, be like a mirror. Respond like an echo.&quot; ~ Bruce Lee
 
try using Now without ()

TwoOdd
--------------
Good judgment comes from experience, and experience comes from bad judgment.
-- Barry LePatner
 
I get the same error on the same line.

&quot;If nothing within you stays rigid, outward things will disclose themselves. Moving, be like water. Still, be like a mirror. Respond like an echo.&quot; ~ Bruce Lee
 
I don't use cookies much, but the book I'm reading shows that to set the expiration of a cookie like yours where you have subkeys should look something like this:
Code:
response.cookies("ECT").Expires = dateadd("d",1,Now)

Notice that the subkey is missing.
Like I said, I don't have a lot of experience with this, but it's worth a try.

TwoOdd
--------------
Good judgment comes from experience, and experience comes from bad judgment.
-- Barry LePatner
 
that was it! just needed the one expiration line to set the expiration for the whole key group. thanks for all your help!

&quot;If nothing within you stays rigid, outward things will disclose themselves. Moving, be like water. Still, be like a mirror. Respond like an echo.&quot; ~ Bruce Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top