| Author: Rajendra kumar Yerra 17 May 2006 | Member Level: Gold | Rating:  Points: 2 |
Hi this is sample stored procedure
create PROCEDURE [dbo].[Share_Insert] @Company varchar(50), @Share float(53), @Date datetime AS SET NOCOUNT ON
INSERT INTO [Share] ( [Company], [Share], [Date] ) VALUES ( @Company, @Share, @Date )
|
| Author: archana 17 May 2006 | Member Level: Silver | Rating:  Points: 2 |
Please refer to these link.
|
| Author: 18 May 2006 | Member Level: Gold | Rating:  Points: 2 |
consider the above stored procedure ..how to acess thru .net...
v hav to create as usal connection,command object.. SqlConnection con = new SqlConnection("Data Source=10.228.21.6;Initial Catalog=CFE_DEV;User ID=sa;PassWord=cfecmc2122@"); SqlCommand cmd = new SqlCommand(); cmd.Connection = con; cmd.CommandType = CommmandType.StoredProcedure; cmd.CommandText = "Share_Insert";//storeprocedure name cmd.parameters.add("Company","abc"); cmd.parameters.add("Share",15.25); cmd.parameters.add("Date","17/05/06"); cmd.executenonquery(); con.close();
|