首先是添加ORACLE和SQL Server的引用(reference),ORACLE用的是它自带的类库

实现ORACLE和SQL Server连接Imports System.Data.SqlClient
实现ORACLE和SQL Server连接
Imports Oracle.DataAccess.Client

 

在app.config里面设好connection string,具体如下:

实现ORACLE和SQL Server连接 <appSettings >
实现ORACLE和SQL Server连接    
<add key ="SQLServerConnectionString" value="Data Source=MAPPA03C;Initial Catalog=LVSS;Integrated Security=True"/>
实现ORACLE和SQL Server连接    
<add key ="OracleConnectionString" value ="DATA SOURCE=lvnet;PASSWORD=lvss;PERSIST SECURITY INFO=False;USER ID=LVSS"  />
实现ORACLE和SQL Server连接  
</appSettings>

 

然后便是在获得SQL Server和Oracle连接.

实现ORACLE和SQL Server连接    '--------------------------------------------------------------------
实现ORACLE和SQL Server连接
    'Function:        GetSQLServerConn()
实现ORACLE和SQL Server连接
    'Description:  Implement the connection to SQL server database with the connection string in app.config
实现ORACLE和SQL Server连接
    'Input:                
实现ORACLE和SQL Server连接
    'Remark:                  
实现ORACLE和SQL Server连接
    '--------------------------------------------------------------------
End Function

相关文章:

  • 2021-07-16
  • 2022-02-01
  • 2021-07-05
  • 2022-12-23
  • 2021-07-18
  • 2022-02-07
  • 2022-02-14
猜你喜欢
  • 2021-06-30
  • 2021-12-29
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
  • 2021-10-14
  • 2021-12-11
相关资源
相似解决方案