Forums
This topic is locked
Stored Procedure Problem
Posted 12 Nov 2001 23:18:09
1
has voted
12 Nov 2001 23:18:09 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"



Dim cmdFallOne__EventTime
cmdFallOne__EventTime = ""
if(Request("EventTime"



Dim cmdFallOne__PersonReporting
cmdFallOne__PersonReporting = ""
if(Request("PersonReporting"



Dim cmdFallOne__TitleCode
cmdFallOne__TitleCode = ""
if(Request("TitleCode"



Dim cmdFallOne__LocationCode
cmdFallOne__LocationCode = ""
if(Request("LocationCode"



Dim cmdFallOne__PhysicianNameCode
cmdFallOne__PhysicianNameCode = ""
if(Request("PhysicianNameCode"



Dim cmdFallOne__SubjectTypeCode
cmdFallOne__SubjectTypeCode = ""
if(Request("SubjectTypeCode"



Dim cmdFallOne__SubjectFirstName
cmdFallOne__SubjectFirstName = ""
if(Request("SubjectFirstName"



Dim cmdFallOne__SubjectMiddleName
cmdFallOne__SubjectMiddleName = ""
if(Request("SubjectMiddleName"



Dim cmdFallOne__SubjectLastName
cmdFallOne__SubjectLastName = ""
if(Request("SubjectLastName"



Dim cmdFallOne__SubjectSuffixCode
cmdFallOne__SubjectSuffixCode = ""
if(Request("SubjectSuffixCode"



Dim cmdFallOne__SubjectGenderCode
cmdFallOne__SubjectGenderCode = ""
if(Request("SubjectGenderCode"



Dim cmdFallOne__bSubjectAgeInMonths
cmdFallOne__bSubjectAgeInMonths = ""
if(Request("bSubjectAgeInMonths"



Dim cmdFallOne__SubjectAge
cmdFallOne__SubjectAge = ""
if(Request("SubjectAge"



Dim cmdFallOne__AccountNumber
cmdFallOne__AccountNumber = ""
if(Request("AccountNumber"



Dim cmdFallOne__EventTypeCode
cmdFallOne__EventTypeCode = ""
if(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>
Replies
Replied 13 Nov 2001 16:44:40
13 Nov 2001 16:44:40 Joel Martinez replied:
well, the first thing I have to ask, is "What HTTP Error message?" show us the text from the browser.
but before you post again... see if putting this line just under the "<%@LANGUAGE="VBSCRIPT"%>" will work:
<%response.buffer=true%>
That will make the server not send any html to the browser until it's done, this solves lots of http issues.
if not, post back with the error.
Joel Martinez [ ]
----------
E-Commerce Concepts with Ultradev...pre-order yours at
www.basic-ultradev.com/ecomm_concepts/
but before you post again... see if putting this line just under the "<%@LANGUAGE="VBSCRIPT"%>" will work:
<%response.buffer=true%>
That will make the server not send any html to the browser until it's done, this solves lots of http issues.
if not, post back with the error.
Joel Martinez [ ]
----------
E-Commerce Concepts with Ultradev...pre-order yours at
www.basic-ultradev.com/ecomm_concepts/