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
Erdinc Kolukisa
NA
113
0
combobox item adding
Jan 30 2010 6:44 AM
hey all...i have a problem when i try to add item to combobox..i have a combobox in my form which is named as cmbfirma...and i fill it with a column from my database....and i want user to add new firm if there is no exist in database...and for that i used the code below
cmd.Parameters.AddWithValue(
"@firma"
,cmbFirma.SelectedItem.ToString());
and here it writes to the database as System.Data.DataRowView...and i tried to another code below
cmd.Parameters.AddWithValue(
"@firma"
,cmbFirma.SelectedValue.ToString());
but this time it writes database normally but if i want to add new firm from txt file it gives error...and it says "
Unable to set an object reference to an instance object
"
what can i do to get rid off here ??
Reply
Answers (
3
)
How to get a control's (Button) Name
Creating the control in runtime