connection to oracle with excel

A

andy

hi
i am trying to connect to an oracle database do a query
and return the results to a worksheet
i know that i can record a macro and do it that way but i
am tring to do it myself
here is what i have so far

Dim sConn As String
Dim sSql As String

sConn = "ODBC;DSN=DAN;uid=ear;pwd=ear;"
Set rsb = sConn.OpenRecordset(sSql)
sSql = "SELECT * "
sSql = sSql & "FROM ear_form_s"


havent got a clue where to go form here
hope someone can help

andy
 
F

Frank Stone

if we do it for you, you're still not doing it yourself.
anyway, what's wrong with record. even if I know how, I
still start a new macro with record. Can save you a lot of
typing.
Have to tried Data>Get External Data>New Query? I use it
extensively.
 
Top