Solved

DropDownList conecttion to Oracle DB

Posted on 2008-10-31
3
250 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
  • 2
3 Comments
 
LVL 18

Accepted Solution

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

Goran
0
 

Author Closing Comment

by:kevbob650
Comment Utility
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
Comment Utility
Of course,so you are free to alter the code manually.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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.   …
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
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…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 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

6 Experts available now in Live!

Get 1:1 Help Now