DataGridView-Database in csharp smart device
-
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 :)
-
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 :)
-
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.
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 :((