connecting to oracle database from c# asp.net mvc website
I am trying to connect to oracle database. I am able to connect to it through a local SQL Developer tool by sticking something in the oranames.tns file.
My question is that i will be deploying this website to a number of places. A few questions:
What is the simplest way i can use to connect to this database and do very basic queries. I see some examples that have me referencing oracleclient dlls. Other methods not? Is ther开发者_StackOverflowe a best practice here?
Am i going to have to update the oranames.tns file on everyone on of the machines that i deploy to ? is there any simpler way
1. You can use the Oracle data provider that comes with Microsoft, but I recommend using ODP.Net. It's best to use native libraries when possible since they are usually optimized better, at least in my experience.
2. You only need to configure the tnsnames.ora on the server, because the server is what's going to be handling the DB connections, not the client PCs (assuming that this is a MVC website).
精彩评论