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

C#

 
QuestionReporting of operating system Pin
Matt Fishbeck12-Sep-08 4:10
Matt Fishbeck12-Sep-08 4:10 
AnswerRe: Reporting of operating system Pin
michaelvdnest12-Sep-08 4:38
michaelvdnest12-Sep-08 4:38 
AnswerRe: Reporting of operating system Pin
michaelvdnest12-Sep-08 4:39
michaelvdnest12-Sep-08 4:39 
QuestionUser PC and Server on WAN Pin
balu1234512-Sep-08 4:05
balu1234512-Sep-08 4:05 
AnswerRe: User PC and Server on WAN Pin
Manas Bhardwaj12-Sep-08 4:09
professionalManas Bhardwaj12-Sep-08 4:09 
GeneralRe: User PC and Server on WAN Pin
Paul Conrad12-Sep-08 5:38
professionalPaul Conrad12-Sep-08 5:38 
GeneralRe: User PC and Server on WAN Pin
balu1234515-Sep-08 19:16
balu1234515-Sep-08 19:16 
QuestionData binding to fill data grid view Pin
postonoh12-Sep-08 3:47
postonoh12-Sep-08 3:47 
Using this code to pull data tables to populate two datagrids yet when it calls the select query
I get just the first letter of the table.

The code that is commented out with the //places the dbo.Table in the dropdown combo box but error because the select query will fire with dbo.table.

private void EnumerateTables(ComboBox cmb, String databaseName, bool isAccess)
        {
            //cmb.Items.Clear();
            if (!isAccess)
            {
                var srv = new Server(Properties.Settings.Default.ServerInstance);
                srv.Databases.Refresh();
                foreach (Database db in srv.Databases)
                {
                    if (db.Name == cmbboxSqlDb.Text)
                        
                    {
                        BindingSource bs = new BindingSource();
                        bs.DataSource = db.Tables;
                        bs.DataMember = "Name";
                        cmb.DataSource = bs;
                        //var tableEnumerator = db.Tables.GetEnumerator();

                        //while (tableEnumerator.MoveNext())
                        //{
                        //    cmb.Items.Add(((Table)tableEnumerator.Current).Name);
                        //}
                    }
                }
            }
            else
            {
                
                if (AccessConnString != null)
                {
                    var conn = new OleDbConnection(AccessConnString);

                    // open the connection to the database 
                    conn.Open();
                    // this.Dispose();

                    // Get the Tables
                    var schemaTable = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, new Object[] { null, null, null, "TABLE" });

                    // Store the table names in the class scoped array list of table names
                    for (int i = 0; i < schemaTable.Rows.Count; i++)
                    {
                      cmb.Items.Add(schemaTable.Rows[i].ItemArray[2].ToString());
                    }

                }
            }
        }


Learning to Code

QuestionSqlConnection open despite no service Pin
franz.pilgerstorfer12-Sep-08 2:02
franz.pilgerstorfer12-Sep-08 2:02 
QuestionNeed Help in Image Mapping Pin
tdeepika12-Sep-08 2:00
tdeepika12-Sep-08 2:00 
AnswerRe: Need Help in Image Mapping Pin
Dewald12-Sep-08 2:52
Dewald12-Sep-08 2:52 
GeneralRe: Need Help in Image Mapping Pin
tdeepika14-Sep-08 20:27
tdeepika14-Sep-08 20:27 
QuestionCompile a project from code, or explanations about CodeDom... Pin
kontax12-Sep-08 1:49
kontax12-Sep-08 1:49 
AnswerRe: Compile a project from code, or explanations about CodeDom... Pin
leppie12-Sep-08 2:05
leppie12-Sep-08 2:05 
GeneralRe: Compile a project from code, or explanations about CodeDom... Pin
kontax12-Sep-08 2:11
kontax12-Sep-08 2:11 
GeneralRe: Compile a project from code, or explanations about CodeDom... Pin
leppie12-Sep-08 2:17
leppie12-Sep-08 2:17 
GeneralRe: Compile a project from code, or explanations about CodeDom... Pin
kontax12-Sep-08 2:27
kontax12-Sep-08 2:27 
GeneralRe: Compile a project from code, or explanations about CodeDom... Pin
leppie12-Sep-08 2:31
leppie12-Sep-08 2:31 
GeneralRe: Compile a project from code, or explanations about CodeDom... Pin
kontax12-Sep-08 2:33
kontax12-Sep-08 2:33 
AnswerRe: Compile a project from code, or explanations about CodeDom... Pin
Giorgi Dalakishvili12-Sep-08 2:43
mentorGiorgi Dalakishvili12-Sep-08 2:43 
GeneralRe: Compile a project from code, or explanations about CodeDom... Pin
kontax12-Sep-08 2:52
kontax12-Sep-08 2:52 
GeneralRe: Compile a project from code, or explanations about CodeDom... Pin
Giorgi Dalakishvili12-Sep-08 3:10
mentorGiorgi Dalakishvili12-Sep-08 3:10 
GeneralRe: Compile a project from code, or explanations about CodeDom... Pin
kontax12-Sep-08 3:25
kontax12-Sep-08 3:25 
GeneralRe: Compile a project from code, or explanations about CodeDom... Pin
Giorgi Dalakishvili12-Sep-08 3:37
mentorGiorgi Dalakishvili12-Sep-08 3:37 
GeneralRe: Compile a project from code, or explanations about CodeDom... Pin
kontax12-Sep-08 3:47
kontax12-Sep-08 3:47 

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.