The value's length for key 'data source' exceeds it's limit of '128'.

Hii,

When I tried to bind dropdownlist to database by declaring connection string in the code behind file I am getting this error:

The value's length for key 'data source' exceeds it's limit of '128'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: The value's length for key 'data source' exceeds it's limit of '128'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

 My code looks like this:

<asp:DropDownList ID="DropDownList3" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource3" DataTextField="BENEFIT_ID" DataValueField="BENEFIT_ID" BackColor="#E0E0E0">

</asp:DropDownList>

<asp:SqlDataSource ID="SqlDataSource3" runat="server" SelectCommand="SELECT BENEFIT_ID FROM BFX.ROB_FLASH_BENEFITS WHERE (CLIENT_ID = :CLIENT_ID) AND (GRP_ID = :GRP_ID) ORDER BY BENEFIT_ID">

<SelectParameters>

<asp:ControlParameter ControlID="DropDownList1" Name="CLIENT_ID" PropertyName="SelectedValue" />

<asp:ControlParameter ControlID="DropDownList2" Name="GRP_ID" PropertyName="SelectedValue" />

</SelectParameters>

</asp:SqlDataSource>

in the code behind file page load I am declaring connection string like this:

string connString=''blah blah';

SqlDataSource3.ConnectionString = connectionString;

SqlDataSource4.ProviderName = providerName;

I am using VS2005,C# and Oracle 10g in the back end.

 

Thank You,

Nagiah


0
nagiah
8/20/2008 2:42:29 PM
📁 asp.net.web-forms
📃 93655 articles.
⭐ 6 followers.

💬 0 Replies
👁️‍🗨️ 3638 Views

Reply: