를 연결하기 위해 노력하고있어
오라클에 연결하고 나는 그것을 설정하려면 암호를 입력 할 필요가 없습니다.
내가 가지고있는 문제 중 하나는 SQL 쿼리가 INTERFACE.Products를 사용하고 Access에서 기간을보고 파일을 여는 중입니다. IE Interface.MDB, 언제 내 SQL 쿼리의 일부. 이 단지 Oracle 데이터베이스에 그대로 쿼리를 보낼 것
Set rst = db.OpenRecordset(mQuery, dbOpenSnapshot, dbSQLPassThrough)
:
Option Compare Database
Function OracleConnect() As Boolean
Dim ws As Workspace
Dim db As Database
Dim LConnect As String
Dim myQuery As String
Dim myRS As Recordset
On Error GoTo Err_Execute
LConnect = "ODBC;DSN=Oracle;UID=user;PWD=password;"
'Point to the current workspace
Set ws = DBEngine.Workspaces(0)
'Connect to Oracle
Set db = ws.OpenDatabase("", False, True, LConnect)
myQuery = "Select * from INTERFACE.Products"
Set rst = db.OpenRecordset(myQuery)
rst.Close
db.Close
Exit Function
Err_Execute:
MsgBox MsgBox("Error Number: " & Err.Number & " Message: " & Err.Description)
End Function