I appologize for truncating your original response, but wanted to save
message space.
First, 2 questions:
1. Where's Line 6?
2. Where's "cn". Original problem was error: "Object required: 'cn'". I
couldn't find it anywhere in the code. Did you change 'cn' to 'conn'?
Secondly, can you set a session variable to be an object? I can't say
either way, but would think not. But if you can, I would strongly recommend
against it. Maybe if you want to save a DSN string in there, that's ok, but
having an object alive for a whole session (despite whether or not you
actually CAN...) seems pretty dangerous. That's a lot of resources open for
very limited actual usage.
I don't see where the error would be in the provided code aside from a
possible blow-up on:
Set Session("1002.dsn_conn") = conn
Good luck.
Peter Lanoie
-----Original Message-----
From: Hiro Shiratori [mailto:hiro-shiratori@m...]
Sent: Tuesday, December 19, 2000 5:38 PM
To: Interdev_Programming
Subject: Re: InterDev Error
Thank you very much for trying to get bck to me to help me resolve this
issue.
I am copying all the codes in this email.
It will be greatly appreciated if you could provide me with any suggestion.
Once again, thank you very much.
Hiro Shiratori
<%
If IsObject(Session("1002.dsn_conn")) Then
Set conn = Session("1002.dsn_conn")
Else
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "1002.dsn","",""
Set Session("1002.dsn_conn") = conn
End If
%>
<%
If IsObject(Session("Form_DiveLog_rs")) Then
Set rs = Session("Form_DiveLog_rs")
Else
sql = "SELECT * FROM [DiveLog]"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn, 3, 3
If rs.eof Then
rs.AddNew
End If
Set Session("Form_DiveLog_rs") = rs
End If
%>
----- Original Message -----
From: "Jorge H. Carnovale" <carnovalej@h...>
To: "Interdev_Programming" <interdev_programming@p...>
Sent: Tuesday, December 19, 2000 1:18 PM
Subject: Re: InterDev Error
> lol, i thought exactly the same.
>
> ----- Original Message -----
> From: "Daniel Walker" <danielw@w...>
> To: "Interdev_Programming" <interdev_programming@p...>
> Sent: Tuesday, December 19, 2000 6:16 PM
> Subject: Re: InterDev Error
>
>
> > Well, the error is definitely "in line 6" (as the saying goes), but
could
> > we see the code, so that we can see what line 6 is _meant_ to be doing,
> > Shiratori?
> >
> > Daniel Walker
> > Wrox Press
> >
> > >
> > > I have the following error.
> > > Microsoft VBScript runtime error '800a01a8'
> > >
> > > Object required: 'cn'
> > >
> > > /Project7/DiveLogalx.asp, line 6
> > >
> > > Could someone help me fix this problem or tell me where I can find the
> > > Microsoft KB article?
> > >
> > > Hiro Shiratori
> > >
> > >
> >
>
---
http://www.asptoday.com - the leading site for timely,
in-depth information for ASP developers everywhere.
---
You are currently subscribed to interdev_programming as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-interdev_programming-$subst('Recip.MemberIDChar')@p2p.wrox.com