Quantcast
Channel: Oracle, MySQL, Sybase, Informix and other databases
Viewing all articles
Browse latest Browse all 1350

Problem of sql excel odbc query lauching

$
0
0

Hello,

I've got an error's message following the launching of query. The error's message is :

Détails de l'exception: System.Data.Odbc.OdbcException: ERROR [07002] [Microsoft][ODBC Excel Driver] Too few parameters. Expected 3.

The code is :

protected void ValiderRegion(object sender, EventArgs e)
{
string StringDDL_Region_Selected = DDL_Region.SelectedValue;
if (StringDDL_Region_Selected != null)
{
SqlDataSource3.SelectParameters.Clear();
SqlDataSource3.SelectCommand = "SELECT T_JP_Localisation_NumDptEtDpt FROM [t_jp_localisation$] WHERE T_JP_Localisation_Region = ?RegionJ group by T_JP_Localisation_NumDptEtDpt";
SqlDataSource3.SelectParameters.Add("?RegionJ", DDL_Region.SelectedValue);
DDL_Departement.DataSourceID = "SqlDataSource3";
DDL_Departement.DataValueField = "T_JP_Localisation_NumDptEtDpt";
DDL_Departement.Visible = true;
Bt_Departement.Visible = true;
SqlDataSource3.Dispose();
}

Thanks for your help !


Viewing all articles
Browse latest Browse all 1350

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>