Sign in to follow this  

[web] [ASP/SQL] Bug with query

Recommended Posts

I believe I have this right, I just keep getting an error I can't pinpoint because it just doesn't make sense. Basically I'm just running a query to grab some values from a column. Here's what I've gotten:
sConn = "Provider=SQLOLEDB;SERVER=zurich;Database=Compulink;UID=id;pwd=pass"
set checker = Server.CreateObject("ADODB.RecordSet")
strQ = "SELECT [departmentid] FROM [EnduserDepartment] WHERE [companyid] = '" & companyID & "'"
		checker.Open strQ, sConn
And I get this error about the check.Open line:
ADODB.Recordset error '800a0e79' 

Operation is not allowed when the object is open. 

/sst/setup/CompanyDept.asp, line 31 
How can it be open when it's the first instance of the object I use to open the query with!? That's what trips me up. I don't see how that error helps me since an open query object isn't that actual case.

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