Solved

DropDownList conecttion to Oracle DB

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
insert image with its metadata into SQL server Database 3 87
DataGridView Events ? 3 37
Host asp.net pages 5 25
C# HTTP GET method sample code 3 39
It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

932 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

12 Experts available now in Live!

Get 1:1 Help Now