Click here to Skip to main content
15,907,233 members
Home / Discussions / C#
   

C#

 
Questionweb-service access problem Pin
saqib827-Feb-07 19:38
saqib827-Feb-07 19:38 
QuestionPKCS#1, Version 2 Pin
MozhdehQeraati7-Feb-07 19:34
MozhdehQeraati7-Feb-07 19:34 
QuestionFileName as CommandLineArgument Pin
GunaChinna7-Feb-07 18:51
GunaChinna7-Feb-07 18:51 
AnswerRe: FileName as CommandLineArgument Pin
Christian Graus7-Feb-07 18:57
protectorChristian Graus7-Feb-07 18:57 
GeneralRe: FileName as CommandLineArgument Pin
GunaChinna7-Feb-07 19:03
GunaChinna7-Feb-07 19:03 
GeneralRe: FileName as CommandLineArgument Pin
Christian Graus7-Feb-07 20:58
protectorChristian Graus7-Feb-07 20:58 
GeneralRe: FileName as CommandLineArgument Pin
GunaChinna7-Feb-07 21:21
GunaChinna7-Feb-07 21:21 
Questionget a value from database into a variable. Pin
Nekshan7-Feb-07 18:19
Nekshan7-Feb-07 18:19 
Will this get value dashboardid from table into variable 'str'?

int str = "select dashboardid from dashboardlogin where userid=101";
cmd.CommandText = str;
cmd.CommandType = CommandType.Text;
cmd.Connection = conn;
cmd.ExecuteNonQuery();


dashboardid is 'int' type in database.
but i have error in first line if i use the above code:
Cannot implicitly convert type 'string' to 'int'.

Do i need to add any other code also for getting its data into variable 'str'?
M new to c#,just learnt connecting database,a student doing project in c#.
plz reply
thank you.
nekshan.
AnswerRe: get a value from database into a variable. Pin
Christian Graus7-Feb-07 18:29
protectorChristian Graus7-Feb-07 18:29 
GeneralRe: get a value from database into a variable. Pin
Nekshan7-Feb-07 18:42
Nekshan7-Feb-07 18:42 
GeneralRe: get a value from database into a variable. Pin
Christian Graus7-Feb-07 18:56
protectorChristian Graus7-Feb-07 18:56 
AnswerRe: get a value from database into a variable. [modified] Pin
B.A7-Feb-07 18:31
B.A7-Feb-07 18:31 
GeneralRe: get a value from database into a variable. Pin
Nekshan7-Feb-07 18:44
Nekshan7-Feb-07 18:44 
GeneralRe: get a value from database into a variable. Pin
Christian Graus7-Feb-07 18:55
protectorChristian Graus7-Feb-07 18:55 
GeneralRe: get a value from database into a variable. Pin
B.A7-Feb-07 19:04
B.A7-Feb-07 19:04 
GeneralRe: get a value from database into a variable. Pin
Nekshan7-Feb-07 19:36
Nekshan7-Feb-07 19:36 
GeneralRe: get a value from database into a variable. Pin
Christian Graus7-Feb-07 21:01
protectorChristian Graus7-Feb-07 21:01 
GeneralRe: get a value from database into a variable. Pin
Christian Graus7-Feb-07 21:00
protectorChristian Graus7-Feb-07 21:00 
GeneralRe: get a value from database into a variable. Pin
Nekshan7-Feb-07 22:37
Nekshan7-Feb-07 22:37 
GeneralRe: get a value from database into a variable. Pin
Stefan Troschuetz7-Feb-07 22:56
Stefan Troschuetz7-Feb-07 22:56 
GeneralRe: get a value from database into a variable. Pin
Christian Graus7-Feb-07 23:25
protectorChristian Graus7-Feb-07 23:25 
AnswerRe: get a value from database into a variable. Pin
Dhaval Makhecha8-Feb-07 20:06
Dhaval Makhecha8-Feb-07 20:06 
GeneralRe: get a value from database into a variable. Pin
Nekshan8-Feb-07 22:18
Nekshan8-Feb-07 22:18 
QuestionHelp in implementing Cascaded style sheet in Visual studio.net 2003 Pin
EEmaan7-Feb-07 18:11
EEmaan7-Feb-07 18:11 
AnswerRe: Help in implementing Cascaded style sheet in Visual studio.net 2003 Pin
Christian Graus7-Feb-07 18:22
protectorChristian Graus7-Feb-07 18:22 

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.