SQL Server :: Want The User To Be Able To Select, Update, Delete, Add Data As Well As Execute Stored Procedures?
Aug 16, 2010
I have built a web app and want the user to be able to select, update, delete, add data as well as execute stored procedures, I thought that I would get this from the db_datareader and db_datawriter roles but I get an error when trying to select data etcFor instance I get an error when trying to run the stored procedure ups_AddCustomer when the user has the assigned roles db_datareader & db_datawriter but it works fine when the db_dbowner but i would rather not have the page user having full access to the database.
View 1 Replies
Similar Messages:
Jan 8, 2011
i have a gridview and the delete option.
when i press delete button i want to run my stored procedure which requires an input variable. how can i do this?
View 1 Replies
Apr 10, 2010
we have sql server running on a server.
when person A connects to sql server from their machine and executes a stored procedure (a stored procedure which runs a query and sends an email) - it executes and the email is received.
when person B connects to sql server from their machine and executes the same stored procedure, it executes but the email is never received.
does this mean the stored procedure is executing locally on both users machines?
if not....then why does person B's execution of the stored procedure not generate the email?
View 2 Replies
Mar 30, 2010
In a pickel here. When I run this code:
[code]...
The only Stored procedure execute is the last one TSD_UpdateTimeCardEndofDay
View 3 Replies
Dec 10, 2010
i want to know how to call stored procedure in entity framework. how to do code with controller class and with model.
i mean if i want to call insert,update,select,delete stored procedure for entity framework then what are stps i have to follow.
View 2 Replies
Feb 25, 2016
I have a table and i want to use this table in asp.net page
how i will call the stored procedure on the basis
of Stored procedure's Action .
CREATE TABLE Std_Enquiry(
StdID int IDENTITY(1,1) PRIMARY KEY CLUSTERED ,
FirstName varchar(50) ,
LastName varchar(50) ,
[Code].....
View 1 Replies
Feb 2, 2011
I need to retrieve data from a stored procedure, but not from a reader. I need to insert and read to see if there is an error code returned so I can Display It
[Code]....
This inserts data into a stored procedure, since I have a promotion going on, I want to check to see if anyone has tried to create several accounts to try to be Customer #100 or so on, I have achieved this in the procedure, and set RETURN @ErrorCode = 1
Have I Set up the SqlParameter Correctly, or do I now have to declare a direction for each parameter?
I have had problems reading from Stored Procedures and Tutorials Seam Straightforward, but thay are about readers only not Input Output
View 3 Replies
Jun 9, 2010
I like to use my own stored procs as much as possible.
That way I know exactly what's happening and I can explain and control things.
I'm using stored procs with LINQ to SQL for CRUD operations.
For select, insert and delete - using stored procs with LINQ to SQL is pretty straightforward.
However, if I want to use my own custom stored procs with L2S for updates what's the best way to accomplish this?
Can you provide some code that shows the best approach that you would personally choose for this?
View 1 Replies
Mar 10, 2011
I am looking through a sql stored procedure which I might need to update in the near future. Basically the stored procedure is about 20 lines long. The stored procedure first builds a query
and stores it in a variable named "@Sql". And then for the last two lines of the stored procedure it appears that the big sql statement stored in "@Sql" is executed by using the "EXEC" command. See below. What is confusing though is that the query appears to be exectuted twice? Why was the query written in this way. Don't both lines do the same thing? Why is it being done twice? Could this possibly be a mistake on the
part of the person who wrote the query. Below are the two lines I am talking about?
EXEC sp_executesql @sql
EXEC (@sql)
View 4 Replies
Oct 7, 2010
I need to execute a stored procedure which is a simple delete (record) query. Programmaticaly, I want to pass in a parameter "ID1".
Assume I will pass in the ID1 parameter on a delete link click event froma GridView control. What would the code be to execute the existing stored procedure?
ID1 - the parameter and primary key of the source database for the record to be deleted
GridView1 - the GridView control
spDeleteRecord - the stored procedure needing the parameter ID1 and to be executed from C# code
DeleteTableAdapter - an existing TableAdapter for the existing
Here's my start:
[code].....
View 5 Replies
Sep 14, 2010
I created a ListView and attempted to delete a record using the delete button and native procedures. It failed and threw an error.Pass in a valid dictionary for delete or change your mode to OverwriteChangesIn researching this issue, it appeared there is a problem with the list view when deleteing and
ConflictDetection is set to
[Code]....
[Code]....
[Code]....
[Code]....
[Code]....
[Code]....
[Code]....
[Code]....
[Code]....
View 1 Replies
Nov 18, 2010
I've been working on an upgrade for an app that's currently online.
I copied the database to my development server, have been making upgrades to the db (new tables, additional stored procedures, functions, etc). The new upgraded db is now complete and ready to go back online. I developed a script for all the new tables as I created them.
Basically this new db will go with the new upgraded app at a new domain.
So my plan is this...
Copy my existing db (the original) over to the new server.Run the script I developed on my development server to upgrade the new db to the latest version. Take the original db offline once the new one is running. However when I developed the new sps and fcns I didn't script them like I did for the tables (ooops! not thinking), and I have about 100 new sps. Is there anyway to script all the sps in one hit, so that I can run one script to upgrade the new db?
Or do I have to script them individually?
View 2 Replies
Oct 13, 2010
How to write Stored Procedure for Insert Data & Execute it in MS SQL?
Some websites:
[URL]
View 4 Replies
Jan 27, 2010
I'm totally new to MVC (started this morning), and am totally at a loss where to start. I need to rebuild an existing website. I already have a SQL Server 2005 database with tables and stored procedures. In the old version of the website, I built a function to call stored procedures and return the results as a datareader in VB.Net.
I want to use ASP.NET MVC with C#.
The first question I have is: Where would I put the code for the function that calls stored procedures ?
My second question is: Where do I go from there? I just need to get a sense of the basic way to handle presenting a dynamic website. I just want to start out with a Site.Master and display my menus which need to be generated dynamically from my database. I've been googling all day and I haven't really found any posts which answer all of my questions.
View 4 Replies
Mar 24, 2011
How to debug queries and stored procedures in sql server 2008 like we doing in vs
View 1 Replies
Dec 20, 2010
I am trying to insert some data into a table and update another table using the same stored procedure but it doesn't work.
ALTER PROCEDURE dbo.new_suppliers_orders_add_products
@SupplierOrderID int,
@ProductID int,
@OrderQuantity int,
@NewOrderQuantity int
AS
INSERT INTO SupplierOrderLine(SupplierOrderID, ProductID, OrderQuantity) VALUES (@SupplierOrderID,@ProductID, @OrderQuantity)
UPDATE Products SET QuantityOnOrder = @NewOrderQuantity WHERE ProductID=@ProductID
RETURN
Is it any way it can be done or I need to use two separate stored procedures?
View 7 Replies
Aug 13, 2010
how to return list of values(single column values) from stored procedures in sqlserver 2005?
View 4 Replies
Mar 16, 2011
I have never used stored proc ouput parameters i want to know what is the use of using output parameters?If possible provide me some code.
View 10 Replies
Dec 12, 2010
how to pass the in out parameters in stored procedures
and how to execute it??
View 10 Replies
Oct 5, 2012
I use below store procedure that don't allow insert duplicate data in database in code column
ALTER procedure [dbo].[insertestate1]
@position nvarchar(max)
,@Transfer nvarchar(20)
,@Type nvarchar(20)
,@Behcode nvarchar(10)
[Code] ....
And this is my other SP that I define Condition ,and according to that condition it update or insert data in database
USE [behtop]
GO
/****** Object: StoredProcedure [dbo].[insertestate] Script Date: 10/04/2012 11:36:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[insertestate]
[Code] ....
In first SP @code parameter is column in table that I don't want accept duplicate value and condition of that is:
IF NOT EXISTS(SELECT behcode FROM Estate_p WHERE code = @code)
And in second SP I have @code parameter that I don't want it insert duplicate data on it too. But here condition is
IF @id > 0 AND EXISTS(SELECT behcode FROM Estate_p WHERE id=@id)
Now I want merge two SP .. How I can do it?
View 1 Replies
Mar 29, 2013
I have a student data, when I put the student id in textbox, it show the students mark in gridview like
1st semester marks in first row , 2nd semester marks in second row ,etc
and i want insert 3rd semester marks , 4th semester marks for the particular student , and also , delete , update in gridview....
View 1 Replies
May 6, 2010
Can this be done?
View 4 Replies
Jul 21, 2010
I have a gridview with edit,update and delete options..Using a radiobutton,how it is possible to select a particular row of gridview and update or delete that particular row?
View 3 Replies
Dec 11, 2010
Informative link for the complete tutorial about how to write stored procedure in sql server 2008and how to call it at runtime on button event generation on website page..
View 7 Replies
May 13, 2010
I have access to two servers, one with my development database on, and another with the live database on.
All SQL Stored Procedures, Functions, Views are encrypted on the live database (using WITH ENCRYPTION in my query)
However I'm concerned I might accidentally encrypt a bunch of SProcs on my development database meaning I can no longer view/edit that code.
I have full control over the server and database, and was wondering if there is a way I can prevent these from being encrypted, therefore throwing up an error when this is attempted?
View 4 Replies