Re: Change Database Driver at runtime in .NET?

From: Brian Bischof (BrianNoSpam_at_BischofSystems.com)
Date: 03/16/04

  • Next message: Gary White: "Re: ADO.NET DataSet/report caching"
    Date: Mon, 15 Mar 2004 18:24:56 -0800
    
    

    You can't change the database driver during runtime using .NET alone.
    Instead, you have to use the RDC or RAS to modify the report object. Since
    you have CR 8.5, then you could use the RDC to do so.

    HTH,

    Brian Bischof

    A Crystal Reports.NET book for programmers? Its here!
    * Covers ASP.NET and Windows Forms
    * Teaches all phases of report development
    * Alerts you to the bugs and how to get around them
    * Maps out the complex ReportDocument object model
    * Shows how to perform runtime customization
    * Demonstrates all options of connecting with ADO.NET
    * Gives complete code listings for every concept presented

    http://www.crystalreportsbook.com/123aspx.asp

    "Mario T. Lanza" <mlanza@lycos.com> wrote in message
    news:bda28a0.0403151159.47f265f@posting.google.com...
    > Hello All,
    >
    > I want to change the database driver of a Crystal Report from my .NET
    > code at runtime. (I want to use the pdssql.dll or p2ssql.dll
    > whichever one allows me to make a SQL Server connection. The report
    > is currently using an ODBC connection.)
    >
    > I saw a post where a DllName property was referenced...
    >
    > report.Database.Tables[0].DllName
    >
    > I have also seen...
    >
    > objdb.logonserver sDLLName, DSN, "DatabseName", UserID, Password
    >
    > Both of these expose the DLL Name that I want to change; however, I
    > cannot seem to find either method or property while working with the
    > code in Visual Studio.
    >
    > I am using C# code. Crystal version 8.5.
    >
    > I looked at the Crystal Forums and could find no help on this. In
    > fact, I have found the Crystal Forums rather useless in the past.
    > Plus, I don't have my registration handy (perhaps I lost it) so I
    > couldn't post there even if I wanted.
    >
    > Have any of you found a way to change the database driver during
    > runtime from .NET code?
    >
    > I have spent all day on this and could really use some help.
    >
    > Thank you.
    > Mario T. Lanza
    > Clarity Information Architecture, Inc.


  • Next message: Gary White: "Re: ADO.NET DataSet/report caching"

    Relevant Pages

    • "The database driver used by this report is not supported by this product"
      ... I get this error whenever I refresh the report viewer built in vb.net: ... The database driver used y this report is not supported by this ...
      (microsoft.public.vb.crystal)
    • "The database driver used by this report is not supported by this product"
      ... I get this error whenever I refresh the report viewer built in vb.net: ... The database driver used y this report is not supported by this ...
      (microsoft.public.vb.crystal)
    • Crystal Report Designer 9 (Exporting, Printing, Viewing)
      ... developers can now create reports at design time and use the RDC object ... The Report Designer Component is composed of 4 primary DLLs: ... Craxdrt9.dll – (Crystal Reports ActiveX Designer Run Time Library). ...
      (microsoft.public.vb.general.discussion)
    • Re: Group Fields runtime customization - Web Forms viewer?
      ... Every example that I have on Crystal Reports and .NET uses the report ... > You are correct that your code only works for the report object. ... > viewer control is extremely limited in its functionality and you would be ... > If you are going to be doing runtime customization of your reports, ...
      (microsoft.public.vb.crystal)
    • Re: RDC + ADO.NET dataset
      ... I have the exact code you need in Chapter 20 of my book. ... Here is an example of passing a dataset with two tables in it to the RDC. ... third parameter is the table's number in the report. ... * Maps out the complex ReportDocument object model ...
      (microsoft.public.vb.crystal)