Click here to Skip to main content
15,910,661 members
Home / Discussions / C#
   

C#

 
Questionstruct containing array of pointers to struct (C dll to C#) Pin
dfn18-Nov-07 16:31
dfn18-Nov-07 16:31 
Questioncombobox question Pin
NewToAspDotNet18-Nov-07 11:13
NewToAspDotNet18-Nov-07 11:13 
AnswerRe: combobox question Pin
Christian Graus18-Nov-07 11:34
protectorChristian Graus18-Nov-07 11:34 
QuestionErro wen sql server table has a empty value Pin
NewToAspDotNet18-Nov-07 10:42
NewToAspDotNet18-Nov-07 10:42 
AnswerRe: Erro wen sql server table has a empty value Pin
Pete O'Hanlon18-Nov-07 10:58
mvePete O'Hanlon18-Nov-07 10:58 
GeneralRe: Erro wen sql server table has a empty value Pin
NewToAspDotNet18-Nov-07 11:08
NewToAspDotNet18-Nov-07 11:08 
GeneralRe: Erro wen sql server table has a empty value Pin
Malcolm Smart18-Nov-07 11:38
Malcolm Smart18-Nov-07 11:38 
GeneralRe: Erro wen sql server table has a empty value Pin
echuck6618-Nov-07 15:35
echuck6618-Nov-07 15:35 
For simple select statements such as this, I would use ISNULL in the sql command...

For example, using the code you included:

SqlCommand comm00 = new SqlCommand();
string commSQL = "SELECT ISNULL(Cmp_nr, '') AS Cmp_nr FROM Companies where Cmp_name=@cmpName";

SqlPararameter cmpParam = new SqlParameter("@cmpName", SqlDbType.VarChar, 50);
//note: 50 should be changed to the field length of your db field Cmp_name

cmpParam.Value = companyName;
comm00.Parameters.Add(cmpParam);
comm00.Connection = myconn;
comm00.CommandText = commSQL;

GeneralRe: Erro wen sql server table has a empty value Pin
Luis Alonso Ramos18-Nov-07 16:13
Luis Alonso Ramos18-Nov-07 16:13 
GeneralRe: Erro wen sql server table has a empty value Pin
Vasudevan Deepak Kumar18-Nov-07 17:29
Vasudevan Deepak Kumar18-Nov-07 17:29 
AnswerRe: Erro wen sql server table has a empty value Pin
Christian Graus18-Nov-07 11:37
protectorChristian Graus18-Nov-07 11:37 
QuestionPrevent DataGridView to populate rows at designtime [modified] Pin
Fayu18-Nov-07 9:46
Fayu18-Nov-07 9:46 
AnswerRe: Prevent DataGridView to populate rows at designtime Pin
Not Active18-Nov-07 10:04
mentorNot Active18-Nov-07 10:04 
QuestionStrongNameIdentityPermission - SNIP Pin
ekynox18-Nov-07 9:25
ekynox18-Nov-07 9:25 
QuestionHow to show Bitmap Pin
dataminers18-Nov-07 9:12
dataminers18-Nov-07 9:12 
AnswerRe: How to show Bitmap Pin
Not Active18-Nov-07 9:52
mentorNot Active18-Nov-07 9:52 
AnswerRe: How to show Bitmap Pin
Guffa18-Nov-07 10:00
Guffa18-Nov-07 10:00 
GeneralRe: How to show Bitmap Pin
dataminers18-Nov-07 10:06
dataminers18-Nov-07 10:06 
AnswerRe: How to show Bitmap Pin
Guffa18-Nov-07 11:23
Guffa18-Nov-07 11:23 
GeneralRe: How to show Bitmap Pin
Christian Graus18-Nov-07 11:35
protectorChristian Graus18-Nov-07 11:35 
GeneralRe: How to show Bitmap Pin
dataminers18-Nov-07 12:16
dataminers18-Nov-07 12:16 
GeneralRe: How to show Bitmap Pin
Christian Graus18-Nov-07 12:45
protectorChristian Graus18-Nov-07 12:45 
GeneralRe: How to show Bitmap Pin
dataminers18-Nov-07 10:17
dataminers18-Nov-07 10:17 
GeneralRe: How to show Bitmap Pin
Christian Graus18-Nov-07 11:35
protectorChristian Graus18-Nov-07 11:35 
GeneralRe: How to show Bitmap Pin
Guffa18-Nov-07 15:33
Guffa18-Nov-07 15:33 

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.