Forums

This topic is locked

Stored Procedure Problem

Posted 12 Nov 2001 23:16:55
1
has voted
12 Nov 2001 23:16:55 Clay Dempsey posted:
Hello All,

I have recently been handed this HUGE SQL Server database and been told to make it a web application. The database operates with many stored procedures, so nailing down how to work with one should give way for the rest. What I have done here is pass the form values to a page that will take those values and use them in the Stored Procedure for the save, but I am getting an http error when the page runs. Can someone please tell me where I am going wrong?

Thank You In Advance

<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../Connections/connPSR.asp" -->

<%
Dim EventDate
EventDate=Request.Form("EventDate"
Dim EventTime
EventTime=Request.Form("EventTime"
Dim EventTypeCode
EventTypeCode=Request.Form("EventTypeCode"
Dim PersonReporting
PersonReporting=Request.Form("PersonReporting"
Dim TitleCode
TitleCode=Request.Form("TitleCode"
Dim LocationCode
LocationCode=Request.Form("LocationCode"
Dim PhysicianNameCode
PhysicianNameCode=Request.Form("PhysicianNameCode"
Dim SubjectTypeCode
SubjectTypeCode=Request.Form("SubjectTypeCode"
Dim SubjectGenderCode
SubjectGenderCode=Request.Form("SubjectGenderCode"
Dim SubjectFirstName
SubjectFirstName=Request.Form("SubjectFirstName"
Dim SubjectMiddleName
SubjectMiddleName=Request.Form("SubjectMiddleName"
Dim SubjectLastName
SubjectLastName=Request.Form("SubjectLastName"
Dim SubjectSuffixCode
SubjectSuffixCode=Request.Form("SubjectSuffixCode"
Dim SubjectAge
SubjectAge=Request.Form("SubjectAge"
Dim bSubjectAgeInMonths
bSubjectAgeInMonths=Request.Form("bSubjectAgeInMonths"
Dim AccountNumber
AccountNumber=Request.Form("AccountNumber"
%>

<%

Dim cmdFallOne__EventDate
cmdFallOne__EventDate = ""
if(Request("EventDate" <> "" then cmdFallOne__EventDate = Request("EventDate"

Dim cmdFallOne__EventTime
cmdFallOne__EventTime = ""
if(Request("EventTime" <> "" then cmdFallOne__EventTime = Request("EventTime"

Dim cmdFallOne__PersonReporting
cmdFallOne__PersonReporting = ""
if(Request("PersonReporting" <> "" then cmdFallOne__PersonReporting = Request("PersonReporting"

Dim cmdFallOne__TitleCode
cmdFallOne__TitleCode = ""
if(Request("TitleCode" <> "" then cmdFallOne__TitleCode = Request("TitleCode"

Dim cmdFallOne__LocationCode
cmdFallOne__LocationCode = ""
if(Request("LocationCode" <> "" then cmdFallOne__LocationCode = Request("LocationCode"

Dim cmdFallOne__PhysicianNameCode
cmdFallOne__PhysicianNameCode = ""
if(Request("PhysicianNameCode" <> "" then cmdFallOne__PhysicianNameCode = Request("PhysicianNameCode"

Dim cmdFallOne__SubjectTypeCode
cmdFallOne__SubjectTypeCode = ""
if(Request("SubjectTypeCode" <> "" then cmdFallOne__SubjectTypeCode = Request("SubjectTypeCode"

Dim cmdFallOne__SubjectFirstName
cmdFallOne__SubjectFirstName = ""
if(Request("SubjectFirstName" <> "" then cmdFallOne__SubjectFirstName = Request("SubjectFirstName"

Dim cmdFallOne__SubjectMiddleName
cmdFallOne__SubjectMiddleName = ""
if(Request("SubjectMiddleName" <> "" then cmdFallOne__SubjectMiddleName = Request("SubjectMiddleName"

Dim cmdFallOne__SubjectLastName
cmdFallOne__SubjectLastName = ""
if(Request("SubjectLastName" <> "" then cmdFallOne__SubjectLastName = Request("SubjectLastName"

Dim cmdFallOne__SubjectSuffixCode
cmdFallOne__SubjectSuffixCode = ""
if(Request("SubjectSuffixCode" <> "" then cmdFallOne__SubjectSuffixCode = Request("SubjectSuffixCode"

Dim cmdFallOne__SubjectGenderCode
cmdFallOne__SubjectGenderCode = ""
if(Request("SubjectGenderCode" <> "" then cmdFallOne__SubjectGenderCode = Request("SubjectGenderCode"

Dim cmdFallOne__bSubjectAgeInMonths
cmdFallOne__bSubjectAgeInMonths = ""
if(Request("bSubjectAgeInMonths" <> "" then cmdFallOne__bSubjectAgeInMonths = Request("bSubjectAgeInMonths"

Dim cmdFallOne__SubjectAge
cmdFallOne__SubjectAge = ""
if(Request("SubjectAge" <> "" then cmdFallOne__SubjectAge = Request("SubjectAge"

Dim cmdFallOne__AccountNumber
cmdFallOne__AccountNumber = ""
if(Request("AccountNumber" <> "" then cmdFallOne__AccountNumber = Request("AccountNumber"

Dim cmdFallOne__EventTypeCode
cmdFallOne__EventTypeCode = ""
if(Request("EventTypeCode" <> "" then cmdFallOne__EventTypeCode = Request("EventTypeCode"

%>
<%

set cmdFallOne = Server.CreateObject("ADODB.Command"
cmdFallOne.ActiveConnection = MM_connPSR_STRING
cmdFallOne.CommandText = "dbo.spSav_Event_UserMain"
cmdFallOne.CommandType = 4
cmdFallOne.CommandTimeout = 0
cmdFallOne.Prepared = true
cmdFallOne.Parameters.Append cmdFallOne.CreateParameter("@RETURN_VALUE", 3, 4)
cmdFallOne.Parameters.Append cmdFallOne.CreateParameter("@UEID", 3, 2)
cmdFallOne.Parameters.Append cmdFallOne.CreateParameter("@EventDate", 135, 1,4,cmdFallOne__EventDate)
cmdFallOne.Parameters.Append cmdFallOne.CreateParameter("@EventTime", 135, 1,4,cmdFallOne__EventTime)
cmdFallOne.Parameters.Append cmdFallOne.CreateParameter("@PersonReporting", 200, 1,60,cmdFallOne__PersonReporting)
cmdFallOne.Parameters.Append cmdFallOne.CreateParameter("@TitleCode", 3, 1,4,cmdFallOne__TitleCode)
cmdFallOne.Parameters.Append cmdFallOne.CreateParameter("@LocationCode", 3, 1,4,cmdFallOne__LocationCode)
cmdFallOne.Parameters.Append cmdFallOne.CreateParameter("@PhysicianNameCode", 3, 1,4,cmdFallOne__PhysicianNameCode)
cmdFallOne.Parameters.Append cmdFallOne.CreateParameter("@SubjectTypeCode", 3, 1,4,cmdFallOne__SubjectTypeCode)
cmdFallOne.Parameters.Append cmdFallOne.CreateParameter("@SubjectFirstName", 200, 1,30,cmdFallOne__SubjectFirstName)
cmdFallOne.Parameters.Append cmdFallOne.CreateParameter("@SubjectMiddleName", 200, 1,30,cmdFallOne__SubjectMiddleName)
cmdFallOne.Parameters.Append cmdFallOne.CreateParameter("@SubjectLastName", 200, 1,30,cmdFallOne__SubjectLastName)
cmdFallOne.Parameters.Append cmdFallOne.CreateParameter("@SubjectSuffixCode", 16, 1,1,cmdFallOne__SubjectSuffixCode)
cmdFallOne.Parameters.Append cmdFallOne.CreateParameter("@SubjectGenderCode", 16, 1,1,cmdFallOne__SubjectGenderCode)
cmdFallOne.Parameters.Append cmdFallOne.CreateParameter("@bSubjectAgeInMonths", 901, 1,1,cmdFallOne__bSubjectAgeInMonths)
cmdFallOne.Parameters.Append cmdFallOne.CreateParameter("@SubjectAge", 16, 1,1,cmdFallOne__SubjectAge)
cmdFallOne.Parameters.Append cmdFallOne.CreateParameter("@AccountNumber", 131, 1,9(10,0),cmdFallOne__AccountNumber)
cmdFallOne.Parameters.Append cmdFallOne.CreateParameter("@EventTypeCode", 16, 1,1,cmdFallOne__EventTypeCode)
cmdFallOne.Execute()

%>

<html>
<head>
</head>
<body>
</body>
</html>


Reply to this topic