Solved

DropDownList conecttion to Oracle DB

Posted on 2008-10-31
3
252 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
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

770 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