TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Pramod Kumar Nandagiri
NA
484
0
CODE TO INSERT DATA USING STORED PROCDEURE
Mar 21 2010 7:03 AM
con =
new
SqlConnection
(strcon);
con.Open();
cmd =
new
SqlCommand
(
"register"
,con);
cmd.CommandType =
CommandType
.StoredProcedure;
cmd.Parameters.Add((
"@FirstName //WHAT SHOULD BE WRITTEN HERE
cmd.ExecuteNonQuery();
con.Close();
hi iam isnserting data into the sql database by using the stored procdure i created stored procdure successfully in sql server but
how to write the code above is the code that i tried i think we have to write in a format lin cmd.parameters.add(----); etc
please giveme the code to insert data using the stored procdure
my stored procdure is like this
CREATE PROCEDURE
dbo.register
(
@FirstName
varchar
(50),
@LastName
varchar
(50),
@DateofBirth
datetime
,
@gender
varchar
(50) ,
@Education
varchar
(50),
@Address
varchar
(50) ,
@games
varchar
(50) ,
@hobbies
varchar
(50) ,
@emailid
varchar
(50) ,
@mobile
varchar
(50) ,
@username
varchar
(50) ,
@password
varchar
(50)
)
as
insert into
Registration(FirstName,LastName,DateofBirth,gender,Education,Address,games,hobbies,emailid,mobile,username,password)
values
(@FirstName,@LastName,@DateofBirth,@gender,@Education,@Address,@games,@hobbies,@emailid,@mobile,@username,@password);
Reply
Answers (
1
)
To reset all the textboex es on a webpage
problem with gridview_rowcommand event