Determining the ODBC data source from a Subreport - VB6, CR8.5 OCX

I am using Crystal 8.5 OCX and VB6 to run some reports.  Users run reports on different databases with the same table structures.  All run from ODBC sources that change in name also.  The reports are just rpt files on the hard drive that are run when the user wants them run.
The running is fine and I can change database locations without problems.  But I have run across circumstances now that some reports have some subreports that have different ODBC drivers from the main report and therefore need to be changed differently.  I won't always know what the subreport names are nor if they even exist in specifc reports.  The code below is what I am using and it works to change the subreport connection.  But I can't figure out how to determine what the current connection is when it was designed.  If I know what the connection is when it is designed, I can redirect it to the proper new driver.
    intNumSubs = crReports.GetNSubreports
    For X = 0 To intNumSubs - 1
        title = crReports.GetNthSubreportName(X)
        With crReports
            .SubreportToChange = title
            strCurrentConnect = 'want to add something here to find the current connection string and then make a decision to change it or not
            .Connect = sConnect
        End With
    Next X
My default solution that I believe will work is to force the naming of a subreport specifically to identify the subreports that need different ODBC drivers from the default change, but I am not the only programmer of reports so anyone could name a subreport anything and that is very difficult to change once designed.
So does anyone have any idea how I can get the connection string or the ODBC driver that the subreport was created on from a subreport (and I guess I will probably be interested in the main report also) before I change it?
TIA rasinc

Please re-post if this is still an issue to the Legacy Application Development SDKs Forum or purchase a case and have a dedicated support engineer work with you directly

Similar Messages

  • Why do SQL sample programs work when there is no entry for the data sources in the ODBC Data Source Administrator that are used by the sample program?

    Hi,
    I am trying to understand how to access an SQL database from CVI.  
    I don't understand how the sample programs shipped with the toolkit can access the database they use if it is not listed in the ODBC Data Source Administrator.
    In the code, I see the line:
    hdbc = DBConnect ("DSN=CVI SQL Samples");
    However, there is not an entry that I can find in the ODBC Administrator for "CVI SQL Samples."
    The SQL help suggests there should be a User DSN named, "CVI32_Samples", but I don't see that entry in the ODBC Administrator on my win-7 system.
    I believe the sample program is accessing a database file named, "C:\Users\Public\Documents\National Instruments\CVI\Samples\sql\samples.mdb".
    Exactly how is the call to DBConnect() translated to the file, "samples.MDB", if there is no entry in the ODBC Administrator?
    Regards,
    Mark 

    I figured it out.  There is a 32 bit ODBC administrator and a 64 bit ODBC administrator.  The ODBC administrator I run through the control panel is the 64 bit ODBC administrator. To access the 32 bit administrator I need to run, "C:\Windows\SysWOW64\odbcad32.exe".
    I am running the samples in 32 bit mode, so I need to use the 32 bit ODBC administrator.
    Best,
    Mark

  • Automatic Creation of ODBC Data Source From Within Java App

    Good Day Good People :)
    I was wondering if it were possible for a java application to automatically set up an ODBC data source for a JDBC connection in a windows environment.
    This is the method I call to initialise a connection to my database:
    public void initialiseLocalConnection ()
    url = "jdbc:odbc:ICUDB";
    try
    Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
    icuCon = DriverManager.getConnection (url);
    catch (Exception e)
    JOptionPane.showMessageDialog (null, "Error Creating Connection to ICU Database!\n" +
    "Please set up an ODBC data source pointing\n" +
    "to the icudb.mdb file located in the data\n" +
    "folder of the ICU directory and call the\n" +
    "connection 'ICUDB'.", "Database Connection Error", JOptionPane.ERROR_MESSAGE);
    Is it possible to create the ODBC data source ICUDB if it does not exist from within my application.
    All information regarding the possibilty and the application of doing this would be greatly appreciated.
    Kind Regards
    Matt

    Thank you.
    During my search I for dsn-less connections I found the soloution:
    url = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=" +
    System.getProperty ("user.dir") + System.getProperty ("file.separator") +
    "data" + System.getProperty ("file.separator") + "icudb.mdb";
    try
    Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
    icuCon = DriverManager.getConnection (url);
    This works.
    Thanks for the replies.
    Matt :)

  • The ODBC data source administrator does not have the mysql odbc 3.51 driver

    Hi^^,
    I am trying to create the DSN for the type 1 driver.
    I go the the ODBC data source administrator > click userdsn>add
    It takes me to the screen"Create new data source"
    Here i want to select Mysql ODBC 3.51 Driver and then click on finish.
    My problem is that I do not have the choice of Mysql ODBC 3.51 Driver.
    How do I get it among my list of choices.
    Is the mysql software corrupt and do i need to install it.
    Regards,
    Prashant

    Don't use odbc at all for java <-->MySQL. Use the JDBC driver from the MySQL website

  • Access odbc data sources from PL/SQL

    Dear All,
    I would like to know is there any way where i could access odbc data sources from pl/sql (i.e i would like to insert, update records into MSAccess table from pl/sql procedures, triggers). Would appreciate any help regarding this.

    The only way I know of how is to write and external function library and use that to access ODBC datasource ...if someone else knows something else I would be interesting in hearing about that also.

  • 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.

  • 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

  • Can no longer upload photos - ODBC data source error [was: Photoshop Album Starter Edition 3.2]

    Hi everyone! Thanks in advance for any help somone  can provide!
    I can no longer upload photos, which sucks. I get an error message thats says : The ODBC data source returned the following error: "[Microsoft][ODBC Microsoft Access Driver] The search key was not found in any record."
    I understand adobe is no longer issuing updates for this program, but is there anything I can do to salvage it? Oh I hope there is. Thanks again!

    [Moved from Photoshop forum to Photoshop Album Starter Edition forum]

  • 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?

  • ODBC data source error, invalid cursor state??

    I'm using Photoshop Album Starter Edition 3.0, on Windows XP, and I was having some trouble organizing so I deleted all the photos in the catalogue, but now I can't add any new images. After opening the program and trying to add new pictures, I get the error that the files can't be found. After that one time, every time I try to add any photos at all, it gives me this error:
    The ODBC data source returned the following error:
    "[Microsoft][ODBC Microsoft Access Driver]Invalid cursor state"
    I've tried restarting the program, the computer... I don't know what the error even means or how to solve this problem. So if anyone has any ideas, please let me know. Oh, and I would reinstall the program, except I think it just came with the computer, I don't have a cd with it or anything. Is there somewhere else or another way to reinstall? Anyhow I'm done now, please help if you can. Thanks. :)

    Since this is a free software, you can download this from Adobe.com. Try reinstalling Photoshop Album Starter Edition 3.0. If Reinstall does not work, try repairing the Windows ODBC drivers.
    The reason for the error may be the Windows ODBC Drivers.To repair the ODBC drivers, follow these steps:
    1) Go to Start>Settings>Control Panel. Select Add/Remove Programs and select SP2 and uninstall.
    2) Insert your original Win XP CD and choose the Upgrade option.
    3) When completed, reinstall SP2. Go to Start>Windows Updates and select SP2.
    You can also try this:
    Install Windows XP Service Pack 2 _or_ install the "Microsoft Data Access Components (MDAC) 2.8" from http://www.microsoft.com/downloads/details.aspx?FamilyID=6c050fe3-c795-4b7d-b037-185d0506 396c&DisplayLang=en
    Please let us know if that worked.
    -Smriti

  • 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

  • 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

  • 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

  • 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.

  • The '' secondary data source is not a relational data source, or does not use an OLE DB provider.

    Hi,
    We are using Teradata as data source in SSAS 2008R2, it’s using ‘.Net Providers\.Net Data Provider for Teradata’.
    In DSV, we have two data sources both using Teradata. While processing dimensions, all dimensions coming from secondary data source has error message”
    The '' secondary data source is not a relational data source, or does not use an OLE DB provider.”
    But we are not using OLE DB provider for now, we’ve searched some threads that named queries can be replaced for secondary ds, but since we have a lot of tables, it’s hard to implement using named queries.
    Any inputs would be appreciated. 

    Hi memostone,
    When defining a data source view that contains tables, views, or columns from multiple data sources, the first data source from which you add objects to the data source view is designated as the primary data source (you cannot change the primary data
    source after it is defined). After defining a data source view based on objects from a single data source, you can then add objects from other data sources.
    If an OLAP processing or a data mining query requires data from multiple data sources in a single query, the primary data source must support remote queries using
    OpenRowset. Typically, this will be a SQL Server data source.
    Here are the restrictions:
    The primary data source should be SQL Server and support OpenRowset to the secondary data source.
    Or you design the cube in such a way that rocessing for each object only needs to access data from a single data source
    I recommand you refer to the following article:
    Defining a Data Source View (Analysis Services):
    http://technet.microsoft.com/en-us/library/ms174600.aspx
    Regards,
    Bin Long
    TechNet Community Support

Maybe you are looking for