Click here to Skip to main content
16,005,138 members
Home / Discussions / C#
   

C#

 
QuestionSQL and AD Pin
MAGrimsley1-Dec-05 14:51
MAGrimsley1-Dec-05 14:51 
QuestionWiping a DirectX Layer Clear? Pin
YawgmothIII1-Dec-05 14:43
YawgmothIII1-Dec-05 14:43 
QuestionWriting Dataset to XML corrupts XML file Pin
Reanalyse1-Dec-05 14:24
Reanalyse1-Dec-05 14:24 
AnswerRe: Writing Dataset to XML corrupts XML file Pin
KaptinKrunch1-Dec-05 17:55
KaptinKrunch1-Dec-05 17:55 
GeneralRe: Writing Dataset to XML corrupts XML file Pin
Reanalyse2-Dec-05 21:16
Reanalyse2-Dec-05 21:16 
QuestionPlease i want to know how to control Windows Audio in C# Pin
Kariem Soudy1-Dec-05 13:27
Kariem Soudy1-Dec-05 13:27 
AnswerRe: Please i want to know how to control Windows Audio in C# Pin
Christian Graus1-Dec-05 14:47
protectorChristian Graus1-Dec-05 14:47 
QuestionADO.NET: DataSet, DataGridView Pin
budidharma1-Dec-05 12:46
budidharma1-Dec-05 12:46 
This is my first time trying to work with a database. Let me explain what I've done real quick, then post my code, and you can tell me how I'm retarded. (Please)

First, I added an existing database to the project as a new data source. I did not have it automatically generate a typed dataset.

Next, in the design window, I added an untyped dataset to my form window. Then I placed a datagridview object in the window.

Under the DataGridView properties, I set the datasource to my untyped dataset.

I then modified my form code, as so:
<br />
    public partial class PTAnalyzer : Form<br />
    {<br />
        // DATA ACCESS CODE<br />
        public OleDbConnection conn;<br />
        public OleDbDataAdapter dAdapter;<br />
        public DataSet dSet;<br />
        public string conString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=..\\..\\ptrack6.mdb";<br />
        <br />
        public PTAnalyzer()<br />
        {<br />
            InitializeComponent();<br />
<br />
            // DATA ACCESS INITIALIZATION<br />
            try<br />
            {<br />
                conn = new OleDbConnection(conString);<br />
                dAdapter = new OleDbDataAdapter("SELECT * FROM game WHERE player_id = 11", conn);<br />
                dSet = new DataSet();<br />
                //refreshes rows in the DataSet 			<br />
                dAdapter.Fill(dataSetPT, "game");<br />
            }<br />
            catch (Exception ex)<br />
            {<br />
                MessageBox.Show("Error : " + ex.Message);<br />
            } //try-catch	   <br />
        }<br />
    }<br />
<br />


No errors, it runs fine. But nothing is displayed within the datagridview object. What am I doing wrong here? Thanks.
AnswerRe: ADO.NET: DataSet, DataGridView Pin
Jared Parsons1-Dec-05 13:54
Jared Parsons1-Dec-05 13:54 
GeneralRe: ADO.NET: DataSet, DataGridView Pin
budidharma1-Dec-05 14:03
budidharma1-Dec-05 14:03 
GeneralRe: ADO.NET: DataSet, DataGridView Pin
Jared Parsons1-Dec-05 14:17
Jared Parsons1-Dec-05 14:17 
GeneralRe: ADO.NET: DataSet, DataGridView Pin
budidharma1-Dec-05 15:16
budidharma1-Dec-05 15:16 
GeneralRe: ADO.NET: DataSet, DataGridView Pin
budidharma1-Dec-05 15:24
budidharma1-Dec-05 15:24 
GeneralRe: ADO.NET: DataSet, DataGridView Pin
budidharma1-Dec-05 17:06
budidharma1-Dec-05 17:06 
QuestionHelp in Windows Services Via C# Pin
Kariem Soudy1-Dec-05 12:44
Kariem Soudy1-Dec-05 12:44 
AnswerRe: Help in Windows Services Via C# Pin
KaptinKrunch1-Dec-05 18:02
KaptinKrunch1-Dec-05 18:02 
QuestionReferencing form from user control Pin
Dave Hurt1-Dec-05 10:58
Dave Hurt1-Dec-05 10:58 
AnswerRe: Referencing form from user control Pin
Joshua Quick1-Dec-05 12:02
Joshua Quick1-Dec-05 12:02 
GeneralRe: Referencing form from user control Pin
Dave Hurt2-Dec-05 3:49
Dave Hurt2-Dec-05 3:49 
GeneralRe: Referencing form from user control Pin
Joshua Quick2-Dec-05 7:29
Joshua Quick2-Dec-05 7:29 
QuestionFiguring out Installation Location Pin
timothymfox1-Dec-05 10:22
timothymfox1-Dec-05 10:22 
AnswerRe: Figuring out Installation Location Pin
Jared Parsons1-Dec-05 10:31
Jared Parsons1-Dec-05 10:31 
Questiontrouble in loading large xml file Pin
zhujp981-Dec-05 8:18
zhujp981-Dec-05 8:18 
AnswerRe: trouble in loading large xml file Pin
Rob Philpott1-Dec-05 9:10
Rob Philpott1-Dec-05 9:10 
QuestionTips for creating a custom message inbox Pin
mihansen1-Dec-05 7:45
mihansen1-Dec-05 7:45 

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.