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
Gurjeet Singh
NA
90
95k
stored procedure
Jan 16 2013 7:16 AM
sir,
I am taking value from textbox1 and trying to pass that value to stored procedure. but while creating stored procedure I am getting below error
Msg 102, Level 15, State 1, Procedure proc_1, Line 8
Incorrect syntax near '@name'.
in c#
string nam = " and city='" + textbox1.Text + "'";
cmd.Parameters.AddWithValue("
@name
", nam );
create procedure proc_1
(
@name varchar (max)
)
as
begin
select [country] from table_name where city='delhi'
@name
end
please let me know, how can I insert the textbox1 value into @name variable
Reply
Answers (
31
)
How to send email through Asp .net email id get from excel ?
adding query and transferring view to other view