Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: I get ADODB.Recordset error '800a0e7b' ?


Message #1 by Lizawati Bakri <LIZA_B@e...> on Fri, 16 Feb 2001 14:38:08 +0800
This message is in MIME format. Since your mail reader does not understand

this format, some or all of this message may not be legible.



------_=_NextPart_001_01C097E3.067A86FC

Content-Type: text/plain;

	charset="iso-8859-1"





I receive this error when run this program: 



	UPDATE notice SET notice.NoticeTitle='Sale of clothes',

notice.NoticeBody=' Today is a wonderful day..but many people seem bad

mood.I think they need some extra break time so they can go to sleep and

enjoy their life.but you stil need to understand what are you doing here

every time I close my eyes all I think is you but you...... . lkhjgjgj',

notice.ChangeBy='gjjg', notice.ChangeDate='jgjj' , notice.ChangeTime='gjgj'

WHERE (((notice.NoticeID)='0001')AND ((notice.CategoryID)='Staff Event') AND

((notice.CreatedBy)='liza') AND ((notice.CreationDate)='01/07/2001') AND

((notice.CreationTime)='3:15:00 PM')) 

ADODB.Recordset error '800a0e7b' 



The application cannot change the ActiveConnection property of a Recordset

object with a Command object as its source. 



/redesign/cgi-bin/intranet/liza/updatenotice.asp, line 33 



This is my program :



Const adOpenStatic = 3

Const adLockOptimistic = 3

Set DataConn = Server.CreateObject("ADODB.Connection")

DataConn.ConnectionTimeout = 15

DataConn.CommandTimeout = 30

DataConn.Open "DSN=CarCustomize"

Set cmdTemp = Server.CreateObject("ADODB.Command")

Set rstemp = Server.CreateObject("ADODB.Recordset")

Dim sSQL

sSQL =  "UPDATE notice SET notice.NoticeTitle='" & Request.form("title1") &

"', notice.NoticeBody='" & Request.form("body1") & "', notice.ChangeBy='" &

Request.form("changeby1") & "', notice.ChangeDate='" &

Request.form("changedate1") & "' ,  notice.ChangeTime='" &

Request.form("changetime1")  & "' WHERE (((notice.NoticeID)='" &

Request.form("notice1") & "')AND ((notice.CategoryID)='" &

Request.form("category1") & "') AND ((notice.CreatedBy)='" &

Request.form("createby1") & "') AND ((notice.CreationDate)='" &

Request.form("creationdate1") & "') AND ((notice.CreationTime)='" &

Request.form("creationtime1") & "'))"

Response.Write(sSQL)

cmdTemp.CommandText = sSQL

Set cmdTemp.ActiveConnection = DataConn



this is line 33---->> rstemp.Open cmdTemp, DataConn, adOpenStatic,

adLockOptimistic



Can anybody help me ???





liza






Message #2 by "Ken Schaefer" <ken@a...> on Fri, 16 Feb 2001 23:07:07 +1100
The error means exactly what it says.



You set the Active Connection here:

> Set cmdTemp.ActiveConnection = DataConn

(actually you shouldn't use SET here)



and then you try to do this:

rstemp.Open cmdTemp, DataConn, adOpenStatic, adLockOptimistic



PLEASE, PLEASE PLEASE - go here and BUY THIS BOOK!

http://www.amazon.com/exec/obidos/ASIN/1861003382/qid=967421606/sr=1-2/002-4

835931-5632831

(or buy from your prefered bookstore)



It will save *you* plenty of time...



Cheers

Ken



----- Original Message -----

From: "Lizawati Bakri" <LIZA_B@e...>

To: "ASP Databases" <asp_databases@p...>

Sent: Friday, February 16, 2001 5:38 PM

Subject: [asp_databases] I get ADODB.Recordset error '800a0e7b' ?





>

> I receive this error when run this program:

>

> UPDATE notice SET notice.NoticeTitle='Sale of clothes',

> notice.NoticeBody=' Today is a wonderful day..but many people seem bad

> mood.I think they need some extra break time so they can go to sleep and

> enjoy their life.but you stil need to understand what are you doing here

> every time I close my eyes all I think is you but you...... . lkhjgjgj',

> notice.ChangeBy='gjjg', notice.ChangeDate='jgjj' ,

notice.ChangeTime='gjgj'

> WHERE (((notice.NoticeID)='0001')AND ((notice.CategoryID)='Staff Event')

AND

> ((notice.CreatedBy)='liza') AND ((notice.CreationDate)='01/07/2001') AND

> ((notice.CreationTime)='3:15:00 PM'))

> ADODB.Recordset error '800a0e7b'

>

> The application cannot change the ActiveConnection property of a Recordset

> object with a Command object as its source.

>

> /redesign/cgi-bin/intranet/liza/updatenotice.asp, line 33

>

> This is my program :

>

> Const adOpenStatic = 3

> Const adLockOptimistic = 3

> Set DataConn = Server.CreateObject("ADODB.Connection")

> DataConn.ConnectionTimeout = 15

> DataConn.CommandTimeout = 30

> DataConn.Open "DSN=CarCustomize"

> Set cmdTemp = Server.CreateObject("ADODB.Command")

> Set rstemp = Server.CreateObject("ADODB.Recordset")

> Dim sSQL

> sSQL =  "UPDATE notice SET notice.NoticeTitle='" & Request.form("title1")

&

> "', notice.NoticeBody='" & Request.form("body1") & "', notice.ChangeBy='"

&

> Request.form("changeby1") & "', notice.ChangeDate='" &

> Request.form("changedate1") & "' ,  notice.ChangeTime='" &

> Request.form("changetime1")  & "' WHERE (((notice.NoticeID)='" &

> Request.form("notice1") & "')AND ((notice.CategoryID)='" &

> Request.form("category1") & "') AND ((notice.CreatedBy)='" &

> Request.form("createby1") & "') AND ((notice.CreationDate)='" &

> Request.form("creationdate1") & "') AND ((notice.CreationTime)='" &

> Request.form("creationtime1") & "'))"

> Response.Write(sSQL)

> cmdTemp.CommandText = sSQL

> Set cmdTemp.ActiveConnection = DataConn

>

> this is line 33---->> rstemp.Open cmdTemp, DataConn, adOpenStatic,

> adLockOptimistic

>

> Can anybody help me ???

>

>

> liza

>

>

>

> ---

> Please take a moment to tell us how you are using AuthentiX, WebQuota, and

> VideoQuota

>

> http://www.flicks.com/feedback/feed.asp

>

> Scott Gordon

> Marketing

> Flicks Software

> www.flicks.com

>  xxx-xxx-xxxx




$subst('Email.Unsub')

>



Message #3 by "Wally Burfine" <oopconsultant@h...> on Fri, 16 Feb 2001 14:48:52 -0000
Sounds straight forward.

"The application cannot change the ActiveConnection property of a Recordset 

object with a Command object as its source."



Make it a recordset.



Regards,

Wally







>From: Lizawati Bakri <LIZA_B@e...>

>Reply-To: "ASP Databases" <asp_databases@p...>

>To: "ASP Databases" <asp_databases@p...>

>Subject: [asp_databases] I get ADODB.Recordset error '800a0e7b'  ?

>Date: Fri, 16 Feb 2001 14:38:08 +0800

>

>

>I receive this error when run this program:

>

>	UPDATE notice SET notice.NoticeTitle='Sale of clothes',

>notice.NoticeBody=' Today is a wonderful day..but many people seem bad

>mood.I think they need some extra break time so they can go to sleep and

>enjoy their life.but you stil need to understand what are you doing here

>every time I close my eyes all I think is you but you...... . lkhjgjgj',

>notice.ChangeBy='gjjg', notice.ChangeDate='jgjj' , notice.ChangeTime='gjgj'

>WHERE (((notice.NoticeID)='0001')AND ((notice.CategoryID)='Staff Event') 

>AND

>((notice.CreatedBy)='liza') AND ((notice.CreationDate)='01/07/2001') AND

>((notice.CreationTime)='3:15:00 PM'))

>ADODB.Recordset error '800a0e7b'

>

>The application cannot change the ActiveConnection property of a Recordset

>object with a Command object as its source.

>

>/redesign/cgi-bin/intranet/liza/updatenotice.asp, line 33

>

>This is my program :

>

>Const adOpenStatic = 3

>Const adLockOptimistic = 3

>Set DataConn = Server.CreateObject("ADODB.Connection")

>DataConn.ConnectionTimeout = 15

>DataConn.CommandTimeout = 30

>DataConn.Open "DSN=CarCustomize"

>Set cmdTemp = Server.CreateObject("ADODB.Command")

>Set rstemp = Server.CreateObject("ADODB.Recordset")

>Dim sSQL

>sSQL =  "UPDATE notice SET notice.NoticeTitle='" & Request.form("title1") &

>"', notice.NoticeBody='" & Request.form("body1") & "', notice.ChangeBy='" &

>Request.form("changeby1") & "', notice.ChangeDate='" &

>Request.form("changedate1") & "' ,  notice.ChangeTime='" &

>Request.form("changetime1")  & "' WHERE (((notice.NoticeID)='" &

>Request.form("notice1") & "')AND ((notice.CategoryID)='" &

>Request.form("category1") & "') AND ((notice.CreatedBy)='" &

>Request.form("createby1") & "') AND ((notice.CreationDate)='" &

>Request.form("creationdate1") & "') AND ((notice.CreationTime)='" &

>Request.form("creationtime1") & "'))"

>Response.Write(sSQL)

>cmdTemp.CommandText = sSQL

>Set cmdTemp.ActiveConnection = DataConn

>

>this is line 33---->> rstemp.Open cmdTemp, DataConn, adOpenStatic,

>adLockOptimistic

>

>Can anybody help me ???

>

>

>liza

>

>

>

  Return to Index