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 October 6th, 2004, 05:32 PM
Registered User
 
Join Date: Oct 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Retreive records from the database using SP

I am using SQL Server 2K and trying to retrieve a record using ASP to be displayed in my HTML page - but I am not able to dsiplay records. No error message too.
Here is the code snippet
Call objData.ClearParameters()
    call objData.addParameters "@ASP_NAME",advarChar,adParamInput,25, strBrand)
    arrRs = objData.ExecuteSP("SP_DISPLAY_MODELCOMP") '' this SP displays the contents for this Page
    If IsObject(arrRs(0)) Then
        strModel = arrRs(0)("MM.FFSL04_VEH_MKMODL_NAME_N")
    Else
        strModel = ""
    End if
    Response.Write strModel
    If IsObject(arrRs(0)) Then Set arrRs(0)=nothing

Any help will be great.
Thanks
Sri

 
Old October 6th, 2004, 05:36 PM
Registered User
 
Join Date: Oct 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This line is corrected in the code:
call objData.addParameters ("@ASP_NAME",advarChar,adParamInput,25, strBrand)







Similar Threads
Thread Thread Starter Forum Replies Last Post
retreive data from database eugz Beginning PHP 2 February 15th, 2006 08:45 PM
How to retreive an image from database lovelyphor ADO.NET 2 October 18th, 2004 05:43 AM
Can not retreive data from database eliea ASP.NET 1.0 and 1.1 Basics 3 July 24th, 2003 04:35 AM
Can a SP run another SP as sa? dbradley SQL Server 2000 0 July 17th, 2003 08:35 AM





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