Reputation: 17
try
{
objConn.Open();
connexion.da = new SqlCeDataAdapter("Select NUM_PHY ,NOM_CLI ,NUM_FAC ,DATE_FACT ,MODE_PAIEMENT ,DATE_REG from EXP WHERE NOM_CLI=@client =@vari", objConn);
da.SelectCommand.CommandType = CommandType.Text;
da.SelectCommand.Parameters.Add("@client", client);
da.Fill(ds,"EXP");
DataRow drow = ds.Tables["EXP"].Rows[0];
MessageBox.Show(drow["NOM_CLI"].ToString());
MessageBox.Show(drow["NUM_PHY"].ToString());
I have this error :column 'NUM_PHY' does not belong to table EXP.
Why this column and not others?
Upvotes: 0
Views: 5445
Reputation: 150
Kindly check whether the column with the name "NUM_PHY" exists, and also I hope there has been no change in regional settings.
Upvotes: 0
Reputation: 520
Modify your code
DataRow drow = ds.Tables["EXPORT"].Rows[0];
with
DataRow drow = ds.Tables["EXP"].Rows[0];
Since you are filling the value in "EXP" Table.
Upvotes: 1