Click here to Skip to main content
15,898,222 members
Home / Discussions / C#
   

C#

 
AnswerRe: plz help on a query. Pin
Christian Graus8-Feb-07 22:51
protectorChristian Graus8-Feb-07 22:51 
AnswerRe: plz help on a query. Pin
Stefan Troschuetz8-Feb-07 22:54
Stefan Troschuetz8-Feb-07 22:54 
AnswerRe: plz help on a query. Pin
Colin Angus Mackay8-Feb-07 22:58
Colin Angus Mackay8-Feb-07 22:58 
Question[Message Deleted] Pin
Nekshan8-Feb-07 22:22
Nekshan8-Feb-07 22:22 
AnswerRe: get a value from database into a variable. Pin
coolestCoder8-Feb-07 22:27
coolestCoder8-Feb-07 22:27 
AnswerRe: get a value from database into a variable. Pin
Stefan Troschuetz8-Feb-07 22:28
Stefan Troschuetz8-Feb-07 22:28 
AnswerRe: get a value from database into a variable. Pin
m@u8-Feb-07 22:29
m@u8-Feb-07 22:29 
AnswerRe: get a value from database into a variable. Pin
coolestCoder8-Feb-07 22:29
coolestCoder8-Feb-07 22:29 
Nekshan wrote:
int s = Convert.ToString(cm.ExecuteScalar());


In C# you cannot assign a string to int. Try-

int s=Int32.Parse(cm.ExecuteScalar());

CAUTION : What if your database has a null value or some string value in the field being retrieved ? This would raise an exception in the Parse method. The best practice is to use exception handling and checking whether the returned values are not null. Also apply proper constraints on the database to avoid these kind of errors.


funEntrylogin(s, tb_id.Text, tb_pswd.Text, DateTime.Now, DateTime.Now);


This is because you had error on the initialization of that int. correct it and this error will be gone.


"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder

coolestCoder

AnswerRe: [Message Deleted] Pin
Andy *M*17-Feb-07 7:26
Andy *M*17-Feb-07 7:26 
Questionnobody knows visualize MenuItem by code? Pin
nadapublicidad8-Feb-07 22:10
nadapublicidad8-Feb-07 22:10 
AnswerRe: nobody knows visualize MenuItem by code? Pin
Stefan Troschuetz8-Feb-07 22:34
Stefan Troschuetz8-Feb-07 22:34 
Question[Setup] How accessing the installed programpath? Pin
b43r_3oo38-Feb-07 21:42
b43r_3oo38-Feb-07 21:42 
AnswerRe: [Setup] How accessing the installed programpath? Pin
Sandeep Akhare8-Feb-07 23:47
Sandeep Akhare8-Feb-07 23:47 
AnswerRe: [Setup] How accessing the installed programpath? Pin
David Domingues8-Feb-07 23:55
David Domingues8-Feb-07 23:55 
GeneralRe: [Setup] How accessing the installed programpath? Pin
b43r_3oo39-Feb-07 7:11
b43r_3oo39-Feb-07 7:11 
GeneralRe: [Setup] How accessing the installed programpath? Pin
David Domingues9-Feb-07 9:44
David Domingues9-Feb-07 9:44 
QuestionHelp Needed!! Problem in starting an exe file Pin
ArchaBhandare8-Feb-07 20:52
ArchaBhandare8-Feb-07 20:52 
AnswerRe: Help Needed!! Problem in starting an exe file Pin
Martin#8-Feb-07 21:19
Martin#8-Feb-07 21:19 
GeneralRe: Help Needed!! Problem in starting an exe file Pin
ArchaBhandare8-Feb-07 21:45
ArchaBhandare8-Feb-07 21:45 
GeneralRe: Help Needed!! Problem in starting an exe file Pin
Martin#8-Feb-07 21:50
Martin#8-Feb-07 21:50 
GeneralRe: Help Needed!! Problem in starting an exe file Pin
ArchaBhandare8-Feb-07 22:27
ArchaBhandare8-Feb-07 22:27 
GeneralRe: Help Needed!! Problem in starting an exe file Pin
coolestCoder8-Feb-07 22:22
coolestCoder8-Feb-07 22:22 
QuestionUpdate Datagrid view for 2 tables Pin
idreesbadshah8-Feb-07 19:49
idreesbadshah8-Feb-07 19:49 
QuestionPLEASE HELP! - How do I change IE settings from my application? Pin
peshkunta8-Feb-07 19:47
peshkunta8-Feb-07 19:47 
AnswerRe: PLEASE HELP! - How do I change IE settings from my application? Pin
Christian Graus8-Feb-07 20:05
protectorChristian Graus8-Feb-07 20:05 

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.