开发者

UDL file for creation a connection string

开发者 https://www.devze.com 2023-02-11 09:29 出处:网络
I开发者_Go百科 am going to use UDL file to create connection. Is there any difference between UDL file with oracle connection string and MS SQL Server connection string?

I开发者_Go百科 am going to use UDL file to create connection. Is there any difference between UDL file with oracle connection string and MS SQL Server connection string? Can I use:

DbConnection con = new DbConnection("File Name="+Server.MapPath("\\Conn.udl")); 

for both type of connection - oracle and microsoft database? and what


Your approach with UDL file will work, but there is no ctor for DbConnection, you have to use the specific implementation like OleDbConnection for OLE DB connectivity (except MS ODBC driver, OdbcConnection fails to open connection until DSN is explicitly set).


Yes - i have testet it many times with SQL 2000/5/8 and Oracle (9i and 10g)

0

精彩评论

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