Showing posts with label ODBC. Show all posts
Showing posts with label ODBC. Show all posts

2019-03-03

VBA - Database and ODBC

VBA - Database and ODBC
*---
---*

VBA - ADODB
Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
With conn
.ConnectionString = cnn_str("OracleODBC32") ''OracleODBC32
.CursorLocation = adUseClient
.Open
End With

VBA - ODBC with Connection Strings
*---
---*

VBA - Excel SQL Solution















2019-02-20

VBA - Oracle ODBC connection string


ODBC로 Oracle 데이터베이스 연결하는 경우, VBA ConnectionString 구성.

1. 윈도우즈 DSN을 설정하고 사용하는 경우.
(ODBC관리자에서 사용자 또는 시스템 데이터소스가 설정되어 있어야 한다. 여기서는 dsnOra로 설정됨)
'' ODBC using Data Source Name 
Dim connStr As String
connStr = "DSN=dsnOra;UID=HR;PASSWORD=1111;"
...



2. Oracle ODBC직접 설정 연결,
'' Direct connetion to Oracle ODBC 
Dim connStr As String
connStr = ("DRIVER="Oracle in OraDb11g_home1;" & _
"SERVER=ORCL;" & _
"DBQ=ORCL;" & _
"Uid=HR;" & _
"Pwd=1111;" )
...