phiadmin
asked on
.NET 2.0 Web App's GridView's DataBind Error:
I am getting an error from my .NET 2.0 web application as I am trying to bind data with GridView. The application is a .NET 2.0 32 bit application that uses classic pipeline. The error is: Exception Details: System.ArgumentException: Keyword not supported: 'unicode'.
I am using the following connection string in web.config file:
The code at backend is:
I am using System.Data.OracleClient.
The code at frontend, at aspx page is:
Would anyone please specify why I am getting error message like --- Exception Details: System.ArgumentException: Keyword not supported: 'unicode'? Thanks.
error1.png
I am using the following connection string in web.config file:
<add name="TheConn" connectionString="Data Source=testserver;Persist Security Info=True;User ID=user;Password=password;Unicode=True" providerName="Oracle.DataAccess.Client"/>
The code at backend is:
SqlDataSource ds = new SqlDataSource();
ds.ConnectionString = ConfigurationManager.ConnectionStrings["TheConn"].ConnectionString; ;
ds.SelectCommand = "SELECT VIEW_EMP.EMP, VIEW_EMP.NAME FROM X.VIEW_EMP ORDER BY VIEW_EMP.EMP";
ds.Select(DataSourceSelectArguments.Empty);
GridView1.DataSource = ds;
GridView1.DataBind(); // From this line, error is coming
I am using System.Data.OracleClient.
The code at frontend, at aspx page is:
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="Id" Width="900px">
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:BoundField DataField="Emp" HeaderText="Emp_Id" ReadOnly="True" SortExpression="Id" InsertVisible="False" />
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
</Columns>
</asp:GridView>
Would anyone please specify why I am getting error message like --- Exception Details: System.ArgumentException: Keyword not supported: 'unicode'? Thanks.
error1.png
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.