I have a code which connects to the Oracle Database, in that code i am executing a sql which will fetch data from a table.
I would like to store the values from all the columns in Sheet2. Kindly help me on the code.
Sub Ora_Connection()
Dim sourceCnn As ADODB.Connection
Dim sourceRst As ADODB.Recordset
Set sourceCnn = New ADODB.Connection
Set sourceRst = New ADODB.Recordset
strCon = "Provider="";User ID="";Password="";Data Source="""
sourceCnn.Open (strCon)
sourceRst.ActiveConnection = sourceCnn
sourceRst.Source = " SELECT * FROM TABLE"
sourceRst.Open
MsgBox "Connected Successfully", vbOKCancel
End Sub
Bookmarks