Click here to Skip to main content
15,888,803 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to implement Save As functionality in C# Pin
Sascha Lefèvre22-May-15 5:57
professionalSascha Lefèvre22-May-15 5:57 
GeneralRe: How to implement Save As functionality in C# Pin
RajuPrasad8222-May-15 6:01
professionalRajuPrasad8222-May-15 6:01 
GeneralRe: How to implement Save As functionality in C# Pin
Sascha Lefèvre22-May-15 6:33
professionalSascha Lefèvre22-May-15 6:33 
AnswerRe: How to implement Save As functionality in C# Pin
CHill6022-May-15 8:14
mveCHill6022-May-15 8:14 
Questionobject reference not set to an instance of an object. Pin
abdo.kouta22-May-15 3:31
abdo.kouta22-May-15 3:31 
GeneralRe: object reference not set to an instance of an object. Pin
Sascha Lefèvre22-May-15 3:55
professionalSascha Lefèvre22-May-15 3:55 
GeneralRe: object reference not set to an instance of an object. Pin
abdo.kouta22-May-15 4:13
abdo.kouta22-May-15 4:13 
AnswerRe: object reference not set to an instance of an object. Pin
OriginalGriff22-May-15 4:26
mveOriginalGriff22-May-15 4:26 
Don't post bad images to show your error: use copy and past so we can actually read it!

Guessing from the "shape" of the code it's in this line:
C#
SqlCommand cmd =
    new SqlCommand(
        "insert into UsersData(id,UserName,Password) values('" + inid.Text + "','" +
        inUserName.Text + "','" + inPassword.Text + "')", con);

Which mean you need to look at idid, inUSerName, and inPassword to see that they are all valid and not-null

But don't do it like that! Do not concatenate strings to build a SQL command. It leaves you wide open to accidental or deliberate SQL Injection attack which can destroy your entire database. Use Parametrized queries instead. This is particularly important in web based apps where anyone can delete your database from the other side of the world just by typing into your textboxes!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

GeneralRe: object reference not set to an instance of an object. Pin
Eddy Vluggen22-May-15 4:36
professionalEddy Vluggen22-May-15 4:36 
SuggestionRe: object reference not set to an instance of an object. Pin
Richard Deeming22-May-15 5:08
mveRichard Deeming22-May-15 5:08 
GeneralRe: object reference not set to an instance of an object. Pin
Eddy Vluggen22-May-15 6:37
professionalEddy Vluggen22-May-15 6:37 
QuestionC# Stops Executing When Opening A Connection To MySql Pin
Member 1171127722-May-15 2:28
Member 1171127722-May-15 2:28 
AnswerRe: C# Stops Executing When Opening A Connection To MySql Pin
Sascha Lefèvre22-May-15 2:42
professionalSascha Lefèvre22-May-15 2:42 
GeneralRe: C# Stops Executing When Opening A Connection To MySql Pin
Member 1171127722-May-15 2:51
Member 1171127722-May-15 2:51 
GeneralRe: C# Stops Executing When Opening A Connection To MySql Pin
Sascha Lefèvre22-May-15 3:17
professionalSascha Lefèvre22-May-15 3:17 
GeneralRe: C# Stops Executing When Opening A Connection To MySql Pin
Member 1171127722-May-15 3:22
Member 1171127722-May-15 3:22 
GeneralRe: C# Stops Executing When Opening A Connection To MySql Pin
Sascha Lefèvre22-May-15 3:29
professionalSascha Lefèvre22-May-15 3:29 
GeneralRe: C# Stops Executing When Opening A Connection To MySql Pin
Member 1171127722-May-15 3:47
Member 1171127722-May-15 3:47 
GeneralRe: C# Stops Executing When Opening A Connection To MySql Pin
Sascha Lefèvre22-May-15 3:57
professionalSascha Lefèvre22-May-15 3:57 
GeneralRe: C# Stops Executing When Opening A Connection To MySql Pin
Member 1171127722-May-15 3:59
Member 1171127722-May-15 3:59 
GeneralRe: C# Stops Executing When Opening A Connection To MySql Pin
Sascha Lefèvre22-May-15 4:12
professionalSascha Lefèvre22-May-15 4:12 
GeneralRe: C# Stops Executing When Opening A Connection To MySql Pin
Member 1171127722-May-15 4:15
Member 1171127722-May-15 4:15 
GeneralRe: C# Stops Executing When Opening A Connection To MySql Pin
Member 1171127722-May-15 4:17
Member 1171127722-May-15 4:17 
GeneralRe: C# Stops Executing When Opening A Connection To MySql Pin
Sascha Lefèvre22-May-15 4:35
professionalSascha Lefèvre22-May-15 4:35 
Questionhow to keep datagridview in editmode on pressing of arrow keys Pin
Muhammad Waqas Aziz22-May-15 0:32
Muhammad Waqas Aziz22-May-15 0:32 

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.