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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Missing Default Property

Status
Not open for further replies.

obuspider

Programmer
Oct 31, 2002
78
US
I'm getting the error Missing Default Property on this(session("oRs") = oRs) line
Can anyone help me with this?

dim oRs
Set oConn = Server.CreateObject( "ADODB.Connection" )
Set objCmd = Server.CreateObject( "ADODB.Command" )
Set session("oRs") = Server.CreateObject( "ADODB.Recordset" )

sConn = "uid=Foodsrvc;pwd=gA15L6;dsn=StockStatus"
oConn.Open sConn
objCmd.ActiveConnection = oConn
objCmd.CommandTimeout = 180


with objCmd
.commandText = "ProcTrackingOverview "
.CommandType = &H0004
.parameters(1) = Cdate(fsale_date)
.parameters(2) = CDate(tsale_date)

End With
Set oRs = objCmd.Execute()
session("oRs") = oRs
Set oRs = nothing
'objCmd = nothing

if not session("oRs").eof then
response.write "you made it"
End if
 
Try using set:
Set Session("oRS") = oRs


If that doesn't work then try using Session("oRs") in place of the variable oRs, ie
instead of:
Set oRs = objCmd.Execute()
session("oRs") = oRs
try:
Set session("oRs") = objCmd.Execute()


-Tarwn --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
For my next trick I will pull a hat out of a rabbit (if you think thats bad you should see how the pigeon feels...) :p
 
Tarwn,

I had tried this before. Tried it again and now I am getting
Item cannot be found in the collection corresponding to the requested name or ordinal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top