Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Object Required Error
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 3

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 02 June 2008 :  06:48:09  Show Profile
Can someone point to the error? I'm encountering an object required error in the first line of this sql code:

	strSql = "SELECT G.USERGROUP_ID, G.MEMBER_ID, M.MEMBER_ID, M.M_NAME, " &_
	strSql = "FROM " & strTablePrefix & "USERGROUP_USERS G, " & strMemberTablePrefix & "MEMBERS M " &_
	strSql = "WHERE G.USERGROUP_ID = 8 AND M.MEMBER_ID = " & G.MEMBER_ID & " " &_
	strSql = "ORDER BY M_NAME"
	set rsNames = my_conn.execute(strSql)


<moved from="Help: General / Current Version (v3.4.xx)" by="Shaggy" /><

Edited by - Shaggy on 03 June 2008 12:47:18

AnonJr
Moderator

United States
5768 Posts

Posted - 02 June 2008 :  08:48:15  Show Profile  Visit AnonJr's Homepage
Without some context its going to be hard. I would imagine that somewhere preceding that snippet my_conn has been set to nothing prematurely. But, without some context its hard to say.<
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 03 June 2008 :  02:22:34  Show Profile
Here's a .txt version of the file:

Code<
Go to Top of Page

gary b
Junior Member

USA
267 Posts

Posted - 03 June 2008 :  12:40:52  Show Profile  Visit gary b's Homepage
Does the final comma imply an object follows... but is missing?!?

strSql = "SELECT G.USERGROUP_ID, G.MEMBER_ID, M.MEMBER_ID, M.M_NAME, " &_

If so, eliminating the comma would solve the issue.<
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 03 June 2008 :  18:12:14  Show Profile
No, that's not it. With/without the comma, same error.<
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 03 June 2008 :  18:22:07  Show Profile  Send ruirib a Yahoo! Message
You should remove the comma, nonetheless, like you have it now will generate an SQL error.

What line is showing the error? Can't be the SQL line, there is no object there.<


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 03 June 2008 :  20:31:49  Show Profile
It's the first line of the sql code.

quote:

Microsoft VBScript runtime error '800a01a8'

Object required: ''

warden.asp, line 112

<
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 03 June 2008 :  21:10:34  Show Profile  Send ruirib a Yahoo! Message
Well with includes and such, the error line is sometimes wrong. AFAIK, an SQL line won't generate that error, so I'd suggest that by commenting stuff out, you pinpoint the exact location.<


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 04 June 2008 :  00:14:35  Show Profile
OK, I cut away everything but the problem area & split the M. items from the G. items in a test page.


%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_func_common.asp" -->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<!--#INCLUDE FILE="inc_func_secure.asp" -->
<%
	strSql = "SELECT G.USERGROUP_ID, G.MEMBER_ID, " &_
	strSql = "M.MEMBER_ID, M.M_NAME " &_
	strSql = "FROM " & strTablePrefix & "USERGROUP_USERS G, " & strMemberTablePrefix & "MEMBERS M " &_
	strSql = "WHERE G.USERGROUP_ID = 8 AND M.MEMBER_ID = " & G.MEMBER_ID & " " &_
	strSql = "ORDER BY M_NAME"
	set rsNames = my_conn.execute(strSql)
	Do while not rsNames.EOF and not rsNames.BOF
		if tmpStrNames = "" then
			tmpStrNames = rsNames("M_NAME")
		else
			tmpStrNames = tmpStrNames & "," & rsNames("M_NAME")
		end if
	rsNames.movenext
	loop
	Response.Write	tmpStrNames
	rsNames.close
	set rsNames = Nothing
%>


This results in object required 'g' in line 9 (first line of Sql).
Eliminating all but config.asp & inc_header.asp from the includes makes no difference. Same error, same line.<
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 04 June 2008 :  08:55:14  Show Profile  Send ruirib a Yahoo! Message
What database are you using? Can you response.write the sql and execute directly in the DB?<


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

modifichicci
Average Member

Italy
787 Posts

Posted - 04 June 2008 :  11:44:29  Show Profile  Visit modifichicci's Homepage
ORDER BY M_NAME could be
ORDER BY M.M_NAME ?<

Ernia e Laparocele
Forum di Ernia e Laparocele
Acces - MySql Migration Tutorial
Adamantine forum
Go to Top of Page

gary b
Junior Member

USA
267 Posts

Posted - 04 June 2008 :  12:00:37  Show Profile  Visit gary b's Homepage
Set rsRelease = Server.CreateObject("ADODB.Recordset")
call sendReleaseMail(PRISON_ID)
Set rsRelease = my_conn.execute(strSQL)


rsNames object not defined as was in earlier SQL sections... (See above)

strSql = "ORDER BY M_NAME"
set rsNames = my_conn.execute(strSql)

So "SET" statement can't execute... but SQL line cited as reason

That even remotely plausible??

<
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 04 June 2008 :  13:01:03  Show Profile
Delete all occurrences of strSql= except for the first one.

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 04 June 2008 :  14:25:19  Show Profile  Send ruirib a Yahoo! Message
quote:
Originally posted by Shaggy

Delete all occurrences of strSql= except for the first one.




The most obvious errors are those that are missed! Good catch Shaggy!<


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 04 June 2008 :  14:30:33  Show Profile
Credit to Gary; 'twas only when he reposted the "order by" clause that I spotted it Up 'til then, I was as stumped as everybody else!

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 04 June 2008 :  15:21:28  Show Profile  Visit AnonJr's Homepage
I'm embarrassed that I missed it... though I am also consoled that rui missed it too. <

Edited by - AnonJr on 04 June 2008 15:21:51
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.36 seconds. Powered By: Snitz Forums 2000 Version 3.4.07