ADO.Command object properties
am 02.12.2004 04:19:03 von SROSeaner
I am using ASP 3 in IIS 6 with Server 2003. Just learning to use Stored
Procedures and calling them using the ADO Command object. I have come across
an error message whenever I try to use terms such as adInteger when using
stored procedure parameters. The error is a VBScript error and says
"variable undefined" and it's always complaining on the lines involving ADO
defined variables such as "adInteger" "adParamInput" "adParamOutput" etc.
Is there something I have to add for these variables definitions? I created
the object as follows
Dim adCmd
Set adCmd = Server.CreateObject("ADODB.Command")
Thanks!
Re: ADO.Command object properties
am 02.12.2004 05:06:39 von Jason Brown
This may help: http://www.aspfaq.com/show.asp?id=2112
basically, the constants are not defined.
--
Jason Brown
Microsoft GTSC, IIS
This posting is provided "AS IS" with no warranties, and confers no
rights.
"SROSeaner" wrote in message
news:AFF29C53-735A-490F-B874-024910EE64B2@microsoft.com...
>I am using ASP 3 in IIS 6 with Server 2003. Just learning to use Stored
> Procedures and calling them using the ADO Command object. I have come
> across
> an error message whenever I try to use terms such as adInteger when using
> stored procedure parameters. The error is a VBScript error and says
> "variable undefined" and it's always complaining on the lines involving
> ADO
> defined variables such as "adInteger" "adParamInput" "adParamOutput" etc.
>
> Is there something I have to add for these variables definitions? I
> created
> the object as follows
> Dim adCmd
> Set adCmd = Server.CreateObject("ADODB.Command")
>
> Thanks!
Re: ADO.Command object properties
am 02.12.2004 12:07:32 von reb01501
SROSeaner wrote:
> I am using ASP 3 in IIS 6 with Server 2003. Just learning to use
> Stored Procedures and calling them using the ADO Command object. I
> have come across an error message whenever I try to use terms such as
> adInteger when using stored procedure parameters. The error is a
> VBScript error and says "variable undefined" and it's always
> complaining on the lines involving ADO defined variables such as
> "adInteger" "adParamInput" "adParamOutput" etc.
>
> Is there something I have to add for these variables definitions? I
> created the object as follows
> Dim adCmd
> Set adCmd = Server.CreateObject("ADODB.Command")
>
> Thanks!
Jason showed you how to get the constants defined in your pages, so I'll
skip to my standard advice about executing stored procedures:
unless you are using output parameters, or you are interested in retrieving
the Return parameter, there is no need to use an explicit Command object.
You can pass parameters to a stored procedure using the
"procedure-as-connection-method" technique described here:
http://tinyurl.com/jyy0
http://www.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&thr eadm=O31NZa%230DHA.3436%40tk2msftngp13.phx.gbl&rnum=11&prev= /groups%3Fq%3Ddelimiter%2Bauthor:Bob%2Bauthor:Barrows%26hl%3 Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26start%3D10%26sa%3DN
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"