我编写了一个简单的VBScript,使用Oracle Provider for OLE DB通过硬编码变量({{1},strUsername
,strPassword
)来查询Oracle数据库:
strDataSource
但是我正尝试从CSV文件中获取变量(On Error Resume Next
Dim strSQL, strDataSource, strUsername, strPassword, CountFields
Set dbData = CreateObject("ADODB.Recordset")
Set dbConnection = CreateObject("ADODB.Connection")
strDataSource = "MyDB"
strUsername = "MyUserName"
strPassword = "MyPassword"
dbConnection.ConnectionString = "Provider=OraOLEDB.Oracle;Data Source=" & strDataSource & ";User ID=" & strUsername & ";Password=" & strPassword & ";"
dbConnection.Open
strSQL = "SELECT 1 FROM DUAL"
dbData.Open strSQL, dbConnection
,strUsername
,strPassword
)的值:
DataSource,Username,Password TestDB,Erik,Aa123456 TestDB2,Jeff,Bb123456 TestDB3,Jane,Cc123456
到一个数组,但是没有运气。