Hello,
I've a problem of query's execution. This query is operational with mysql driver and since I used odbc excel driver, this query is not operational.
The code is :
if ((string)Session["TitreJ"] != "")
{
DataSourceSelectArguments args0 = new DataSourceSelectArguments();
SqlDataSource4.SelectParameters.Clear();
SqlDataSource4.SelectCommand = "SELECT COUNT(*) FROM [t_jp_annonce$] WHERE MATCH (T_JP_Annonce_Titre) AGAINST (? IN BOOLEAN MODE) OR idT_JP_Annonce_NumCle= ? AND STR_TO_DATE(T_JP_Annonce_fk_Cmde_DateFerm, '%Y-%c-%d %H:%i:%S') > now() AND T_JP_Annonce_Valide='VALIDE'";
SqlDataSource4.SelectParameters.Add("@TitreA", (string)Session["TitreJ"]);
DataView DtView1 = (DataView)SqlDataSource4.Select(args0);
DataTable DtTable1 = DtView1.ToTable();
SqlDataSource4.Dispose();
return Convert.ToInt32(DtTable1.Rows[0][0].ToString());
}
The error's message :
Exception Details: System.Data.Odbc.OdbcException: ERROR [07002] [Microsoft][ODBC Excel Driver]COUNT field incorrect.
[OdbcException (0x80131937): ERROR [07002] [Microsoft][ODBC Excel Driver]COUNT field incorrect ]
Well well, thanks for your solution !
Rednuts72