connection to oracle with excel

  • Thread starter Thread starter andy
  • Start date Start date
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
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top