Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Newbie : Oracle Data to Excel


I am using Excel 2002.

I wanted my VBA code to connect to Oracle, do a select statement, and
get data. Then I wanted to put that data into a spreadsheet.

My question is, how do I connect to Oracle via Excel. Is there an
example that I can get that shows me how to do this?

...

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 253
Default Newbie : Oracle Data to Excel

Hio all,


Look for ADO in this group. Example were posted before.
If you don't, please repost.
Regards
JY

'First make a reference via Tool/References .... To Microsoft ActiveX Data
Objects 2.x

Sub test()
Dim connMdb As ADODB.Connection
Dim recMdb As ADODB.Recordset
Dim strStatus As String

Set connMdb = New ADODB.Connection
Set recMdb = New ADODB.Recordset
"open a connection to the DB
connMdb.conn.Open "Provider=MSDAORA;Data Source=theDB", "userID", "password"
recMdb.Open "SELECT Name, Surname FROM STAFF ;", connMdb, adOpenForwardOnly,
adLockOptimistic
Do while recMdb.EOF = False
debug.print recmdb.fields("Name").value & " " &
recmdb.fields("Surname").value
Loop
recMdb.Close
Next cl

connMdb.Close
Set recMdb = Nothing
Set connMdb = Nothing
End Sub

"Dave M." <Dave wrote in message
...
I am also a newbie who just went through this same thing. I have never
worked with Oracle but I'm sure it would be very similar. You will need

to
install an ODBC driver into Excel for your database then you will be able

to
Import External Data Using Excel. After the driver is installed you will

be
able to select your tables and write your query. Good Luck!



" wrote:


I am using Excel 2002.

I wanted my VBA code to connect to Oracle, do a select statement, and
get data. Then I wanted to put that data into a spreadsheet.

My question is, how do I connect to Oracle via Excel. Is there an
example that I can get that shows me how to do this?

...




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Loading data from Excel to Oracle Dr Sanjay New Users to Excel 1 May 26th 06 03:06 PM
How to get data from Oracle Database to Excel? David Willis New Users to Excel 1 March 31st 06 01:57 PM
Oracle data to excel Kim[_8_] Excel Programming 2 October 21st 03 12:29 PM
Excel data into Oracle table EWill Excel Programming 3 October 10th 03 11:50 PM
Excel retrieves data from Oracle Patrick Molloy Excel Programming 1 August 29th 03 08:47 AM


All times are GMT +1. The time now is 09:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"