开发者

.net connectivity with oracle

开发者 https://www.devze.com 2023-02-28 19:46 出处:网络
In h开发者_运维问答ow many ways we can make .net connection with oracle(along with syntax) and which is the best syntax to use and why..Using the System.Data.OracleClient works very effectively for me

In h开发者_运维问答ow many ways we can make .net connection with oracle(along with syntax) and which is the best syntax to use and why..


Using the System.Data.OracleClient works very effectively for me. You will need to add that reference in your project before you can include the using System.Data.OracleClient;

You can learn more about working with this at MSDN: 1. Oracle Client Namespace & 2. Oracle Connection Class

You will need to connect, just like other dbs, using a connection string. There are options, I use TNS as directed by our database group. It seems to be reliable and efficient but I really can't compare it to other methods. For TNS you need make sure that your TNS file contains pointers to the Oracle server (rather like a "HOST" file) and your connection string will look something like: Data Source=YourOracleServer;User Id=Username;Password=Password; Remember that with Oracle (unlike MS-SQL) you don't need to specify a database name/schema/catalog as your UserID controls what resources you have access to.

0

精彩评论

暂无评论...
验证码 换一张
取 消