View Complete Post
I have a table in SQL where I insert data (CatCodes) using C# code but I want to insert ID code (DealerID) with it as well. Following is my Stored Procedure and C# code:
-- Add the parameters for the stored procedure here
@DealerID int OUTPUT
SET NOCOUNT ON
INSERT INTO [tblDealers] ([UserId], [Title], [FirstName], [LastName], [CompanyName], )
VALUES (@UserId, @Title, @FirstName, @LastName, @CompanyName, @Email)
select @DealerID = SCOPE_IDENTITY()
protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
//Insert membership and personal data
TextBox UserNameTextBox = (TextBox)CreateUserWizardStep1.ContentTemplateContainer.FindControl("UserName");
SqlDataSource DataSource = (SqlDataSource)CreateUserWizardStep1.ContentTemplateContainer.FindControl("InsertExtraInfo");
I need your help. Imagine that I have two tables:
Supose that my tables could be differnced by a number 1 is for ALUMN and 2 is for SPORT.
And the columns of each table too. So 1 is for IdAlumn, 2 is for Name and 3 is for Address. 1 is for IdSport, 2 is for Name 3 is for Players and 4 is for Description.
For example the combination of table 2 and column 3 is SPORT-Players.
Then I want to do an stored procedure that receives two parameters (the table, the column) @tab and&
I have a function called F_TBL_VALS_FROM_STRING this function returns a table and uses '|' as a delimiter to distinguish between values.
this function is used in a procedure (bellow), while I've tested this function and it returns the requested values, using it in this stored procedure does not work.
ALTER PROCEDURE dbo.mytestproc
I see that after a call to my stored procedure I am jumping into a trigger while trying to insert rows. How do I see what SELECT * FROM INSERTED is or what is in other tables while I am debugging my stored procedure. (I know I can put SELECT * FROM INSERTED
into my trigger, etc. but I am looking to be able to debug my stored procedure without changing anything except things in my debug environment.
in my windows application i used a dataset and populated it with tables by dragging tables from server explorer, and for each table's table adapter i added four stored procedures that i have created in sql server while dataset generator generates insert,
update , select , delete commands for each table adapter. i want to know whick one is better, using stored procedure or using dataset generated commands?
tanks in advance
Hi!! I need your help again.
I have a gridview with a button in the first column of the footer row and some controls (textbox, dropdowlist...) in the rest of the columns. I want to click that button and insert into a database table using an stored procedure the text properties of the controls in the other columns.
I don't know what's wrong... could you help me or post me a link to read it??
I'm setting the insert command with my stored procedure, I'm setting the storedprocedure as the insertcommandtype, I'm able to load the controls with correct values, but finally when I click the insert button that's not work!!!!