Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Importing data from Oracle server via ODBCto Excel on a mac?
I am trying to download data to an excel spread sheet on a mac from an Oracle server accessed via ODBC. I want to code this into Visual Basic code and pass the SQL command to the server. I am using the Merant ODBC version 3.51 software, which I've installed a demo version on my mac. I can access the server using Microsoft Query, so I know at least that works, but I can't find any commands in Visual Basic that properly works. Has anyone actually done this, and what method did you use?
I first tried to use SQLOpen and SQLExecQuery commands. The SQLOpen prompts me for username and password, but the SQLExecQuery command returns an error, and when I use SQLError, it gives me an error IMO001, with a message indicating that the SQL driver manager does not support this function. (FWIW, the same commands do work with local non-Oracle ODBC accessed database.)
Since Microsoft Query works, I decided to try and use DDE to access the data via Microsoft Query, i.e.:
Chan = DDEInitiate("MSQuery", "System") DDEExecute Chan, "[ODBCLogon('xxxxxx',1)]"
Chan is successfully filled with a connection number, but the next command doesn't work at all, as it returns an error 2023. Note that I can't even get this to work with local non-Oracle databases either. I tried both ODBCLogon and the simple Logon command.
Thanks very much.
Mark London
MRL_at_PSFC.MIT.EDU
Received on Wed Dec 26 2001 - 09:26:51 CST