Click here to Skip to main content
15,887,214 members
Home / Discussions / C#
   

C#

 
AnswerRe: Getting data from listview Pin
Kuira26-Apr-06 21:38
Kuira26-Apr-06 21:38 
QuestionData Query 2 Pin
Sean8926-Apr-06 14:26
Sean8926-Apr-06 14:26 
AnswerRe: Data Query 2 Pin
Gerald Schwab26-Apr-06 17:20
Gerald Schwab26-Apr-06 17:20 
GeneralRe: Data Query 2 Pin
Sean8927-Apr-06 8:59
Sean8927-Apr-06 8:59 
QuestionDrag Image in Win RichTextBox Pin
amin_behzadi26-Apr-06 12:26
professionalamin_behzadi26-Apr-06 12:26 
QuestionCreating text file from SQL / XML in C# Pin
BusgGuy26-Apr-06 12:07
BusgGuy26-Apr-06 12:07 
AnswerRe: Creating text file from SQL / XML in C# Pin
HakunaMatada26-Apr-06 17:51
HakunaMatada26-Apr-06 17:51 
QuestionData Query Pin
Sean8926-Apr-06 11:33
Sean8926-Apr-06 11:33 
Can someone tell me why this is returning 0?
<code>
        static void Main(string[] args)
        {
            string dataPath = @"C:\Documents and Settings\Administrator\Desktop\Transimount_Data.MDB";
            OleDbConnection conn = new OleDbConnection("Provider=Microsoft.JET.OLEDB.4.0; data source=" + dataPath);

            OleDbCommand cmd = new OleDbCommand("SELECT * FROM Mounts WHERE Group_Number = 1", conn);

            conn.Open();
            int count = cmd.ExecuteNonQuery();
            conn.Close();

            Console.WriteLine(count); 
        }</code>

I am using this to get how many records are in Group 1 of a collection of parts.

The datatable in the database currently looks like this:

Mount_Number	Carrier_Part_Number	Group_Number
KMC84191	72-62039-02	          5
KMK64191	72-62039-00	          3
KMK71074	72-62030-aa	          1
KMK71374	72-62030-bb	          1
KMK72073	72-62030-cc	          1
KMK72673	72-62030-dd	          1
KMM61901	72-62038-03	          6
KMM61990	72-62038-05	          2
KMM62600	72-62038-04	          6
KMM62690	72-62038-02	          2
KMM64191	72-62039-01	          4


I'm a little tired so I hope this is a stupid mistake Wink | ;)

Thanks for any help!
AnswerRe: Data Query Pin
Kayess Tech26-Apr-06 11:42
professionalKayess Tech26-Apr-06 11:42 
GeneralRe: Data Query Pin
Sean8926-Apr-06 11:48
Sean8926-Apr-06 11:48 
GeneralRe: Data Query Pin
Rob Graham26-Apr-06 12:32
Rob Graham26-Apr-06 12:32 
GeneralRe: Data Query Pin
Sean8926-Apr-06 12:50
Sean8926-Apr-06 12:50 
AnswerRe: Data Query Pin
Kuira26-Apr-06 14:10
Kuira26-Apr-06 14:10 
GeneralRe: Data Query Pin
Sean8926-Apr-06 14:29
Sean8926-Apr-06 14:29 
QuestionApplication Focus Pin
Kayess Tech26-Apr-06 11:30
professionalKayess Tech26-Apr-06 11:30 
AnswerRe: Application Focus Pin
Shajeel26-Apr-06 19:11
Shajeel26-Apr-06 19:11 
GeneralRe: Application Focus Pin
Kayess Tech28-Apr-06 0:26
professionalKayess Tech28-Apr-06 0:26 
Questionspeech marks in the registry key Pin
IAmChris26-Apr-06 11:10
IAmChris26-Apr-06 11:10 
AnswerRe: speech marks in the registry key Pin
likefood26-Apr-06 11:16
likefood26-Apr-06 11:16 
GeneralRe: speech marks in the registry key Pin
IAmChris26-Apr-06 11:42
IAmChris26-Apr-06 11:42 
QuestionClip Rectangle - Cursor Pin
codebala26-Apr-06 10:57
codebala26-Apr-06 10:57 
AnswerRe: Clip Rectangle - Cursor Pin
Ed.Poore26-Apr-06 11:53
Ed.Poore26-Apr-06 11:53 
QuestionHelp require on transfering sms and video(MMS) from pc to mobile using SIP protocol Pin
kashif.qau26-Apr-06 10:41
kashif.qau26-Apr-06 10:41 
QuestionHtmlElement.OuterHtml.Replace(­) fails with COM exception Pin
cweeks7868126-Apr-06 10:28
cweeks7868126-Apr-06 10:28 
GeneralRe: HtmlElement.OuterHtml.Replace(­) fails with COM exception Pin
Guffa26-Apr-06 10:39
Guffa26-Apr-06 10:39 

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.