Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 23rd, 2004, 02:52 PM
Registered User
 
Join Date: Jan 2004
Location: Gainesville, fl, .
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
Reply With Quote
  #2 (permalink)  
Old January 23rd, 2004, 03:43 PM
Friend of Wrox
 
Join Date: Jan 2004
Location: , , USA.
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

Reply With Quote
  #3 (permalink)  
Old January 23rd, 2004, 03:50 PM
Registered User
 
Join Date: Jan 2004
Location: Gainesville, fl, .
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 07:47 AM.


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