Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Recordsets - EOF- Object doesn't support this property/method


Message #1 by "Elizabeth Gusztak" <Elizabeth.Gusztak@e...> on Tue, 13 Feb 2001 15:38:20
I absolutely can't see what I'm doing wrong in my code.  I've made sure 

there are no spelling mistakes, and I don't know what else to do!



My error is :

Microsoft VBScript runtime error '800a01b6' 

Object doesn't support this property or method: 'eof' 

/informatics/projects/golprojectdisplay.asp, line 29 



and the code :

24	strSQL = "SELECT * FROM Projects WHERE Number=" & ProjectNumber

25

26	Dim theprojectRS

27	Set theprojectRS = Server.CreateObject("ADODB.Recordset")

28	theprojectRS = DB.Execute(strSQL)

29	if not theprojectRS.eof then ....



Thanks!

Liz

Message #2 by pdf@b... on Tue, 13 Feb 2001 11:03:43 -0500

Liz,

I may be wrong, but I think "Number" is a reserved word.  You might want to

change that field name in the database and try it again.  Also, did you define

DB as a connection?  Try something like this (after you change the Number

field).  (Note, configure the connection string to match your needs, whether

it's ODBC or ADO or whatever):  -Pete



' Define a connection string

' Something like this:

strDBPath = Server.MapPath("myDB.mdb")

cntStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath & ";"



' Open a connection

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

tConn.Open cntStr



' Execute query

SQLstr = "SELECT * FROM Projects WHERE Number=" & ProjectNumber

set cRS = tConn.Execute(SQLstr, ,adCmdText)



If Not cRS.EOF Then











"Elizabeth Gusztak" <Elizabeth.Gusztak@e...> on 02/13/2001 07:01:24 PM



Please respond to "ASP Databases" <asp_databases@p...>



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

cc:    (bcc: Peter Foti)



Subject:  [asp_databases] Recordsets - EOF- Object doesn't support this

      property/method







I absolutely can't see what I'm doing wrong in my code.  I've made sure

there are no spelling mistakes, and I don't know what else to do!



My error is :

Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'eof'

/informatics/projects/golprojectdisplay.asp, line 29



and the code :

24   strSQL = "SELECT * FROM Projects WHERE Number=" & ProjectNumber

25

26   Dim theprojectRS

27   Set theprojectRS = Server.CreateObject("ADODB.Recordset")

28   theprojectRS = DB.Execute(strSQL)

29   if not theprojectRS.eof then ....



Thanks!

Liz

Message #3 by "Owen Mortensen" <ojm@a...> on Tue, 13 Feb 2001 10:15:22 -0700
Line 27 is not necessary.  You need to SET theprojectRS in line 28 like

this:

Set theprojectRS = DB.Execute(strSQL)



Owen



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

From: Elizabeth Gusztak [mailto:Elizabeth.Gusztak@e...]

Sent: Tuesday, February 13, 2001 5:01 PM

To: ASP Databases

Subject: [asp_databases] Recordsets - EOF- Object doesn't support this

property/method





I absolutely can't see what I'm doing wrong in my code.  I've made sure

there are no spelling mistakes, and I don't know what else to do!



My error is :

Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'eof'

/informatics/projects/golprojectdisplay.asp, line 29



and the code :

24	strSQL = "SELECT * FROM Projects WHERE Number=" & ProjectNumber

25

26	Dim theprojectRS

27	Set theprojectRS = Server.CreateObject("ADODB.Recordset")

28	theprojectRS = DB.Execute(strSQL)

29	if not theprojectRS.eof then ....



Thanks!

Liz





Message #4 by philip.moh@a... on Wed, 14 Feb 2001 09:18:02 +0800
it is? can you see this then? Why DB.Execute(strSQL) ? try to

theprojecRS.open strSQL, connection, blah, cursortype, locking





> -----Original Message-----

> From:	Elizabeth Gusztak [SMTP:Elizabeth.Gusztak@e...]

> Sent:	Wednesday, February 14, 2001 8:01 AM

> To:	ASP Databases

> Subject:	[asp_databases] Recordsets - EOF- Object doesn't support

> this property/method

> 

> I absolutely can't see what I'm doing wrong in my code.  I've made sure 

> there are no spelling mistakes, and I don't know what else to do!

> 

> My error is :

> Microsoft VBScript runtime error '800a01b6' 

> Object doesn't support this property or method: 'eof' 

> /informatics/projects/golprojectdisplay.asp, line 29 

> 

> and the code :

> 24	strSQL = "SELECT * FROM Projects WHERE Number=" & ProjectNumber

> 25

> 26	Dim theprojectRS

> 27	Set theprojectRS = Server.CreateObject("ADODB.Recordset")

> 28	theprojectRS = DB.Execute(strSQL)

> 29	if not theprojectRS.eof then ....

> 

> Thanks!

> Liz

> 

  Return to Index