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
Goran Bibic
482
2.9k
195.4k
Get value with reader from another form c#
May 24 2018 3:00 AM
Need string to label
InitializeComponent();
korisnickoImeLabel.Text = getKorisnickoIme();
What I wrong?
Query is ok
private
String getKorisnickoIme()
{
SqlConnection myConnection =
new
SqlConnection(cs);
String value =
"SELECT ime_prezime FROM osobe_korisnici WHERE id='"
+ korisnikId +
"'"
;
SqlCommand cmd =
new
SqlCommand(value, myConnection);
myConnection.Open();
SqlDataReader rdr = cmd.ExecuteReader();
return
value;
}
Result in label is
SELECT ime_prezime FROM osobe_korisnici WHERE
id='10'
id is 10, but I need to write in label name and surname for user (
ime_prezime
)
Reply
Answers (
3
)
Convert PDF to Word using C# for winform
The remote server returned an error: (500) Internal Server