Author |
Topic  |
Carefree
Advanced Member
    
Philippines
4222 Posts |
Posted - 02 June 2008 : 06:48:09
|
Can someone point to the error? I'm encountering an object required error in the first line of this sql code:
<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
|
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.< |
 |
|
Carefree
Advanced Member
    
Philippines
4222 Posts |
Posted - 03 June 2008 : 02:22:34
|
Here's a .txt version of the file:
Code< |
 |
|
gary b
Junior Member
 
USA
267 Posts |
Posted - 03 June 2008 : 12:40:52
|
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.< |
 |
|
Carefree
Advanced Member
    
Philippines
4222 Posts |
Posted - 03 June 2008 : 18:12:14
|
No, that's not it. With/without the comma, same error.< |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 03 June 2008 : 18:22:07
|
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 |
 |
|
Carefree
Advanced Member
    
Philippines
4222 Posts |
Posted - 03 June 2008 : 20:31:49
|
It's the first line of the sql code.
quote:
Microsoft VBScript runtime error '800a01a8'
Object required: ''
warden.asp, line 112
< |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 03 June 2008 : 21:10:34
|
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 |
 |
|
Carefree
Advanced Member
    
Philippines
4222 Posts |
Posted - 04 June 2008 : 00:14:35
|
OK, I cut away everything but the problem area & split the M. items from the G. items in a test page.
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.< |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
modifichicci
Average Member
  
Italy
787 Posts |
|
gary b
Junior Member
 
USA
267 Posts |
Posted - 04 June 2008 : 12:00:37
|
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?? 
< |
 |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 04 June 2008 : 13:01:03
|
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.” |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 04 June 2008 : 14:30:33
|
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.” |
 |
|
AnonJr
Moderator
    
United States
5768 Posts |
Posted - 04 June 2008 : 15:21:28
|
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 |
 |
|
Topic  |
|