Solved

.NET 2.0 Web App's GridView's DataBind Error:

Posted on 2013-01-29
1
742 Views
Last Modified: 2013-02-04
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
Comment
Question by:phiadmin
1 Comment
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 500 total points
ID: 38833186
Just remove the 'Unicode=true' from your connection string, it is not valid for an oracle odp connection string
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VS2010 Build fails to install 14 73
C# Windows app updating JSON file error. 9 38
How to force output to ascii 2 29
Need help with another query 10 34
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question