Solved

DropDownList conecttion to Oracle DB

Posted on 2008-10-31
3
254 Views
Last Modified: 2013-12-17
Not able to get data from Oracle DB to populate a DropDownList. I've successfully established a connection in my web.config with the same connection string:

<asp:SqlDataSource ID="RegionData" runat="server" ConnectionString = "Data Source=tnsServiceName;User Id=myID;Password=myPass;" SelectCommand = "select primarykey, field_name from myTable order by field_name"></asp:SqlDataSource>                        
<asp:DropDownList ID="ddRegion" runat="server" AppendDataBoundItems = "true" DataSourceID = "RegionData" DataTextField = "field_name" DataValueField = "primarykey">
<asp:listitem selected="True"></asp:listitem>                                              
</asp:DropDownList>
0
Comment
Question by:kevbob650
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 18

Accepted Solution

by:
Priest04 earned 250 total points
ID: 22853634
You should use Oracle data provider to conennect to Oracle server, not Sql provider.

Goran
0
 

Author Closing Comment

by:kevbob650
ID: 31512120
Thanks Priest04, that was the missing link!  Can I code it where the sql is done in the code behind? Would that be cleaner?
0
 
LVL 18

Expert Comment

by:Priest04
ID: 22854902
Of course,so you are free to alter the code manually.
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

737 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