Solved

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

Posted on 2013-01-29
1
727 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
Comment Utility
Just remove the 'Unicode=true' from your connection string, it is not valid for an oracle odp connection string
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

772 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now