Jump to content
  • Advertisement
Sign in to follow this  

ASP's Server.CreateObject() returning null

This topic is 3393 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!