Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with ASP on new windows 2003 server box

Status
Not open for further replies.

mopacfan

Programmer
Oct 30, 2000
190
US
I was just wondering if anyone else is/has experiencing issues with classic ASP on a Windows 2003 Server box? Our Intranet has been running on a windows 2000 server and now we have upgraded hardware and the OS. Most everything works but some things just don't and it's incredibly strange. For example, I a have a page with a stored proc. that returns a recordset from SQL server. On the old server, no problems, on the new server, some of the data displays, some does not. SQL query analyzer shows the data is being pulled. I can't even do an rs.GetRows(). It returns "Object doesn't support this property or method: 'rs.GetRows' "

Go figure.

I am hoping someone can shed some light on this for me. It's incredibly frustrating.

Thanks,

Mopacfan
 
I recommend that you check the MDAC version. Preferably, compare the version on the old server to the new server. This may not solve your problem, but it is where I would start looking.




-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Maybe one your ADO connections uses an DSN to connect to the database and that DSN was not created on the new box.
 
George,

That's a good idea. I never would have thought of that. I'll get right on this and find out. Thanks.

Sheco,

I don't use any dsn's. All of my connections are through regular connection strings.

Thanks for the replies!
 
One of the biggest differences between 2000 and 2003 is that the "out of the box" security settings on 2003 are much tighter.

I'm not saying that this sounds like a security issue but stranger things have happened.

Oh, here is another related idea... maybe there was an ASP page where anonymous access had been disabled using the IIS Admin tool... maybe that page had a connection string that used integrated security... and then maybe that page had a specific account specified to be used instead of the default IUSR_MachineName account. Yeah that is kinda stretching it but it could happen.
 
Sheco,

Yea, I smacked my head against the wall a few times trying to get asp to work and finally found that bugger. The intranet used to use integrated security since it was on the same box as SQL. But now it's on a new box and I'm using a sql user account with the connection string being pulled from a dll for security purposes. But even if I put the connection string in directly, the results are the same. :(
 
So, no one else has run up against this? This one is incredibly frustrating.
 
Is the problem intermittant or are there some specific that never work?
 
getrows just does not work to save my life and I can't figure out why. There are some other oddities to windows 2003 server but I can't yet explain well, what's going on because I don't yet understand it myself.
 
Can you show some code where GetRows is not working?

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
George:
Code:
	sql = "exec dbo.sp_cra_data_get " & request("craID")
    
	set rs = server.CreateObject("adodb.recordset")
	rs = objConn.execute(sql)
	dim arylist
	arylist = rs.GetRows()
	for i = 0 to ubound(arylist,2)
	    response.Write arylist(0,i) & ": " & arylist(1,i) & "<br>"
	next
This is a simple routine I wrote to test the getrows. It works on w2k, but not on w2003.
 
Change:

rs = objConn.execute(sql)

To:

[!]Set [/!]rs = objConn.execute(sql)

Or change it to....

Call RS.Open(sql, objConn)

I just tried your example here, and without the set, I got the same error. With the set, it worked properly. The only thing different between your code and mine was the name of the stored procedure. So, I'm fairly confident that this will work.

Just to add a little more 'fuel to the fire'....

I tested this...

Code:
    sql = "exec dbo.GetEventList " 

		Set objConn = Server.CreateObject("ADODB.Connection")
		objConn.ConnectionString = blah...
		objConn.CursorLocation = 3
		Call objConn.Open
		    
    set rs = server.CreateObject("adodb.recordset")
    rs = objConn.execute(sql)
    Response.Write(typename(rs)) [green]' Returns Fields[/green]
    
    Set rs = objConn.execute(sql)
    Response.Write(TypeName(rs)) [green]' Returns Recordset[/green]

So, without the set, you are getting a fields object (which doesn't have the getrows method). With the set, you are getting a recordset object which does.

Make sense?

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
I'll give it a try. Thanks for the heads up. I'm guessing that w2003 must be a lot more strict and lazy code is not getting by like it was (and I'm a lazy programmer) :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top