Wednesday, March 7, 2012

Inserting values Using Stored Procedure

Hi !
Iam working in asp.net in Visual Studio 2005. I tried to insert some datas from the webform's interfaces into the SQL Server 05 database using a stored procedure. Since iam new to asp.net,im confused wheather to use any command or anything else ? Kindly Help me !You can either directly execute the text command or can execute the same through a procedure.For that u need to write stored procedure in database. If you know that then go for it. But for that u need some extra coding in the front end. But performance wise using a stored procedure is better.|||

Quote:

Originally Posted by debasisdas

You can either directly execute the text command or can execute the same through a procedure.For that u need to write stored procedure in database. If you know that then go for it. But for that u need some extra coding in the front end. But performance wise using a stored procedure is better.


Can you give me some sample coding !|||

Quote:

Originally Posted by hellboss

Can you give me some sample coding !


The stored procedures is as follows

CREATE PROCEDURE TEST
@.field1 nvarchar(50),
@.field2 numeric(10)
AS
BEGIN
INSERT INTO TABLE1 (field1,field2) VALUES (@.field1,@.field2)
END

Hope this helps.

Thanks,

No comments:

Post a Comment