Sign in to follow this  

ASP's Server.CreateObject() returning null

Recommended Posts

Hi all, I'm doing some ASP coding for my game website and am getting a very bizarre error indeed, and after conducting a thorough, failed, search for the solution, have decided that I am at the mercy of better programmers on these forums :-) So, all I am trying to do is executed a simple SQL query on one of my ASP pages. The weird thing is that the *exact* same code works elsewhere in the page... which has me wondering if this could be a scope issue....
Dim rs, query
query = "SELECT * FROM myTable"
set rs = Server.CreateObject("ADODB.RecordSet")
set rs = conntemp.Execute(query)

' Now attempt to use the rs object
tempID = rs("myTableID")

' etc...

After inspecting the return values, to my horror, Server.CreateObject() is returning null, and so is Connection.Execute()!!! What are the different possibilities? My connection string hasn't changed, and queries using the *exact same code* (less the query to myTable - which has been checked, and rechecked, and re-rechecked) work elsewhere on the page. Help!!!

Share this post

Link to post
Share on other sites
Warning: it's been a looooong time since I've used ASP scripting

What does the working code look like? What are the differences?
By the way, you probably have a better chance if this was moved to Web Development.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this