Viewing 11 posts - 1 through 11 (of 11 total)
GilaMonster (3/18/2014)
So, if the user selects all 25 columns one by one, then you want to have 25 separate rows in the database table, each with a...
March 18, 2014 at 5:51 am
Wenn I click the item 'User Name' from the listbox(assigned to the Textbox), I want to insert a value into the 'user_name' column in the DB. That's all. I have...
March 18, 2014 at 4:27 am
use env
go
create proc [SP$insert2](
@p1 nvarchar(100),
@p2 nvarchar(100),
@id int output
)
as
begin
set nocount on
INSERT INTO env.dbo.Base(user_name) VALUES (@p1)
SELECT @id = SCOPE_IDENTITY()
SELECT @p2
WHERE @p2 = 'User Name'
INSERT INTO env.dbo.Base(ser_num) VALUES (@p1)
SELECT @id=...
March 18, 2014 at 4:07 am
GilaMonster (3/17/2014)
And when you run the proc from SQL as I suggested?Those are compile-time warnings, not interested in compile-time messages, interested in the run-time errors (if any) from SQL Server.
That's...
March 18, 2014 at 1:53 am
Sean Lange (3/17/2014)
create proc [SP$insert]
(
@p1 nvarchar(100),
@p2 nvarchar(100),
@id int output
)
as
set nocount on
select @p2...
March 18, 2014 at 1:36 am
Sean Lange (3/17/2014)
altana (3/17/2014)
It still works same.
How do you know that the users are entering the right values in your textbox?
Your C# code is passing the value from a textbox...
March 17, 2014 at 9:45 am
GilaMonster (3/17/2014)
Also try running the stored proc...
March 17, 2014 at 9:34 am
GilaMonster (3/17/2014)
What error are you getting?
Nothing. The message is 'Inserted' but any values can be inserted.
March 17, 2014 at 8:31 am
GilaMonster (3/17/2014)
What errors are you getting?p.s. A catch block which just discards the error is not exactly good coding practice.
I doesn't give any error. The message is 'Inserted' but the...
March 17, 2014 at 7:59 am
Adi Cohn-120898 (3/17/2014)
Could be that you had the wrong value in @p2, so the flow did not get inside the if statement.Adi
No, it's the right value. Wenn I insert only...
March 17, 2014 at 7:58 am
Viewing 11 posts - 1 through 11 (of 11 total)