ASP call Crystal and Store Procedure (1)

Source: Internet
Author: User
Tags dsn include
Come from http://support.seagatesoftware.com/

' Simplestoredprocparam.asp

<%@ language= "VBSCRIPT"%>
<title>crystal Reports ASP example-using Stored Procedure parameters</title>
<%
'==============================================================================
' WORKING with the "DESIGNER COMPONENT and ASP to use STORED procedures
' and pass VALUES to STORED PROCEDURE PARAMETERS
'==============================================================================
'
' CONCEPT
' The Application object (oapp) is needed so we can create the
' An object.
' Once we have created the "the" "The" (orpt), we can then
' Gain access to such things the ' databaseparameters '
' he said.
'
' ALWAYS REQUIRED STEPS (contained in alwaysrequiredsteps.asp)
'-Create the Application object
'-Create the ' object
'-Open the
'
' WORK with STORED PROCEDURE PARAMETERS
'-Get the "database in the"
'-Get the database ' s Stored Procedure Parameters
'-Get the specific Store Procedure Parameter
'-Save the new value to the Stored Proc Param
'
' More ALWAYS REQUIRED STEPS
'-Retrieve the records
'-Create the page engine
'
' DISPLAY the '
'-Display the using a smart viewer
' = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =



'==================================================================
'==================================================================
' ALWAYS REQUIRED STEPS
'
' Include the ' file alwaysrequiredsteps.asp which contains the code
' For steps:
'-Create the Application object
'-Create the '

%>

<%
' This is the ' the ' the ' the ' the ' the ' the ' the ' being used in this example.
' This variable are being used in the alwaysrequiredsteps.asp
' To use a different, change it here.

ReportName = "Simplestoredprocparam.rpt"

%>

<!--#include file= "alwaysrequiredsteps.asp"-->

<%
' If it is easier to understand, simply deletes the line above,
' and replace it with the entire contents of the ' file
' Alwaysrequiredsteps.asp
'==================================================================
'==================================================================
' LOG ONTO The examples sytem DSN against MS SQL SERVER ' PUBS ' SAMPLE DATABASE

UserID = "sa"
Password= ""

Session ("Orpt"). Moreprintengineerrormessages = False
Session ("Orpt"). enableparameterprompting = False

Set crtable = Session ("Orpt"). Database.Tables.Item (1)
Crtable. Setlogoninfo "Automation", "pubs", CStr (userid), CStr (Password)

' Create a System DSN called ' automation ' pointing to the ' pubs ' database on SQL Server.
' Add your database ' username and password to the simplestoredprocparam.asp page where indicated.
'==================================================================
'==================================================================
' WORK with STORED PROCEDURE PARAMETERS

'-Get the database ' s Stored Procedure Parameters
' Create a variable and point it to the Stored Procedure Parameter
' In the '

Set storedprocparamcollection = Session ("Orpt"). Parameterfields


'-Get the specific Store Procedure Parameter
' Create a variable and point it to the specific stored procedure
' That's we want to work on

Set Thisparam = Storedprocparamcollection.item (1)
Set ThisParam2 = Storedprocparamcollection.item (2)
Set ThisParam3 = Storedprocparamcollection.item (3)

'-Save the new value to the Stored Proc Param
' Create a variable and store ' the new value for the Stored Procedure
' In



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.