Hi,
Im using stored procedure to update data. but the problem is after click update there is no change.
can anyone check this stored procedure and tell what s the problem. - CREATE PROCEDURE UpdateTicket
-
-
@TicID int = '',
-
-- @TicDate datetime = '',
-
@TicCreateBy varchar(50) ='',
-
@TicCustomer varchar(50) ='',
-
@TicOwner varchar(50) ='',
-
@TicIssueType varchar(50) ='',
-
@TicIssue varchar(100) ='',
-
@TicStatus varchar(50) = '',
-
-- @TicStatusID varchar(10) = '',
-
@TicPriorityID varchar(4) = '',
-
@TicPriority varchar(50) ='',
-
@TicAction varchar(500)=''
-
-
AS
-
-
UPDATE Ticket
-
-
SET
-
-
--TicDate=@TicDate,
-
TicCreateBy=@TicCreateBy,
-
TicCustomer=@TicCustomer,
-
TicOwner=@TicOwner,
-
TicIssueType=@TicIssueType,
-
TicIssue=@TicIssue,
-
TicStatus=@TicStatus,
-
--TicStatusID=@TicStatusID,
-
TicPriorityID=@TicPriorityID,
-
TicPriority=@TicPriority,
-
TicAction=@TicAction
-
-
WHERE TicID=@TicID
-
GO
thank you.
Meshack
2 1113
Do you get any error messages?
There could be several reasons why the update may not be happening. You have to provide more details. How are are you calling the stored procedure?
Do you get any error messages?
There could be several reasons why the update may not be happening. You have to provide more details. How are are you calling the stored procedure?
Hi,
Thanks. There is no error showing. But when I click the update button there is no update happens.
Here is the method for calling the stored procedure: - protected void btnUpdate_Click(object sender, EventArgs e)
-
{
-
System.Data.SqlClient.SqlConnection conn = new SqlConnection("Data Source=(local);Initial Catalog=DBhelpdesk; Integrated Security=SSPI;");
-
conn.Open();
-
System.Data.SqlClient.SqlCommand comm = new SqlCommand("UpdateTicket", conn);
-
comm.CommandType = CommandType.StoredProcedure;
-
-
//string sUserName = Request.Cookies["UserName"].Value;
-
-
//comm.Parameters.AddWithValue("@TicDate", Convert.ToDateTime(lbTimeDate.Text));
-
comm.Parameters.AddWithValue("@TicCreateBy", tbCreateBy.Text);
-
comm.Parameters.AddWithValue("@TicCustomer", tbCustomer.Text);
-
comm.Parameters.AddWithValue("@TicOwner", lblOwner.Text);
-
comm.Parameters.AddWithValue("@TicIssueType", ddlIssue.Text);
-
comm.Parameters.AddWithValue("@TicIssue", tbIssue.Text);
-
comm.Parameters.AddWithValue("@TicStatus", ddlStatus.Text);
-
comm.Parameters.AddWithValue("@TicPriorityID", lblPriorityID.Text);
-
comm.Parameters.AddWithValue("@TicPriority", ddlPriority.Text);
-
comm.Parameters.AddWithValue("@TicAction", tbAction.Text);
-
comm.ExecuteNonQuery();
-
//Response.Write("The Data Have Been Add To Database.");
-
//lblRecordV.Text = "The data have been updated to database!";
-
conn.Close();
-
Response.Redirect("Dashboard2.aspx");
-
}
Im doing update in panel. Start from the gridview, when click edit hyperlink field, it will show the update panel.
Here the panel and form code:
Thank you for your help.
Meshack.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: dinesh prasad |
last post by:
I'm trying to use a servlet to process a form, then send that data to
an SQL server stored procedure. I'm using the WebLogic 8 App. server.
I am able to retrieve database information, so I know my...
|
by: aaj |
last post by:
SQL SERVER 2000
Hi all
This is my first attempt at writing a stored procedure. I have managed to
get it working but its unlikely to be the best way of handling the problem.
While writing it I...
|
by: Ralph Cramden |
last post by:
I'm writing a VB6 app which calls several stored procedures on my SQL
Server DB.
The first stored procedure must complete its inserts before the second
stored procedure can query the modified...
|
by: bajwa |
last post by:
Hi
Our SQL server has a lot of stored procedures and we want to get some
cleaning up to be done. We want to delete the ones that have been not
run for like 2-3 months. How exactly will i find out...
|
by: Anthony Robinson |
last post by:
I'm executing a stored procedure and getting the
SQL0440N No authorized routine named
"AMROBI2.CREATEAIMCONNECTION" of type "PROCEDURE
" having compatible arguments was found.
The schema...
|
by: Rhino |
last post by:
Is it possible for a Java Stored Procedure in DB2 V7.2 (Windows) to pass a
Throwable back to the calling program as an OUT parameter?
If yes, what datatype should I use when registering the...
|
by: Andy G |
last post by:
I have a registration page that captures 75% of the users data. After they
enter that info they are redirected to one of two pages depending on how
they answered a question on the registation...
|
by: Crazy Cat |
last post by:
Using Visual Basic .NET and SQL Server 2005
I attempt to add a query that is a call to a stored procedure in the
DataSet Designer.
The TableAdapter Query Configuration wizard finds my stored...
|
by: DR |
last post by:
I heard there is some trick to referencing statics in C# CLR stored
procedure without having to mark the assembly as unsafe. Does anyone know
this? This is usefull as the case of needing a little...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
| |