Instant client installation unavailable in ODBC data sources

I'm trying to install instant client to enable MS Excel to access an Oracle database. OS is Windows 7.
After installing instant client plus the odbc package, I can't see a new entry in the odbc data sources - only the standard Microsoft sources (Excel, Access, SQL Server) show up.
There's also an Oracle SQL developer installation on my computer. Connection to the database works fine in SQL developer - so the DB does exist and it is accessible.
Steps conducted during instant client installation:
- Downloaded basic lite instant client (11.2.0.3.0) for windows.x64
- Downloaded odbc package for windows.x64
- unpacked zip file to instantclient directory
- executed the odbc_install.exe in the instantclient directory. I'm not sure if this install.exe does anything at all. There was no error message but also no confirmation or reaction of any kind.
- executing the install file from the cmd window gave me a message, that the odbc drivers were already installed. So I guess odbc_install.exe was executed properly
- setting some system variables
     1) path variable: added instantclient directory to the ones already listed in path
     2) tns_admin: new entry, pointing to instantclient directory
     3) ld_library_path: new entry, pointing to instantclient directory
- wrote an tnsnames.ora file using the connect information also used in SQL developer
- saved tnsnames.ora file in instantclient directory
- rebooted computer to activate changes
When opening the odbc data source administration, I'm only able to see Microsoft drivers for Access, Excel, SQL Server. I'd expect to get an Oracle driver option to add to the installed drivers.
Wild & uneducated guesses about what might cause the problem:
- IC is installed on E: drive. Maybe some component is expected to be saved on C: (low likelihood, many others would have complained by now)
- Win 7 often asks for explicit permission to do this or that via popup windows. Maybe the odbc-component encounters such a request ans says "Ummm....???"
Any idea, what I might try to get an oracle entry in the odbc data source list?
Best regards
Peter
Edited by: 1003309 on 30.04.2013 05:33

I'm not sure to be honest, but what I downloaded did not have a setup.exe.
Does what you're talking about allow you to connect to Oracle databases via ODBC? If so, is it downloadble from the Oracle site?

Similar Messages

  • Oracle 817 client not available in ODBC Data Source Administrator pick list...

    I have installed Oracle 817 client on a PC.
    I can see the server, I can see the instance.
    I can log into the instance using SQLPlus with no problem.
    The product I'm using requires an ODBC connection configured in the ODBC Data Source Administrator.
    When I try to configure it in the DSA, Oracle 8 is not in the list.
    HELP!

    I assume you have Windows on the client. The "Drivers" page of the ODBC_DSA should list all installed drivers. You require:
    name= Oracle ODBC Driver
    version= 8.01.07.00 (or something similar)
    company= Oracle Corporation DO NOT USE the Microsoft one.
    If this does not show, then either it was not included in the Oracle Client installation or you have not rebooted after the Oracle Client installation; the ODBC driver is not visible until rebooted.

  • How can I delete an ODBC data source after 10g client has been uninstalled?

    I uninstalled the 10g client and now when I attempt to delete the ODBC data source, I get an error: "The setup routines for the Oracle in Oraclient10g_home2 ODBC driver could not be found. Please reinstall the driver. I re-installed the client and I get the same error, but I had to specify a new home. I still get the error. Anyone have an answer or a workaround to deleting the ODBC entry so that I can re-create with the same name later under the 9i client?

    I have the same problem... and nobody gots the point:
    1st. the ODBC and the client/home exists on the machine...
    2nd. the client/home is unistalled and so...
    3rd. tada! Now we have a impossible-to-unistall ODBC entry!
    That is happening on a Windows, at last to me...
    Please, help us if someone knows how to remove this ODBC entry... if know how to DO the stuff (permissions, system, all that things is answered above).
    Best regards,
    Bruno Araujo

  • Instant Client for Win32 and ODBC Application

    Hi.
    I just want to know how will Instant Client handle an ODBC Data Source in Windows 9X/2000/XP.
    Will it be a new ODBC Driver?, Can developers like me ship that "driver" with the application so that the end user could just open the application and use it without any other installation?.
    How many disk space will Instant Client need?, do we need to set up the Instant Client to connect to the source, as we need to do with the current client software, or will it be enough to set the Connection String?
    Thank for your help, I am developping a little application for my company that need to access an Oracle Database and need to be installed for many users on Windows XP Desktop Machines.

    I noticed your reply to this topic and I am
    having the same problem with OLE DB or ODBC.
    I posted the following on another message and
    nobody has answered. There are also no examples
    in the Oracle web site on how to connect to a
    remote client using ADO. Any help will be
    appreciated, Tony.
    I am trying to create an installation package
    from Visual Basic (version 6.0) that will let
    me connect to a remote Oracle database. Does
    anyone know what needs to be installed on the
    client machine? I created a standard package
    and it does not work on the client.
    My connection string is as follows:
    Dim adoCn As New ADODB.Connection
    adoCn.Provider = "OraOLEDB.Oracle"
    adoCn.ConnectionString = "Data Source=PSYTEST" _
    & ";User ID=SYSTEM" _
    & ";Password=Ciao" _
    & ";PLSQLRSet=1;" _
    & ";Remote Server=xxx.xxx.xxx.xxx"
    adoCn.Open
    The xxx.xxx.xxx.xxx is the IP address of the
    server. The program works when I use it on
    the local machine, but it does not work when
    I create an installation package and I install
    it on a remote client machine.

  • ODBC Data source administrator hanging for 20 seconds

    After installing 32 bit ODAC 11.2 Release 5 and Oracle Developer Tools for Visual Studio (11.2.0.3.20) our business is reporting slow Excel/VBA code using ODBC.
    The business are querying using a ODBC System DSN. It works but hangs for 20 second when VBA releases the connection.
    I can see that I get the same pause after testing the connection in the "ODBC Data Source administrator"
    1. Open ODBC Data Source administrator
    2. Edit the System DSN
    3. Push "Test Conncetion". Says "Connection succesful". Push OK
    4. Push "OK"
    ODBC Data Source administrator now hangs for 20 seconds.
    I did a clean installation on a Win7 x64 machine using 32 bit ODBC Data Source administrator
    Nothing to find in the eventlog.
    Does anyone know what could be wrong?

    Udpate: I tracked it down to Microsoft ISA Firewall Client installation. If I uninstall the ISA Firewall the problem disappears.
    Only disabling the ISA Firewall doesn't help!
    Other have reported the same behaviour https://groups.google.com/forum/#!topic/microsoft.public.isa.clients/F14GNANHppA
    Any help will be appreciated!
    Thanks

  • Instant Client Installation problems

    I am trying to install the 10g Instant Client to connect to our Oracle database via ODBC in Windows. I have downloaded the Instant Client Basic and the ODBC packages and put them into one folder on my hdd, ran the odbc_install.bat and added the folder to my PATH Environment variable. But when I try to create a new ODBC data source, the TNS Service Names don't make any sense and look like characters not readily found on my keyboard!
    Am I doing something wrong? Is there a walk through instruction manual available somewhere?
    Please help!!
    Many thanks

    I'm not sure to be honest, but what I downloaded did not have a setup.exe.
    Does what you're talking about allow you to connect to Oracle databases via ODBC? If so, is it downloadble from the Oracle site?

  • Problem in removing ODBC data source

    In order to implement connectivity between Advanced Analysis and SAP HANA, I intended to install the SAP HANA client tools, and accidentally installed the 64 bit version. When I discovered the mistake, I installed the 32 bit version without uninstalling the 64 bit driver. Then I created data sources using both the HANAODBC and HANAODBC32 drivers in the USER DSN and SYSTEM DSN tabs respectively of ODBC configuration.
    Some days later, I wanted to uninstall both the drivers using the hdbuninst.exe command - and after running it for both, I was able to remove the 64 bit ODBC data source that I had created. But I cannot remove the 32 bit ODBC connection. The error it gives me is "The setup routines for HDBODBC32 ODBC driver could not be found. Please reinstall the driver" followed by "Errors Found: The specified DSN contains an architecture mismatch between the Driver and the Application".
    I assume this is because I installed the driver with one version and try to install with another version (another SP) of software. Unfortunately, I have lost the previous version software dump. Reinstalling the driver from another spoftware dump and trying to remove the data source from User DSN also does not work. Any suggestions how I can remove the 32 bit ODBC data source?
    Best Regards
    Suneet

    And specifically the error I see in the log files while unistalling the 32 bit client driver is:
    SAP HANA Database Installation Manager - Uninstallation 1.50.00.354448
    17:09:36.160 - INFO: Uninstalling SAP HANA Database Client...
    17:09:36.185 - ERR: Uninstallation failed
    17:09:36.184 - ERR:   Cannot open installation exclusively
    17:09:36.184 - ERR:     Cannot open install registry
    17:09:36.184 - ERR:       InstallRegistry file is not open
    Regards
    Suneet

  • Excel-2007 cannot connect to Oracle ODBC data source, Control Panel can.

    <p>
    I cannot make an ODBC connection from Exce-2007 to Oracle work. I am an expert Excel and VBA user (since 1994) and I have frequently used Excel to access ODBC databases, including Oracle (I have done this with Excel-2003 both with worksheet queries and have written VBA ADO-connection routines). And even though in Excel-2007 a worksheet ODBC query is supposed to be easier to create than in previous version of Excel, my connection fails. Any suggestions and all help are welcome and much appreciated.
    DETAILS
    </p>
    <p>
    1) <strong>What is my system?</strong> I am using Excel-2007 on Windows Vista x64 and Oracle server v.11g on my computer (all this is on my computer, no network issues).
    2)<strong> Why use Excel with Oracle at all?</strong> I use Excel-2007 to access Oracle rather than Access-2007 (or any other application like TOAD, etc.) because I do engineering calculations with the data stored in Oracle. These calculations are easier done in Excel (I suppose that one alternative to this could be to use some sql or Access to get the data from the database, then store it as plain vanilla CSV file, then open this file in Excel, then do the math (the math involves complex optimisation algorithms), then save the results as CSV, then use some sql or Access to put the data back into the database. Howwever this does not strike me as a quick or neat solution. And after all Excel has been designed to access ODBC databases, so why not use it?)
    3) <strong>What do I do in Excel-2007 that won't work?</strong> I create an ODBC link to Oracle that does not work. In Excel-2007 this is straightforward:
    </p>
    <ul>
         <li>define an ODBC connection (Data tab --&gt; From other sources --&gt; From data connection wizard);</li>
         <li>define a query on the worksheet -- that's it, this is all!</li>
    </ul>
    <p>
    I start with creating an ODBC connection:
    a) I choose an ODBC data source type: <strong><em>ODBC DSN</em></strong>
    b) Excel-2007 displays the list of the available ODBC data sources. I see in it <strong><em>my Oracle database name</em></strong> and I select it.
    c) Excel-2007 displays the Data Link Properties:
    - the "Provider" has a list of the OLE DB drivers with preselected "<strong><em>Microsoft OLE DB Provider for ODBC Drivers</em></strong>". I keep this default selection.
    - the "Connection" tab has a connection string "<strong><em>DSN=&lt;my database name&gt;</em></strong>" which I keep, it also has fields for the <strong><em>user name</em></strong> and the <strong><em>password</em></strong>, which I fill with the correct credentials.
    - Finally there is a button "Test Connection", which when I click produces the following error message:
    <strong><font color="#ff0000">"Test connection failed because of an error in initializing provider.</font></strong><strong><br />
    </strong><strong><font color="#ff0000">Unespecified error"</font></strong><strong>
    </strong>
    4) <strong>Additional food for thought:</strong>
    a) In the above walk-through the only data, which I type, are the user name and password, everything else is selected from lists offered by Excel-2007, hence any possibility of typos being the cause of the problem can safely be discarded.
    b) I can test the ODBC driver in the Control Panel and it shows that it can connect to the Oracle database:
    - in <strong><em>Control Panel --&gt; Admin Tools --&gt; Data Sources (ODBC)</em></strong> on the "User DSN" tab I can see the list of the available ODBC data sources (same list as in Excel-2007, point 3b above) with the name of my database in it;
    - selecting the name of my database from the list of the sources and clicking "Configure" button opens a tab with <strong><em>Data Source Name</em></strong> (same as in Excel-2007), TNS Service Name and User ID. I enter <strong><em>&lt;user name&gt;/&lt;password&gt;</em></strong> and click "Test Connection" button. A message "<strong><em>Connection successful</em></strong>" appears (just for a test I enter <u>incorrect user credentials</u> and "<strong><em>Unable to connect</em></strong>" message appears)
    BOTTOM LINE
    </p>
    <p>
    The procedure for using an ODBC connection from Excel is very simple, in the past I have created and used such connections numerous times with Excel-2003 and earlier on Win-XP and earlier. But now on Excel-2007 and Vista-x64 I cannot make it work.
    Also, testing an ODBC connection driver is really easy and simple to be done in the Control Panel. There testing the same ODBC connection, which fails in Excel-2007, results in success.
    I am frustrated by the simplicity of the problem and yet the persistant error. I have lost now two full days in failed attempts to make the simple procedure work and in searching the internet for answers.
    All help is highly appreciated <img class="emoticon" src="images/emoticons/happy.gif" border="0" alt="" width="16" height="16" />,
    Plamen
    </p>

    Did you find the solution to your problem?
    If not, I think I may know.
    Excel 2007 is a 32-bit application.
    When installing 32-bit applications in a 64-bit environment, the "default" location is:
    C:\Program files (x86)\...
    Excel then launches from this location.
    However, when it connects to Oracle and passes the name of the calling program, Oracle attempts to "interpret" the value of (x86) as if
    the value within the parenthesis are being passed as a reference. Of course, iOracle doesn't find anything, so the result is (),
    and then it cannot return the connection info back to the calling application.
    I corrected it by installing Excel in C:\Program Files\, and once launched from that location, it works the same as on the 32-bit machines.
    However, at my location, they are FORCING Excel to be installed in the(x86) location.
    What I'm trying to discover now is:
    Is it possible to flag Oracle to NOT process the embedded variables?
    Or, is it possible to assign a variable in Oracle such that x86 = "(x86)", so that the end result is viable?
    Have you had any luck with your installation?
    thanks,
    Paul

  • Cannot get ODBC data source to talk to Oracle 10g for Windows

    Problem description
    I recently installed Oracle 10g on my laptop computer, which is running Windows 7. Everything went smoothly except for one crucial item: The ODBC data source I added keeps returning this error when I click the "Test Connection" button:
    Testing Connection
    Unable to connect
    [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed.
    I was using the following ODBC driver
    Oracle in OraDb10g_home1 (TNS Service Name = ORCL and User ID = scott)
    This type of error happened, in one form or another for the three other Oracle drivers I have on my machine
    Microsoft ODBC for Oracle
    WinSQL Oracle
    WinSQL Oracle Wire Protocol
    These services are currently running (status = Started)
    OractDBConsoleorcl
    OracleMTSRecoveryService
    OracleOraDb10g_home1iSQL*Plus
    OracleOraDb10g_home1TNSListener
    OracleServiceORCL
    (NOTE: I entered the foregoing information by hand, since I was not able to copy-and-paste it. So be aware that there is a small possibility of a minor typo in case you plan to cut-and-paste it.)
    If requested, I can provide the contents of these files
    tnsnames.ora
    sqlnet.ora
    listener.ora
    Other installations on the same computer
    ODAC (ADO data provider for Oracle)
    SQL Server 2009 Express
    .NET 4
    Visual Studio 2010
    Any help would be greatly appreciated!

    OK, I went ahead and upgraded to Windows 7 Professional and I STILL get the same error messages when trying to get the Oracle ODBC driver to talk to Oracle 10g. Here are some screen shots that show what happened:
    1) Select ODBC driver: http://yfrog.com/f3driverselectionp
    2) Configure driver: http://yfrog.com/ccoracleodbcfororaclep
    3) Test connection: http://yfrog.com/1goracleodbcfororacletestp
    I also get the following error when I try to run SQL*Plus from the line command, even with no parameters:
    C:\Users\Bruce>sqlplus
    SP2-1503: Unable to initialize Oracle call interface
    SP2-0152: ORACLE may not be functioning properly
    Any suggestions as to how I might to go about diagnosing (and fixing) this problem?
    Thanks,
    Bruce

  • ODBC Data Source Administrator (64-bit) crashes when I try to invoke PostgreSQL ANSI(x64) or Unicode(x64) drivers

    ODBC Data Source Administrator (64-bit) crashes with the following operation:
    1. Open 'ODBC Data Source Administrator (64-bit).
    2. Choose 'User DSN' tab
    3. Click 'Add' on right of windows. 'Create New Data Source' window opens
    4. Select driver 'PostgreSQL ANSI(x64)'
    5. Click 'Finish'
    6. Then get message 'ODBC Administrator has stopped working', with only option 'Close program'. A generic, unhelpful message is give: "A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available."
    Using the 32 bit ODBC Data Source Administrator and 32 bit driver there is no problem. I also had no problem with this under Windows 7 using the 64 bit drivers. What might cause this? Is there a way to debug and determine whether the driver is at fault or whether
    it's ODBC Data Source Administrator.
    Further information:
    This Windows 8 Enterprise 64 bit installation was an upgrade from Windows 7 Enterprise 64 bit.
    The PostgreSQL ANSI(x64) driver can be installed from: http://www.postgresql.org/ftp/odbc/versions/msi/
    I am using version 'psqlodbc_09_01_0200-x64'
    Please request any further information that might be useful.
    Regards,
    Tom.
    NB Reposted from   Windows 8 Hardware Compatibility forum. It's not really a hardware problem.

    Hi,
    This type issue should be more related to SQL product. You may post the issue on SQL forum.
    http://social.msdn.microsoft.com/Forums/en/category/sqlserver
    Kim Zhou
    TechNet Community Support

  • ODBC driver not recognized by Windows ODBC Data Source Administrator

    Using Windows XP Professional with all patches. I installed Oracle 10g Client, then removed ODBC driver and loaded 10.1.0.1.3 ODBC driver. Windows ODBC Data Source Administrator will not see this driver. (It also didn't see the previous driver, which is why I tried the new one.) The driver is in the registry (HKEY_LOCAL_MACHINE: SOFTWARE\ODBC\ODBCINST.INI) properly configured. It was not in the odbcinst.ini (Windows directory) file however, so I manually added it. I found directions on this site to be sure the drivers were loaded in the Oracle home directory, which is where I put them.

    Hi Joe,
    According to your description, after you run C:\Windows\SysWOW64\odbcad32.exe, Access driver is not displayed when you expand HKEY_LOCAL_MACHINE>ODBC>ODBCINST.INI node.
    The issue is caused by wrong path of odbccad32, please make sure that you are using Administrator account or you have administrative privileges, then refer to the following steps:
    Go to Control Panel.
    Click Administrative Tools.
    Right-click Data Sources(ODBC) to open Properties dialog box.
    In Target text box, type  %windir%\syswow64\odbcad32.exe             
    In Start in text box, type %windir%\syswow64, then click OK to  save the settings.
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu

  • Setting up an ODBC data source to connect to BerkleyDB

    How can I set up an ODBC data source (DSN) to connect to BerkleyDB. I installed Berkeley DB 11gR2 (11.2.5.0.21) on Windows XP 32-bit and I can see the sqlite3odbc.dll in the installation bin folder but there seems to be no BerkleyDB ODBC driver listed in Windows ODBC Adminstrator app

    Hi,
    I'm afraid that we don't ship an installer with our initial release. It is possible to install manually, but it requires making some changes to the source code, building the ODBC driver and installing manually.
    The steps are as follows:
    <li>Edit the file db-5.0.21/sql/odbc/sqlite3odbc.c at line 15919 change "drivername" and "dsname" variables to contain the driver strings you would like to use.
    <li>Follow the instructions to build the dll in the install guide here: http://www.oracle.com/technology/documentation/berkeley-db/db/installation/build_win_sql.html#id3371140. NOTE: You only want to follow the build steps here, not the configure or install steps.
    <li> Once you have built the sqlite3odbc.dll file, you'll need to follow the manual install steps defined in the README here: http://www.ch-werner.de/sqliteodbc/README . Search for the section titled Win32 install/remove/shell by RUNDLL32
    I hope this helps, let me know if you need further information.
    Regards,
    Alex Gorrod, Oracle Berkeley DB

  • Cant see 64 bit odbc data source

    hi..
    i using bo 4.0 sp2 patch 3....64 bit server and i trying to connect 64 bit sql server.
    i created 64 bit odbc data source from syswow64>odbcat32
    but; in designer trying create a odbc connection for this data source but i cannot see this data source..just see 32 bit odbc data source.
    whats the problem.
    thanx in advance..

    Hello,
    When using the Universe Designer on the work station you are running it in 32 bit and therefore needs the 32 bit DSN and client. Once you publish it to the BOE Server then it is using the 64 bit connector.
    So install the 64 bit client tools on your BOE Server and name the 64 bit DSN exactly the same as your 32 bit DSN on the work station and then it should work.
    Or rename the 32 bit DSN on your work station the same as your BOE Server.
    Don

  • Data source creation with XEClient driver crashes ODBC Data Source Admin.

    OS: Windows XP Professional SP2
    How to reproduce:
    1. Install Oracle XEClient 10g from: http://www.oracle.com/technology/software/products/database/xe/htdocs/102xewinsoft.html
    2. (optional) You may need to install MSVCRT71.DLL and MFC71.DLL (see Re: odbc error in XE and 9i
    3. Open Control Panel
    4. Double-click on the Administrative Tools icon
    5. Open Data Sources (ODBC) applet.
    6. Click Add button
    7. Select Oracle in XEClient
    8. Name the Data Source.
    9. Press OK
    10. Double-click on the Data Source. The ODBC Data Source Administrator crashes.

    OS: Windows XP Professional SP2
    How to reproduce:
    1. Install Oracle XEClient 10g from: http://www.oracle.com/technology/software/products/database/xe/htdocs/102xewinsoft.html
    2. (optional) You may need to install MSVCRT71.DLL and MFC71.DLL (see Re: odbc error in XE and 9i
    3. Open Control Panel
    4. Double-click on the Administrative Tools icon
    5. Open Data Sources (ODBC) applet.
    6. Click Add button
    7. Select Oracle in XEClient
    8. Name the Data Source.
    9. Press OK
    10. Double-click on the Data Source. The ODBC Data Source Administrator crashes.

  • Using Excel & ODBC data source to get data

    I've been using MS Excel to extract MS SQL Server data from our ERP system for years but we are now moving to Oracle 12i. What are my options in the Oracle world? Can it be configured much the same way; that is by configuring an ODBC data source and connecting directly to the database???
    Thanks in advance.

    user11307988 wrote:
    I've been using MS Excel to extract MS SQL Server data from our ERP system for years but we are now moving to Oracle 12i. What are my options in the Oracle world? Can it be configured much the same way; that is by configuring an ODBC data source and connecting directly to the database???
    Thanks in advance.Adding to sb92075's brief but accurate statement, from one of my recent presentations (note - no need for an ODBC connection):
    'Need to add a reference to Microsoft ActiveX Data Objects 2.8 Library before starting
    '*** This section might be in the top portion of the user form, worksheet code, or module:
    'Declare a connection object in the general section to hold the connection to the database
    Dim dbVMFG As ADODB.Connection
    'Declare a set of variables to hold the username and password for the database
    Dim strUserName As String
    Dim strPassword As String
    Dim strDatabase As String
    Dim i as Integer
    Dim intResult As Integer
    Dim strSQL as String
    Dim lngRow as Long
    On Error Resume Next
    strDatabase = "MyDB"
    strUserName = "MyUser"
    strPassword = "MyPassword"
    'Connect to the database
    'Oracle connection string
    Set dbVMFG = New ADODB.Connection
    dbVMFG.ConnectionString = "Provider=OraOLEDB.Oracle;Data Source=" & strDatabase & ";User ID=" & strUserName & ";Password=" & strPassword & ";ChunkSize=1000;FetchSize=100;"
    dbVMFG.ConnectionTimeout = 40
    dbVMFG.CursorLocation = adUseClient
    dbVMFG.Open
    If (dbVMFG.State <> 1) Or (Err <> 0) Then
        intResult = MsgBox("Could not connect to the database.  Check your user name and password." & vbCrLf & Error(Err), 16, "Excel Demo")
    Else
        strSQL = "SELECT" & VBCrLf
        strSQL = strSQL & "  ID AS RESOURCE_ID," & VBCrLf
        strSQL = strSQL & "  DESCRIPTION" & VBCrLf
        strSQL = strSQL & "FROM" & VBCrLf
        strSQL = strSQL & "  MY_TABLE" & VBCrLf
        strSQL = strSQL & "WHERE" & VBCrLf
        strSQL = strSQL & "  DESCRIPTION LIKE '%10%'" & VBCrLf
        strSQL = strSQL & "ORDER BY" & VBCrLf
        strSQL = strSQL & "  ID"
        'Add a new worksheet to the new workbook, add after the last sheet
        ActiveWorkbook.Sheets.Add
        ActiveWorkbook.ActiveSheet.Name = "JustATest"
        snpData.Open strSQL, dbVMFG
        If snpData.State = 1 Then
            'Slow Method------------------------------------
            lngRow = 0
            'Header Row
            For i = 0 To snpData.Fields.Count – 1
                lngRow = lngRow + 1
                ActiveSheet.Cells(lngRow, i + 1).Value = snpData.Fields(i).Name
                ActiveSheet.Cells(lngRow, i + 1).Font.Bold = True
            Next i
            'Detail Rows
            Do While Not snpData.EOF
                lngRow = lngRow + 1
                For i = 0 To snpData.Fields.Count - 1
                    ActiveSheet.Cells(lngRow, i + 1).Value = snpData.Fields(i)
                Next i
                snpData.MoveNext
            Loop
            'End Slow Method------------------------------------
            'Fast Method----------------------------------------
            'Do not use this and the slow method!
            For i = 0 To snpData.Fields.Count - 1
                ActiveSheet.Cells(1, i + 1).Value = snpData.Fields(i).Name
            Next i
            ActiveSheet.Range(ActiveSheet.Cells(1, 1), ActiveSheet.Cells(1, snpData.Fields.Count)).Font.Bold = True
            ActiveSheet.Range("A2").CopyFromRecordset snpData
            'Auto-fit up to 26 columns
            ActiveSheet.Columns("A:" & Chr(64 + snpData.Fields.Count)).AutoFit
            'End Fast Method----------------------------------------
            snpData.Close
        End If
    End IfA couple of notes:
    1. Do not repeatedly connect to the database, execute a SQL statement, and disconnect from the database - connect once and stay connected.
    2. Use bind variables where possible in SQL statements for constants (literals) which might change from one execution to the next - let me know if you need s code example showing bind variable usage in Excel.
    Charles Hooper
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

Maybe you are looking for