Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 05, 2013 02:19 AM by Decker Dong - MSFT
Jan 04, 2013 12:40 PM|LINK
i wrote a store procedure to update PAID field in tblUser, and that store proceudre works perfectly,
ALTER PROCEDURE [dbo].[submitPaypalPayment]
-- Add the parameters for the stored procedure here
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
update tblUser set paid=@payment where email = @buyer_email
-- Insert statements for procedure here
but when i call it from my asp.net app then it doesn't update Paid field, eve i tried simpe update statement in my asp.net code but that also doesn't update the field.
String userEmail_send = (Convert.ToString(Request.QueryString["emailAdmin"]));
String conString = "Data Source=COSANOSTRA; MultipleActiveResultSets=true; Initial Catalog=Waleed_orsfinal;Integrated Security=True";
if (userEmail_get.Replace("'", string.Empty) == userEmail_send.Replace("''", string.Empty))
//String query1 = "update tblUser Set paid=1 where email='" + userEmail_send + "' ";
SqlCommand sqlcom1 = new SqlCommand("submitPaypalPayment", con);
sqlcom1.CommandType = CommandType.StoredProcedure;
sqlcom1.Parameters.Add("@buyer_email", SqlDbType.VarChar).Value = userEmail_send;
sqlcom1.Parameters.Add("@payment", SqlDbType.Bit).Value= 1 ;
hdr_msg_success.InnerText = "Congrats, You have paid successfully. Wait for an approval by an admin ";
Response.Write("<br/>"+" "+ "Matched=" +userEmail_send.Replace("''","'"));
hdr_msg_success.InnerText = "Something went wrong in matching Emails , Please confirm your Email";
catch (Exception exc)
Jan 04, 2013 12:45 PM|LINK
intercept query with SqlServer Profiler. See what you send for
Jan 04, 2013 12:47 PM|LINK
sorry sir, didn't get you, elaborate li'll please,
Jan 04, 2013 12:56 PM|LINK
? help please
Jan 04, 2013 01:12 PM|LINK
Check this link
Jan 04, 2013 01:18 PM|LINK
@ Sarathi125, thanks dearm but it is a longggg procedure, and i don't have enough time to solve it , so please help me if it has any syntax problem or something.
Jan 04, 2013 01:33 PM|LINK
i tried session too
Jan 04, 2013 01:43 PM|LINK
Jan 04, 2013 02:59 PM|LINK
For Quick, to Make sure connections are there. Write a select statement and see, If it works.
Do you get any Error?
or simply it doesnot do any thing and Is it going to IF Block?
Jan 04, 2013 03:01 PM|LINK
connection works. and yes it gets to IF block, and the message which i embedded in IF block, WOrks and gets displayed but it isn't updating field.