473,383 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Please Help me

Hi Please help me

I have an stored procedure and i have to return the record in the asp page selected in the stored procedure. and i have to print the records on the page.
see the code


create Procedure Hello
(@Compid varchar(50),@Feedback varchar(50),@CustomerName varchar(50))
As
Begin
Insert Into feedback(Compid,Feedback,CustomerName)Values(@Comp id,@Feedback,@CustomerName)
declare @Org varchar(50)
declare @Customerid varchar(50)
set @Org=(select OrgId from csm_complaint_mst where ComplaintID=@Compid and CustomerName=@CustomerName)
set @Customerid=(select CustomerId from csm_complaint_mst where ComplaintID=@Compid and CustomerName=@CustomerName)
Select Distinct Top 1 a.MailId from com_user_mst a,csm_cumapping_trans b
where a.Compid=b.CompID and a.OrgID=b.OrgID and a.roleid in ('SDE','SDM')and a.userid=b.userid
and len(a.mailid)>1 and a.OrgID= @Org and b.customerid=@Customerid

End

GO


and asp page code


<%
Const adCmdStoredProc=&H0004
Const adParamInput=&H0001
Const adParamOutput=&H0002
Const adVarchar=200


dim feedback
Dim CompRefn,use,customernam,companysumma,userad,userm aili,orgnam
CompRefn=request.querystring("CompRefno")
customernam=request.querystring("customerna")
feedback=request.querystring("options")

Dim con
Dim Obj
Dim him
Dim sql
Dim rs

Set con= Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")

Set Obj = Server.CreateObject("ADODB.Command")

con.Open "Provider=SQLOLEDB; Data Source = (local); Initial Catalog = pipl; User Id = sa; Password=sa;"

Obj.ActiveConnection = con
Obj.CommandText = "Hello"
Obj.CommandType= adCmdStoredProc


Obj.Parameters.Append Obj.CreateParameter ("@Compid", adVarChar, adParamInput, 50,CompRefn)
Obj.Parameters.Append Obj.CreateParameter ("@Feedback", adVarChar, adParamInput, 50,feedback)
Obj.Parameters.Append Obj.CreateParameter ("@CustomerName", adVarChar, adParamInput, 50,customernam)
set rs=Obj.Execute

for each x in rs.fields
him=x.field
response.write him
response.write"data"
next





set Obj=Nothing
con.Close
set con=Nothing



%>
<html>
<body></body></html?



Please help me my page is not giving errors but inserting the value in table through the stored procedure but not returning the values.
Apr 11 '08 #1
1 1160
Stang02GT
1,208 Expert 1GB
Hi Please help me

I have an stored procedure and i have to return the record in the asp page selected in the stored procedure. and i have to print the records on the page.
see the code


create Procedure Hello
(@Compid varchar(50),@Feedback varchar(50),@CustomerName varchar(50))
As
Begin
Insert Into feedback(Compid,Feedback,CustomerName)Values(@Comp id,@Feedback,@CustomerName)
declare @Org varchar(50)
declare @Customerid varchar(50)
set @Org=(select OrgId from csm_complaint_mst where ComplaintID=@Compid and CustomerName=@CustomerName)
set @Customerid=(select CustomerId from csm_complaint_mst where ComplaintID=@Compid and CustomerName=@CustomerName)
Select Distinct Top 1 a.MailId from com_user_mst a,csm_cumapping_trans b
where a.Compid=b.CompID and a.OrgID=b.OrgID and a.roleid in ('SDE','SDM')and a.userid=b.userid
and len(a.mailid)>1 and a.OrgID= @Org and b.customerid=@Customerid

End

GO


and asp page code


<%
Const adCmdStoredProc=&H0004
Const adParamInput=&H0001
Const adParamOutput=&H0002
Const adVarchar=200


dim feedback
Dim CompRefn,use,customernam,companysumma,userad,userm aili,orgnam
CompRefn=request.querystring("CompRefno")
customernam=request.querystring("customerna")
feedback=request.querystring("options")

Dim con
Dim Obj
Dim him
Dim sql
Dim rs

Set con= Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")

Set Obj = Server.CreateObject("ADODB.Command")

con.Open "Provider=SQLOLEDB; Data Source = (local); Initial Catalog = pipl; User Id = sa; Password=sa;"

Obj.ActiveConnection = con
Obj.CommandText = "Hello"
Obj.CommandType= adCmdStoredProc


Obj.Parameters.Append Obj.CreateParameter ("@Compid", adVarChar, adParamInput, 50,CompRefn)
Obj.Parameters.Append Obj.CreateParameter ("@Feedback", adVarChar, adParamInput, 50,feedback)
Obj.Parameters.Append Obj.CreateParameter ("@CustomerName", adVarChar, adParamInput, 50,customernam)
set rs=Obj.Execute

for each x in rs.fields
him=x.field
response.write him
response.write"data"
next





set Obj=Nothing
con.Close
set con=Nothing



%>
<html>
<body></body></html?



Please help me my page is not giving errors but inserting the value in table through the stored procedure but not returning the values.

Please read the posting guidelines and use [code] tags when posting code.
Apr 11 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Numberwhun | last post by:
Hello everyone! I am trying to learn java and have run into kind of a snag. Here is the code that I have so far: ------ <begin_code> ---------- import javax.swing.*; import...
1
by: HolaGoogle | last post by:
Hi all, Please help me with the following..it's realy urgent and i tried everything i could and i can't get it work properly!! Thanks in advance. Here's what i'm trying to accomplish: in my...
0
by: s_erez | last post by:
Hi, This is a realy tricky one. I have an ASP.NET application where some pages are reading data from a DB and presenting reports. In order for the user to wait while the page is reading data from...
2
by: rked | last post by:
I get nameSPAN1 is undefined when I place cursor in comments box.. <%@ LANGUAGE="VBScript" %> <% DIM ipAddress ipAddress=Request.Servervariables("REMOTE_HOST") %> <html> <head> <meta...
7
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: {////<<head> <title>IIBO Submit Page</title>...
4
by: pshindle | last post by:
DB2 Team - I just downloaded and unzipped the new Fixpack 9 for DB2 ESE V8 for Windows (FP9_WR21350_ESE.exe). I then burned the unzipped Fixpack files to a CD. I proceded to install this...
23
by: Jason | last post by:
Hi, I was wondering if any could point me to an example or give me ideas on how to dynamically create a form based on a database table? So, I would have a table designed to tell my application...
1
PEB
by: PEB | last post by:
POSTING GUIDELINES Please follow these guidelines when posting questions Post your question in a relevant forum Do NOT PM questions to individual experts - This is not fair on them and...
4
by: fatboySudsy | last post by:
Hi, I have constructed a client program that has given me some error codes that i just cannot see. I was wondering if a different set of eyes with much more experience than me could help me out. ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.