all groups > inetserver asp db > february 2005 >
You're in the

inetserver asp db

group:

Can't Figure Out What is Wrong Here


Can't Figure Out What is Wrong Here Wayne Wengert
2/22/2005 5:47:59 AM
inetserver asp db: I am using an ASP page to access information in a SQL 2000 database. When I
run the following query:

========================================================
Select Distinct [Judge Name], Caption, Avg ([Total Score] - ([Gross
Score]/5)) As AvgDev, ABS(Avg ([Total Score] - ([Gross Score]/5))) As
AbsAvgDev, Max ([Total Score] - ([Gross Score]/5)) As MaxDev, Min ([Total
Score] - ([Gross Score]/5)) As MinDev From YTD Group By [Judge Name],
Caption Order By [Judge Name]

myRS.Open strSQL, myConn, adOpenDynamic, adLockOptimistic, adCmdText

============================================================

I get the following error. If I run the query in QA it runs fine? I've
experimented with different lock and open options but nothing seems to work

===============================================================

Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another.

=========================================================

Re: Can't Figure Out What is Wrong Here Wayne Wengert
2/22/2005 7:09:37 AM
Bob;

Thanks for the quick response. I should have seen that need. I downloaded
adovbs.inc and extracted the constants I use and put them in my page

Wayne

[quoted text, click to view]

Re: Can't Figure Out What is Wrong Here Wayne Wengert
2/22/2005 7:24:50 AM
Actually, I had included:

<!--METADATA TYPE="typelib" uuid="00000205-0000-0010-8000-00AA006D2EA4" -->

on every page (MDAC directive) but on just this one page I am getting that
error so I don't think it is the ado variables. I even tried using the
constants (no ado variables) and I still get the error. Any other ideas as
to what might cause this?

Wayne

[quoted text, click to view]

Solved it! Wayne Wengert
2/22/2005 8:09:15 AM
Bad connection code. I re-coded the connection process and all is well now!

Wayne

[quoted text, click to view]

Re: Can't Figure Out What is Wrong Here Bob Barrows [MVP]
2/22/2005 8:42:14 AM
[quoted text, click to view]
This almost always means that the ADO constants (adOpenDynamic, etc.) are
not defined in your page. You could #include the adovbs.inc file in all your
pages, but see here for a better method:

http://www.aspfaq.com/show.asp?id=2112

HTH,
Bob Barrows

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Re: Can't Figure Out What is Wrong Here Bob Barrows [MVP]
2/22/2005 9:18:50 AM
OK, just be aware that you will need to remember to do that for every page
in which you wish to use the constants. The alternative method of using META
to reference the type library is superior.

Bob Barrows
[quoted text, click to view]

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

AddThis Social Bookmark Button