Click here to Skip to main content
15,881,413 members
Home / Discussions / C#
   

C#

 
GeneralRe: Convert a pdf file to picture format Pin
abbd3-Mar-09 21:58
abbd3-Mar-09 21:58 
QuestionRe: Convert a pdf file to picture format Pin
abbd4-Mar-09 3:08
abbd4-Mar-09 3:08 
QuestionPopulating Data from MS Access Pin
haroon19803-Mar-09 6:55
haroon19803-Mar-09 6:55 
AnswerRe: Populating Data from MS Access Pin
dan!sh 3-Mar-09 7:16
professional dan!sh 3-Mar-09 7:16 
GeneralRe: Populating Data from MS Access Pin
haroon19803-Mar-09 7:35
haroon19803-Mar-09 7:35 
AnswerRe: Populating Data from MS Access Pin
Eddy Vluggen3-Mar-09 8:09
professionalEddy Vluggen3-Mar-09 8:09 
AnswerRe: Populating Data from MS Access Pin
haroon19803-Mar-09 11:38
haroon19803-Mar-09 11:38 
QuestionWriting SQL statement in C# Pin
Deepali Khalkar3-Mar-09 6:39
Deepali Khalkar3-Mar-09 6:39 
I am developing an application on Win mobile 5.0 emulator in C# using Visual studio 2008.
Can anyone let me know how to write an SQL statement in C# which returns the row count?
Is the parameter required to store the count value?
I will be greatefull if someone helps with the code snippet for the same.

I have tried the following code for the select statement(the select stmt does not return the row count value) and is working fine.

String uname_in='abc';
SqlCeConnection conn;
SqlCeCommand comm;
SqlCeDataAdapter adap = new SqlCeDataAdapter();
String connstring = @"Data Source=Program Files\signup\signupdb.sdf";
conn = new SqlCeConnection(connstring);
conn.Open();
comm = new SqlCeCommand();
comm.Connection = conn;
comm.CommandText = "select * from signuptbl where username =@uname";
SqlCeParameter para = new SqlCeParameter();
para.ParameterName = "@uname";
para.Value = uname_in;
comm.Parameters.Add(para);
adap.SelectCommand = comm;
System.Data.DataTable dt = new DataTable();
ap.Fill(dt);
psw1 = dt.Rows[0][1].ToString();

What changes should be done in the above code for writing a select stmt the return the number of rows selected?

thanks in advance Big Grin | :-D
AnswerRe: Writing SQL statement in C# Pin
Yusuf3-Mar-09 8:32
Yusuf3-Mar-09 8:32 
QuestionCannot use Java generated DES Key in C# Pin
karpolu3-Mar-09 6:13
karpolu3-Mar-09 6:13 
AnswerRe: Cannot use Java generated DES Key in C# Pin
Calin Tatar3-Mar-09 10:02
Calin Tatar3-Mar-09 10:02 
AnswerRe: Cannot use Java generated DES Key in C# Pin
karpolu3-Mar-09 11:33
karpolu3-Mar-09 11:33 
QuestionDefault oreintation landscape ,datetime and Tabname in the footer when user print the excel sheet by default. Pin
vikram_asv3-Mar-09 5:59
vikram_asv3-Mar-09 5:59 
QuestionTableAdapter and Transactions. [modified] Pin
hdv2123-Mar-09 5:50
hdv2123-Mar-09 5:50 
QuestionError Loading type during runtime Pin
Mustafa Ismail Mustafa3-Mar-09 3:45
Mustafa Ismail Mustafa3-Mar-09 3:45 
AnswerRe: Error Loading type during runtime Pin
Eddy Vluggen3-Mar-09 3:55
professionalEddy Vluggen3-Mar-09 3:55 
GeneralRe: Error Loading type during runtime Pin
Mustafa Ismail Mustafa3-Mar-09 3:59
Mustafa Ismail Mustafa3-Mar-09 3:59 
GeneralRe: Error Loading type during runtime Pin
Eddy Vluggen3-Mar-09 4:10
professionalEddy Vluggen3-Mar-09 4:10 
GeneralRe: Error Loading type during runtime Pin
Mustafa Ismail Mustafa3-Mar-09 4:11
Mustafa Ismail Mustafa3-Mar-09 4:11 
AnswerRe: Error Loading type during runtime Pin
J4amieC3-Mar-09 4:31
J4amieC3-Mar-09 4:31 
GeneralRe: Error Loading type during runtime Pin
Mustafa Ismail Mustafa3-Mar-09 4:38
Mustafa Ismail Mustafa3-Mar-09 4:38 
AnswerRe: Error Loading type during runtime Pin
Yusuf3-Mar-09 4:36
Yusuf3-Mar-09 4:36 
GeneralRe: Error Loading type during runtime Pin
Mustafa Ismail Mustafa3-Mar-09 4:39
Mustafa Ismail Mustafa3-Mar-09 4:39 
GeneralRe: Error Loading type during runtime Pin
Yusuf3-Mar-09 4:49
Yusuf3-Mar-09 4:49 
GeneralRe: Error Loading type during runtime Pin
Mustafa Ismail Mustafa3-Mar-09 4:52
Mustafa Ismail Mustafa3-Mar-09 4:52 

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.