Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. DataGridView-Database in csharp smart device

DataGridView-Database in csharp smart device

Scheduled Pinned Locked Moved C#
questioncsharpdatabasehelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tunisien86
    wrote on last edited by
    #1

    Hi, I develop a csharp smart device project using Visual Studio2008.I wanna load my data from my database .sdf in a DataGrid View.I add the tool from the Toolbox and in the its proprities,I add the datatable to the DataRessource field.When running,an sqlceexception appereas telling me that:

    The column name is not valid. [ Node name (if any) = ,Column name = Effectué/Non ]

    and it goes to this ligne of my code

    int returnValue = this.Adapter.Fill(dataTable);

    What is the problem? Thank u for u suggestions :)

    D 1 Reply Last reply
    0
    • T Tunisien86

      Hi, I develop a csharp smart device project using Visual Studio2008.I wanna load my data from my database .sdf in a DataGrid View.I add the tool from the Toolbox and in the its proprities,I add the datatable to the DataRessource field.When running,an sqlceexception appereas telling me that:

      The column name is not valid. [ Node name (if any) = ,Column name = Effectué/Non ]

      and it goes to this ligne of my code

      int returnValue = this.Adapter.Fill(dataTable);

      What is the problem? Thank u for u suggestions :)

      D Offline
      D Offline
      Dan Mos
      wrote on last edited by
      #2

      Based on the error message I would say that the slah "/" in the column name is responsable for the error. Without any further details this is the best I can do.

      T 1 Reply Last reply
      0
      • D Dan Mos

        Based on the error message I would say that the slah "/" in the column name is responsable for the error. Without any further details this is the best I can do.

        T Offline
        T Offline
        Tunisien86
        wrote on last edited by
        #3

        Hi, My issue stills the same.My form's code is:

        using System;
        using System.Linq;
        using System.Collections.Generic;
        using System.ComponentModel;
        using System.Data;
        using System.Drawing;
        using System.Text;
        using System.Windows.Forms;

        namespace ModeDifféré
        {
        public partial class DataGridT : Form
        {
        public DataGridT()
        {
        InitializeComponent();
        }

            private void DataGridT\_Load(object sender, EventArgs e)
            {
                // TODO: This line of code loads data into the 'baseGmaoLocaleDataSet2.Travaux' table. You can move, or remove it, as needed.
                this.travauxTableAdapter.Fill(this.baseGmaoLocaleDataSet2.Travaux);
        
            }
        
            private void dataGrid1\_CurrentCellChanged(object sender, EventArgs e)
            {
        
            }
        }
        

        }

        What can I add to let the system shows the data stocked in the table Travaux?? Regards :((

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups