Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 23rd, 2004, 02:52 PM
Registered User
 
Join Date: Jan 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to tlbacon527 Send a message via MSN to tlbacon527
Default Executing a stored procedure from ASP

Hello,
  I have been wrestling with this issue for two days and am quite unsure of where to go from here.
Here is a sample of my non-working code
---------
            Dim spConn
            Dim spComm
            set spConn = Server.CreateObject("ADODB.Connection")
            set spComm = Server.CreateObject("ADODB.Command")
            spConn.Open "Provider=SQLOLEDB.1; Data Source=xxxgnvsql; Initial Catalog=QARepositoryTest; User Id=user1; Password=password"

            spComm.ActiveConnection = spConn
            spComm.CommandType = 4
            spComm.CommandText = "GetWorkOrder"
            spComm.Parameters.Append spComm.CreateParameter
               ("workorderid", adInteger, adParamInput, 4, 5347)
            spComm.execute

-----------------
I receive the following error

ADODB.Command error '800a0bb9'

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

/practice/connect.asp, line 13
-------------
It is associated to the Parameter object being created. I set commandtype to 4 as I read it in one of books else I get an error for that if I set it equal to adCmdStorProc. Does anyone have any suggestions of something that I am just not seeing? Any help is greatly appreciated.

Thanks
Tamara
 
Old January 23rd, 2004, 03:43 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 303
Thanks: 0
Thanked 0 Times in 0 Posts
Default

(a) put <% Option Explicit %> at the top of your code
(b) In case if you have not included, include ADO Type library or ADOVBS.inc at the top of your page.

e.g.
<!-- METADATA TYPE="typelib"
    UUID="00000205-0000-0010-8000-00AA006D2EA4"
     NAME="ADO 2.5 Type Library"
-->

Chirag Shah

 
Old January 23rd, 2004, 03:50 PM
Registered User
 
Join Date: Jan 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to tlbacon527 Send a message via MSN to tlbacon527
Default

Thank you very much! That was exactly what it needed.

Tamara





Similar Threads
Thread Thread Starter Forum Replies Last Post
Executing an UPDATE Stored Procedure ashg657 Access VBA 1 June 9th, 2006 06:29 AM
working with stored procedure and asp rashoova Classic ASP Databases 0 February 1st, 2006 10:19 AM
Create and executing an oracle stored procedure Venstar Oracle 1 January 10th, 2006 05:10 AM
Executing a Stored Procedure using ASP. treadmill Classic ASP Databases 3 July 24th, 2003 04:21 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.