Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 755
  • Last Modified:

.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:

<add name="TheConn" connectionString="Data Source=testserver;Persist Security Info=True;User ID=user;Password=password;Unicode=True" providerName="Oracle.DataAccess.Client"/>

Open in new window

               
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

Open in new window

                                 
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>

Open in new window

                                 
Would anyone please specify why I am getting error message like --- Exception Details: System.ArgumentException: Keyword not supported: 'unicode'? Thanks.
error1.png
0
phiadmin
Asked:
phiadmin
1 Solution
 
Paul JacksonCommented:
Just remove the 'Unicode=true' from your connection string, it is not valid for an oracle odp connection string
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now