Can"t Figure Out What is Wrong Here

Can"t Figure Out What is Wrong Here

am 22.02.2005 13:47:59 von Wayne Wengert

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

am 22.02.2005 14:42:14 von reb01501

Wayne Wengert wrote:
> 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.
>
> =========================================================
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

am 22.02.2005 15:09:37 von Wayne Wengert

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

"Bob Barrows [MVP]" wrote in message
news:O$fySROGFHA.548@TK2MSFTNGP14.phx.gbl...
> Wayne Wengert wrote:
> > 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.
> >
> > =========================================================
> 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

am 22.02.2005 15:18:50 von reb01501

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
Wayne Wengert wrote:
> 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
>
> "Bob Barrows [MVP]" wrote in message
> news:O$fySROGFHA.548@TK2MSFTNGP14.phx.gbl...
>> Wayne Wengert wrote:
>>> 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.
>>>
>>> =========================================================
>> 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.

--
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

am 22.02.2005 15:24:50 von Wayne Wengert

Actually, I had included:



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

"Bob Barrows [MVP]" wrote in message
news:u1JdvlOGFHA.3648@TK2MSFTNGP09.phx.gbl...
> 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
> Wayne Wengert wrote:
> > 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
> >
> > "Bob Barrows [MVP]" wrote in message
> > news:O$fySROGFHA.548@TK2MSFTNGP14.phx.gbl...
> >> Wayne Wengert wrote:
> >>> 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.
> >>>
> >>> =========================================================
> >> 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.
>
> --
> 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.
>
>

Solved it!

am 22.02.2005 16:09:15 von Wayne Wengert

Bad connection code. I re-coded the connection process and all is well now!

Wayne

"Bob Barrows [MVP]" wrote in message
news:u1JdvlOGFHA.3648@TK2MSFTNGP09.phx.gbl...
> 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
> Wayne Wengert wrote:
> > 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
> >
> > "Bob Barrows [MVP]" wrote in message
> > news:O$fySROGFHA.548@TK2MSFTNGP14.phx.gbl...
> >> Wayne Wengert wrote:
> >>> 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.
> >>>
> >>> =========================================================
> >> 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.
>
> --
> 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.
>
>