Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
QuestionDefine me a practice please! Pin
mehrdadc4830-Jan-10 1:38
mehrdadc4830-Jan-10 1:38 
AnswerRe: Define me a practice please! Pin
Pete O'Hanlon30-Jan-10 2:00
mvePete O'Hanlon30-Jan-10 2:00 
GeneralRe: Define me a practice please! Pin
mehrdadc4830-Jan-10 2:08
mehrdadc4830-Jan-10 2:08 
GeneralRe: Define me a practice please! Pin
#realJSOP30-Jan-10 2:23
mve#realJSOP30-Jan-10 2:23 
GeneralRe: Define me a practice please! Pin
mehrdadc4830-Jan-10 2:29
mehrdadc4830-Jan-10 2:29 
GeneralRe: Define me a practice please! Pin
Pete O'Hanlon30-Jan-10 2:30
mvePete O'Hanlon30-Jan-10 2:30 
AnswerRe: Define me a practice please! Pin
Mycroft Holmes30-Jan-10 15:35
professionalMycroft Holmes30-Jan-10 15:35 
Questionadding data to database from combobox Pin
Erdinc2730-Jan-10 1:32
Erdinc2730-Jan-10 1:32 
hi guys...i have a combobox on my form which is named as cmbfirma...and i fill it with a column of database..and i want user to add new firm if it doesnt exist in my database that is why i open new form and user writes new firm name to textbox and program writes new firm name to a txt file and i read it from there...and try to write that new form to my database..to do that i use code below
cmd.Parameters.AddWithValue("@firma",cmbFirma.SelectedItem.ToString());
but when i use it and check my database it writes there System.Data.DataRowView
and i tried another code below
cmd.Parameters.AddWithValue("@firma",cmbFirma.SelectedValue.ToString());
in that time it writes database normally only for the items which is listed in combobox and it gives error if i want to add the new firm name that i read from txt file...in error it says "Unable to set an object reference to an instance object"
what should i do to get rid off that errors ??
or should i use another database for my combobox ??
i use SqlExpress 2005 to create my database
thanks for your help
AnswerRe: adding data to database from combobox Pin
Alex Manolescu30-Jan-10 2:53
Alex Manolescu30-Jan-10 2:53 
GeneralRe: adding data to database from combobox Pin
Erdinc2730-Jan-10 3:33
Erdinc2730-Jan-10 3:33 
GeneralRe: adding data to database from combobox Pin
Alex Manolescu30-Jan-10 4:49
Alex Manolescu30-Jan-10 4:49 
GeneralRe: adding data to database from combobox Pin
Erdinc2730-Jan-10 23:53
Erdinc2730-Jan-10 23:53 
GeneralRe: adding data to database from combobox Pin
Alex Manolescu31-Jan-10 8:51
Alex Manolescu31-Jan-10 8:51 
GeneralRe: adding data to database from combobox Pin
Erdinc2731-Jan-10 21:27
Erdinc2731-Jan-10 21:27 
GeneralRe: adding data to database from combobox Pin
Alex Manolescu31-Jan-10 21:35
Alex Manolescu31-Jan-10 21:35 
QuestionShowing data from a database to a listbox during runtime Pin
gamer112729-Jan-10 23:47
gamer112729-Jan-10 23:47 
AnswerRe: Showing data from a database to a listbox during runtime Pin
OriginalGriff29-Jan-10 23:52
mveOriginalGriff29-Jan-10 23:52 
JokeRe: Showing data from a database to a listbox during runtime Pin
DaveyM6930-Jan-10 0:09
professionalDaveyM6930-Jan-10 0:09 
GeneralRe: Showing data from a database to a listbox during runtime Pin
OriginalGriff30-Jan-10 0:22
mveOriginalGriff30-Jan-10 0:22 
GeneralOT Pin
DaveyM6930-Jan-10 2:01
professionalDaveyM6930-Jan-10 2:01 
GeneralRe: Showing data from a database to a listbox during runtime Pin
gamer112730-Jan-10 2:15
gamer112730-Jan-10 2:15 
GeneralRe: Showing data from a database to a listbox during runtime Pin
OriginalGriff30-Jan-10 2:27
mveOriginalGriff30-Jan-10 2:27 
GeneralRe: Showing data from a database to a listbox during runtime Pin
gamer112730-Jan-10 5:48
gamer112730-Jan-10 5:48 
GeneralRe: Showing data from a database to a listbox during runtime Pin
OriginalGriff30-Jan-10 5:58
mveOriginalGriff30-Jan-10 5:58 
GeneralRe: Showing data from a database to a listbox during runtime Pin
gamer112730-Jan-10 6:08
gamer112730-Jan-10 6:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.