Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
4
Answers
simple issue ? Windows forms ..
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
SUNIL GUTTA
10y
866
1
Reply
Hi
When i am trying like this :
cmd.CommandText = "select LastName,FirstName,EmailAddress,MobilePhone from contactdetails where LastName = 'gutta' "; my code executing perfect when i am giving static data like gutta ...
BUT
I am getting no error .. .. ..
when i am trying like this ..
cmd.CommandText = "select LastName,FirstName,EmailAddress,MobilePhone from contactdetails where LastName = " + textBox1.Text ;
ERROR IS :
dr = cmd.ExecuteReader(); ------------------>
Invalid column name 'gutta'.
Regards
Post
Reset
Cancel
Answers (
4
)
Next Recommended Forum
Recursive Function
C#, Restful Web Api on MVC4