Solved

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

Posted on 2013-01-29
1
736 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

791 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