Building Connection string in Crystal 10

Hi,
How to build a connection string in Crystal 10 using DSN as data source?
I tried the following syntax, but failed to establish connection...
Driver={SQL Server};Server=;Uid=<username>;Pwd=<pwd>;
Help me to fix this out.
Thanks
Viswa

Hey Prathamesh,
I was asking the option available in the crystal client itself!
In the data source selection, there is three options available:
1. Data Source Name
2. File name DSN
3. Enter Connection String
I asked about the 3rd option in that dialog; in which we can directly enter the connection string for the data source connection. I don't think this is related with SDK Application Development.
Thanks
Viswa
Edited by: Viswanathan Madhavan on Nov 27, 2008 3:08 AM

Similar Messages

  • Connection String with Crystal Report XI R2

    Hello,
    I am having an issue with Crystal Reports XI R2 and figured this would be a good place to start and post my question.
    I created a report in Crystal Reports XI and am now trying to pass the user id and password so that the user can just run the report. I attempted to use the Crystal Report connection string setup but receive an Microsoft ODBC error when trying to use that.
    My question is how can you pass a userid and password to crystal report XI so that when you open the report it runs without prompting the user? I do not have access to .NET. Can this be done using Crystal Reports XI only?
    Thanks in advance for your help
    Shaun

    Hi Shawn,
    Standalone CR can only do that if using a URL to open a report in BOE.
    For CR Designer itself the only option is to turn on Trusted Authentication in your Server, used Mixed mode and then import all of your users into SQL Server. Refer to MS's Help file on how to.
    Now when the user runs the reports CR will simply pass the local user info to SQL Server and no prompting will be required. We still respect DB security so if the user is not allowed to access the table then CR respects that.
    Thank you
    Don

  • Linq2sql Connection string for crystal report. Report requires logon

    If I take out the connection string info the report runs fine from my machine but any other user it asks for logon information so I am trying to add the connection info. The line that is not compiling is `cr1.SetDatabaseLogon(connection, cr1);`
    What am I doing wrong? Any help would be appreciated!
        private void launchReport(int pKReport)
            using (DataClasses1DataContext db = new DataClasses1DataContext())
                var query = (from s in db.expenseHdrs
                             join d in db.expenseDtls on s.rptNo equals d.rptNo
                             where s.rptNo == pKReport
                             from g in db.employees
                             join r in db.expenseHdrs on g.pk equals r.empPk
                             select new
                                 s.period,
                                 s.description,
                                 s.department,
                                 s.rptNo,
                                 s.reimbursement, g.name,
                                 d.expDate,
                                 d.expType,
                                 d.expDesc
                CrystalReport1 cr1 = new CrystalReport1();
                ConnectionInfo connection = new ConnectionInfo();
                connection.DatabaseName = "intranet";
                connection.UserID = "sa";
                connection.Password = "*****";
                cr1.SetDatabaseLogon(connection, cr1);
                cr1.SetDataSource(query);
                crystalReportViewer1.ReportSource = cr1;
    I also tried changing the code after my query to below but I still have the exact same problem as before when I didnt have the connection string credentials. On every user but myself I get the same sql server login screen and no matter what I enter it fails. I think it is due to there being no database name which it will not allow me to manually enter.
         CrystalReport1 cr1 = new CrystalReport1();
                    cr1.FileName = @"C:\Intranet\CrystalReport1.rpt";
                    ConnectionInfo connectionInfo = new ConnectionInfo();
                    connectionInfo.ServerName = "svr-sql";
                    connectionInfo.DatabaseName = "intranet";
                    connectionInfo.UserID = "sa";
                    connectionInfo.Password = "*****";
                    SetDBLogonForReport(connectionInfo, cr1);
                    cr1.SetDataSource(query);
                    crystalReportViewer1.ReportSource = cr1;
        private void SetDBLogonForReport(ConnectionInfo connectionInfo, CrystalReport reportDocument)
                Tables tables = reportDocument.Database.Tables;
                foreach (CrystalDecisions.CrystalReports.Engine.Table table in tables)
                    TableLogOnInfo tableLogonInfo = table.LogOnInfo;
                    tableLogonInfo.ConnectionInfo = connectionInfo;
                    table.ApplyLogOnInfo(tableLogonInfo);

    The code I use is as follows:
    Dim crDatabase As Database
    Dim crTables As Tables
    Dim crTable As Table
    Dim crTableLogOnInfo As TableLogOnInfo
    Dim crConnectionInfo As ConnectionInfo
    Dim crReportDocument As ReportDocument
    CrConnectionInfo = New ConnectionInfo
    With crConnectionInfo
    .ServerName = "dbconn1"
    .DatabaseName = "Pubs"
    .UserID = "vantech"
    .Password = "vantech"
    crDatabase = crReportDocument.Database
    crTables = crDatabase.Tables
    End With
    crDatabase = crReportDocument.Database
    crTables = crDatabase.Tables
    For Each crTable In crTables
    crTableLogOnInfo = crTable.LogOnInfo
    crTableLogOnInfo.ConnectionInfo = crConnectionInfo
    crTable.ApplyLogOnInfo(crTableLogOnInfo)
    Next
    This assumes that there are no subreports (or at least that if there are subreports, they use identical db connection info).
    My recommendation would be to test the above code with a simple test report (one table, one field). If you have subreports, you may need to set the logon for those also - depends on how the subreports are implemented. Subreport logon code would be something like this:
    Dim crSubreportDocument As ReportDocument
    crSubreportDocument = crReportDocument.OpenSubreport("Ron")
    crConnectionInfo = New ConnectionInfo
    With crConnectionInfo
    .ServerName = "Rcon1"
    .DatabaseName = "Northwind"
    .UserID = "vantech"
    .Password = "vantech"
    End With
    crDatabase = crSubreportDocument.Database
    crTables = crDatabase.Tables
    For Each crTable In crTables
    crTableLogOnInfo = crTable.LogOnInfo
    crTableLogOnInfo.ConnectionInfo = crConnectionInfo
    crTable.ApplyLogOnInfo(crTableLogOnInfo)
    Next
    Alternatively, you could download the db logon writing utility that is attached to this KB and implement that.
    - Ludek
    Follow us on Twitter
    Got Enhancement ideas? Try the SAP Idea Place
    Share Your Knowledge in SCN Topic Spaces

  • Sql Connection String Problem

    Hi , hope you all are fine. I am new to JDBC. need to connect to MS SQL Server 2000 using JSP. i am having trouble in connection string. I have MS SQL Server 2000 installed on my Machine and for Login i am using Window Auth mode(not using username=sa etc) i am using Windows XP Proffessional. i have put these files in the lib folder of my application
    msbase.jar
    mssqlserver.jar
    msutil.jar
    Connection driver i am using is
    Class.forName(
                              "com.microsoft.jdbc.sqlserver.SQLServerDriver");Please if u can help me in building connection String... Your help is always appriciated.
    regards
    Adee

    Hi , hope you all are fine. I am new to JDBC. need to
    connect to MS SQL Server 2000 using JSP. i am having
    trouble in connection string. I have MS SQL Server
    2000 installed on my Machine and for Login i am using
    Window Auth mode(not using username=sa etc) i am
    using Windows XP Proffessional. i have put these
    files in the lib folder of my application
    msbase.jar
    mssqlserver.jar
    msutil.jarExcellent.
    Connection driver i am using is
    Class.forName(
    com.microsoft.jdbc.sqlserver.SQLServerDriver");Please if u can help me in building connection
    String... Your help is always appriciated.
    regards
    AdeeRead this:
    http://support.microsoft.com/kb/313100
    %

  • Connection String  connect 10XE from Power Builder 7.0

    Hai All
    I want to know how can I make connection String to connect Oracle 10 XE from Power Builder 7.0. Is is possible to connect from PB 7.0 or I have to Migrate to PB10 ?
    Thanks In Advance
    Regards
    Shweta

    Hi
    Yes,you can integrate multiple sap systems with PI.
    1) Create a automatic Technical system for 4.6C system(R/3) using RZ70 in 4.6c...then create a business system for this.
    2) Create a automatic tecnical system in sld for SAP ECC 6.0(R/3) system using rz70 in ecc and create a business system for this.
    3) Also create TS & BS if any non sap applications are involved.
    use this Business systems as per the interface requirements for sender & receiver
    Regards
    Abhijit

  • How to build a connection string if "Only variable names (i.e.: $variable) may be used as the target of an assignment statement."

    im looping through databases on a server & building  a connection string to each database.
    $SQLConn.ConnectionString = "Server=$SrvName; Database=$DBName; User ID =DBLogin; Password=myPassword;"
    The problem is i get this error:
    Only variable names (i.e.: $variable) may be used as the target of an assignment statement
    I can put the code into an Inlinescript, but then I lose the ability to perform paralellism. Is there any way to construct the connection string in PS Workflow without using an Inlinescript?

    Hi Winston,
    Why not just wrap the InlineScript blocks in a Parallel block, to cause them to execute in parallel?
    For example:
    workflow foo {
    parallel {
    inlinescript {
    start-sleep -Seconds (Get-Random -Minimum 1 -maximum 5)
    "a"
    inlinescript {
    start-sleep -Seconds (Get-Random -Minimum 1 -maximum 5)
    "b"
    Sometimes outputs "a b" and sometimes outputs "b a"

  • Query engine : Can not find DSN in Connection String

    DearSir/Madam,
    Opearating System Windows 7 Professional(32-bit).
    I am using Application, which is developed : Visual basic 6.0(32-bit), Report Writer : Crystal Report 9.2.693(32-bit) and database: Oracle 9.2.0.10(32-bit).
    ODBC Data source : System DSN created and Connection established (Based on Driver : CR ORACLE ODBC Driver 4.10 (cror818.dll))
    In windows 7 environment Data Base connectivity and data fetching also wroking fine.
    My problem is while running reports it display error as "Query engine : Can not find DSN in Connection String"
    I want run time reports.
    For your kind information, at the same time in Windows XP Professional there is no problem found and working fine.
    Kindly help me.
    Thanks and regards,
    Swarup

    Crystal Reports 9.x is not supported on Win 7. See the following wiki:
    http://wiki.sdn.sap.com/wiki/x/b4JiAw
    - Ludek

  • How to specifiy the provider to be Oracle.ManagedDataAccess.Client when creating a dynamic connection string with EF Code First from Database?

    I am trying to use the relatively new Code First from Database with the newest EF (6.x) and on an Oracle database (11g, but I have installed the newest ODTwithODAC). First of all, it works fine as long as the connection string is inside the App.Config file. But when I try to build it dynamically in the C# code (or rather, statically at the moment) it fails. I have it working with a dynamically built connection string when doing Model from Database though, so I'm at a loss right now.
    First, I have created a second constructor for the context class that takes a string and does base(connectionString). Then I build the connection string via
    OracleConnectionStringBuilder oracleBuilder = new OracleConnectionStringBuilder();
    oracleBuilder.DataSource = "TEST.BLA.COM";
    oracleBuilder.UserID = "ABC";
    oracleBuilder.Password = "abc";
    oracleBuilder.PersistSecurityInfo = true;
    string connection = oracleBuilder.ToStrin();
    Now trying to open an EntityConnection by giving to it this provider-specific connection string (or even the static one from the App.Config) doesn't work; I get "keyword not supported: user id"). Trying it by creating a context and giving this connection string doesn't work either. I'm pretty sure that this is because I didn't specify the provider to use; after all, it should use the Oracle.ManagedDataAccess.Client provider and not an SQL Server based one.
    I then tried to get around this by using an EntityConnectionStringBuilder on top and specifying the provider keyword there, but then I get "keyword not supported: provider" when using it in the context constructor, and "the 'metadata' keyword is always required" when using it with the EntityConnection constructor.
    As I said above: I bet it's the provider that I have to specify somehow, but I don't know how. The code that does work is the following:
    using (var context = new Model())
    context.Database.Connection.Open();
    context.Database.Connection.Close();
    When I read context.Database.Connection.ConnectionString, it is exactly the provider-specific connection string I created above, but I don't know where to specify the provider again. Do you know of any way to do this? Certainly there must be one.
    PS: I have also posted this question on http://stackoverflow.com/questions/27979454/ef-code-first-from-database-with-managed-oracle-data-access-dynamic-connection because it is quite urgent and I'd like to use Code First from Database. Otherwise I'd have to go "back" to using Model from Database again, which is not ideal because we have updatable views where the .edmx-file has to be edited after every reload of the model, while with Code First from DB inserting into the view automatically works.

    I am trying to use the relatively new Code First from Database with the newest EF (6.x) and on an Oracle database (11g, but I have installed the newest ODTwithODAC). First of all, it works fine as long as the connection string is inside the App.Config file. But when I try to build it dynamically in the C# code (or rather, statically at the moment) it fails. I have it working with a dynamically built connection string when doing Model from Database though, so I'm at a loss right now.
    First, I have created a second constructor for the context class that takes a string and does base(connectionString). Then I build the connection string via
    OracleConnectionStringBuilder oracleBuilder = new OracleConnectionStringBuilder();
    oracleBuilder.DataSource = "TEST.BLA.COM";
    oracleBuilder.UserID = "ABC";
    oracleBuilder.Password = "abc";
    oracleBuilder.PersistSecurityInfo = true;
    string connection = oracleBuilder.ToStrin();
    Now trying to open an EntityConnection by giving to it this provider-specific connection string (or even the static one from the App.Config) doesn't work; I get "keyword not supported: user id"). Trying it by creating a context and giving this connection string doesn't work either. I'm pretty sure that this is because I didn't specify the provider to use; after all, it should use the Oracle.ManagedDataAccess.Client provider and not an SQL Server based one.
    I then tried to get around this by using an EntityConnectionStringBuilder on top and specifying the provider keyword there, but then I get "keyword not supported: provider" when using it in the context constructor, and "the 'metadata' keyword is always required" when using it with the EntityConnection constructor.
    As I said above: I bet it's the provider that I have to specify somehow, but I don't know how. The code that does work is the following:
    using (var context = new Model())
    context.Database.Connection.Open();
    context.Database.Connection.Close();
    When I read context.Database.Connection.ConnectionString, it is exactly the provider-specific connection string I created above, but I don't know where to specify the provider again. Do you know of any way to do this? Certainly there must be one.
    PS: I have also posted this question on http://stackoverflow.com/questions/27979454/ef-code-first-from-database-with-managed-oracle-data-access-dynamic-connection because it is quite urgent and I'd like to use Code First from Database. Otherwise I'd have to go "back" to using Model from Database again, which is not ideal because we have updatable views where the .edmx-file has to be edited after every reload of the model, while with Code First from DB inserting into the view automatically works.

  • How to dynamically set connection string for report in C# code?

    Hi,
    I have installed CRVS2010. I have created new Crystal Report WPF Application and new report. I would like to set connection string for report in code dynamically.
    Is this possible?
    Thanks
    Ivana

    Lots of posts in this forum on how to set database connections. WPF should not be a consideration as it's just a viewer. The report engine is still the same. Search these forums. Use the search box at the top right corner of this page. Look at samples here:
    https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
    Note that none of the samples above are using WPF, but like I said, the WPF is just a different viewer and will not impact how the report engine logs on to a database. (I think of it as a gray car vs. a red car. Same engine, just the color is different)
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • Deployment from 11g to 10g connection string cannot get provider error.

    Hi, I'm doing a deployment from oracle client 11g to 10g. Is this possible? there are yes and no answer I have try out from the forum. All did not workout with any of the configuration setup.
    For development I am using VS2012, MVC 4. EF 4. Oracle 11g
    The server is currently running Oracle 10g with Oracle.Dataaccess.dll 10.2.0.100
    This is my connection string setup at the server.
    <?xml version="1.0"?>
    <!--
    For more information on how to configure your ASP.NET application, please visit
    http://go.microsoft.com/fwlink/?LinkId=169433
    -->
    <configuration>
    <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
    </configSections>
    <connectionStrings>
    <add name="OraAspNetConnectionString" connectionString="Data Source=dtsr;User Id=ids;Password=pwd;" providerName="Oracle.DataAccess.Client"/>
    <add name="OraAspNetConnectionString2" connectionString="Data Source=dtsr;User Id=ids;Password=pwd;" providerName="Oracle.DataAccess.Client.OracleConnection"/>
    </connectionStrings>
    <!--<startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
    </startup>-->
    <appSettings>
    <add key="webpages:Version" value="2.0.0.0"/>
    <add key="webpages:Enabled" value="false"/>
    <add key="PreserveLoginUrl" value="true"/>
    <add key="ClientValidationEnabled" value="true"/>
    <add key="UnobtrusiveJavaScriptEnabled" value="true"/>
    </appSettings>
    <system.data>
    <DbProviderFactories>
         <add name="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client" description="Oracle Data Provider for .NET" type="Oracle.DataAccess.Client.OracleClientFactory,Oracle.DataAccess,Version=4.112.3.0,Culture=neutral,PublicKeyToken=89b483f429c47342" />
    </DbProviderFactories>
    </system.data>
    <system.web>
    <compilation targetFramework="4.0">
    <assemblies>
    <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
    <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add assembly="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    </assemblies>
    </compilation>
    <httpRuntime/>
    <authentication mode="Windows"/>
    <identity impersonate="true"/>
    <pages controlRenderingCompatibilityVersion="4.0">
    <namespaces>
    <add namespace="System.Web.Helpers"/>
    <add namespace="System.Web.Mvc"/>
    <add namespace="System.Web.Mvc.Ajax"/>
    <add namespace="System.Web.Mvc.Html"/>
    <add namespace="System.Web.Optimization"/>
    <add namespace="System.Web.Routing"/>
    <add namespace="System.Web.WebPages"/>
    </namespaces>
    </pages>
    <sessionState mode="InProc" timeout="20" cookieless="false"/>
    </system.web>
    <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <handlers>
    <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit"/>
    <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit"/>
    <remove name="ExtensionlessUrlHandler-Integrated-4.0"/>
    <add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0"/>
    <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0"/>
    <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0"/>
    </handlers>
    <security>
    <authorization>
    <add accessType="Allow" users="?"/>
    </authorization>
    </security>
    </system.webServer>
    <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
    <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35"/>
    <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0"/>
    </dependentAssembly>
    <dependentAssembly>
    <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
    <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
    </dependentAssembly>
    <dependentAssembly>
    <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/>
    <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0"/>
    </dependentAssembly>
    <!--<dependentAssembly>
    <assemblyIdentity name="Oracle.DataAccess, Version=10.2.0.100, Culture=Neutral," publicKeyToken="89b483f429c47342" />
    <bindingRedirect oldVersion="10.2.0.100" newVersion="4.112.3.0"/>
              <publisherPolicy apply="no" />
    </dependentAssembly>-->
    </assemblyBinding>
    </runtime>
    <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/>
    </entityFramework>
    </configuration>
    I get this error when page trying to connect to database.
    [ProviderIncompatibleException: An error occurred while getting provider information from the database. This can be caused by Entity Framework using an incorrect connection string. Check the inner exceptions for details and ensure that the connection string is correct.]
    System.Data.Entity.ModelConfiguration.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices providerServices, DbConnection connection) +163
    System.Data.Entity.ModelConfiguration.Utilities.DbConnectionExtensions.GetProviderInfo(DbConnection connection, DbProviderManifest& providerManifest) +39
    System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection) +46
    System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext) +62
    System.Data.Entity.Internal.RetryLazy`2.GetValue(TInput input) +117
    System.Data.Entity.Internal.LazyInternalContext.InitializeContext() +453
    System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) +18
    System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() +56
    System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext() +15
    System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider() +37
    I have check the
    1. Enviroment Variables path is set to the 10.../client_1/
    2. Tnsname.ora already configured.
    3. machine.config did not define the connection string path, as it is define in the web.config
    4. Oracle.Dataaccess.dll is in the bin of my application website (v4.112.3.0).
    5. In my application web bin folder also include additional dlll.
    mfc71.dll
    msvcr71.dll
    oci.dll
    ociw32.dll
    orannzsbb11.dll
    oraocci11.dll
    oraociicus11.dll
    OraOps11w.dll
    Anyone please help.. Thanks in advance..
    Edited by: 976886 on Dec 13, 2012 7:46 PM

    976886 wrote:
    I want to know, it is possible to migrate the application from oracle 11g to 10g? such that the component are supported across?
    Because in the development, all goes well, no error on the oracle connection.
    OR did I miss out anything that causes it not working on my server deployment?yes
    yes
    yes
    how can we reproduce what you claim?

  • Getting Error:Failed to open the connection while calling crystal report

    I am getting the below error while calling the crystal report from dot net app. I am using OLEDB to connect to database. It is working perfectly in our DEV environment but as soon as I move it to production information after changing the logon information in the report it start giving the below error.
    Failed to open the connection.C:\WINDOWS\TEMP{C2FD97D9-2ADE-41BB-88FF-23A4DF20BC6F}.rpt
    Details: [Database Vendor Code: 17 ]

    Are you able to connect to the database from the production machine using a UDL file?
    If you haven't tried this, here's how to do it. Take these steps on the machine that is hosting the application. Create a new text file on the desktop. Change the file extension to ".udl" (without the quotes). Double-click on this to bring up the OLEDB connection test: start on the Provider tab and select the appropriate provider. Click "Next" and on the following tab enter your connection information. Click the "Test Connection" button to test the connection. Does it connect  to the database successfully?
    If you click on "OK" to close the dialog and then open the UDL file with Notepad, you should see an OLEDB connection string. In this string should be the same property values for server, database, user id and password which you are providing through your application. If they are not the same, modify your application to use these values.
    If testing your connection information with the UDL file works but your application is still failing when using the same credentials, try profiling or tracing the database. Do you see connection attempts from the application? Are there any errors?
    If you're impersonating, have you set up windows authentication correctly for both the application and the database?

  • Changing Connection String dynamically at runtime

    I am using the Crystal Report Viewer control in in a Visuall Studio 2008 C# project.  The reports are created inside of Visual Studio 2008, and will be running against an InterSystems Cache database.  I have to use an ODBC (RDO) connection and use a connection string.
    I have seen many examples of how to update the connection string at runtime if it is SQL server (or some flavor thereof), but nothing for an ODBC (RDO) connection to a NON-MSSQL database.
    The problem when I update the connection string for each of the tables in the report, the report will either not run and display a window -- tiled 'Datbase Login' -- that has the Server, Database, Username, and Password fields on the window, OR, it will run but not against the database that was specified at runtime (it uses the connection stored in the report).
    Code Sample #1 (This is using the connection string, and will cause a the "Database Login" window to be displayed - the first scenario from above)
    rd = new ReportDocument();
    // Load the report
    rd.Load(fileName, OpenReportMethod.OpenReportByDefault);
    rd.Refresh();
    // Create the connection object
    ConnectionInfo connectionInfo = CreateConnection(Server, Port, ServerNamespace, Username, Password);
    // Set the connection info on each table in the report
    SetDBLogonForReport(connectionInfo, rd);
    SetDBLogonForSubreports(connectionInfo, rd);
    private static ConnectionInfo CreateConnection(string Server,
                                                   int Port,
                                                   string ServerNamespace,
                                                   string Username,
                                                   string Password)
            ConnectionInfo connectionInfo = new ConnectionInfo();
            string connString = "DRIVER=InterSystems ODBC;SERVER=" + Server
                                                      + ";PORT=" + Port
                                                      + ";DATABASE=" + ServerNamespace
                                                      + ";UID=" + Username
                                                      + ";PWD=" + Password;
            connectionInfo.IntegratedSecurity = false;
            connectionInfo.UserID = Username;
            connectionInfo.Password = Password;        //In examples that I have seen, this is the actual connection string, not just the server name
            connectionInfo.ServerName = connString;          connectionInfo.DatabaseName = ServerNamespace;
            connectionInfo.Type = ConnectionInfoType.CRQE;
            return connectionInfo;
    private static void SetDBLogonForReport(ConnectionInfo connectionInfo, ReportDocument reportDocument)
            foreach (CrystalDecisions.CrystalReports.Engine.Table table in reportDocument.Database.Tables)
                TableLogOnInfo tableLogonInfo = table.LogOnInfo;
                tableLogonInfo.ConnectionInfo = connectionInfo;
                table.ApplyLogOnInfo(tableLogonInfo);
    private static void SetDBLogonForSubreports(ConnectionInfo connectionInfo, ReportDocument reportDocument)
            foreach (Section section in reportDocument.ReportDefinition.Sections)
                foreach (ReportObject reportObject in section.ReportObjects)
                    if (reportObject.Kind == ReportObjectKind.SubreportObject)
                        SubreportObject subreportObject = (SubreportObject)reportObject;
                        ReportDocument subReportDocument = subreportObject.OpenSubreport(subreportObject.SubreportName);
                        SetDBLogonForReport(connectionInfo, subReportDocument);
    Sample #2 (the same as Sample #1 above, only the ConnectionInfo method is different - which is all that I included here)
    private static ConnectionInfo CreateConnection(string Server,
                                                    int Port,
                                                   string ServerNamespace,
                                                   string Username,
                                                   string Password)
            ConnectionInfo connectionInfo = new ConnectionInfo();
            string connString = "DRIVER=InterSystems ODBC;SERVER=" + Server
                                                      + ";PORT=" + Port
                                                      + ";DATABASE=" + ServerNamespace
                                                      + ";UID=" + Username
                                                      + ";PWD=" + Password;
            connectionInfo.Attributes.Collection.Add(new NameValuePair2(
                              DbConnectionAttributes.CONNINFO_DATABASE_DLL, DbConnectionAttributes.DATABASE_DLL_CRDB_ODBC));
            connectionInfo.Attributes.Collection.Add(new NameValuePair2(
                              DbConnectionAttributes.QE_DATABASE_NAME, ServerNamespace));
            connectionInfo.Attributes.Collection.Add(new NameValuePair2(
                              "QE_DatabaseType", "ODBC (RDO)"));
            DbConnectionAttributes attributes = new DbConnectionAttributes();
            attributes.Collection.Add(new NameValuePair2(
                              DbConnectionAttributes.CONNINFO_CONNECTION_STRING, connString));
            attributes.Collection.Add(new NameValuePair2(
                              "Server", Server));
            attributes.Collection.Add(new NameValuePair2(
                              "UseDSNProperties", false));
            connectionInfo.Attributes.Collection.Add(new NameValuePair2
    (                          DbConnectionAttributes.QE_LOGON_PROPERTIES, attributes));
            connectionInfo.Attributes.Collection.Add(new NameValuePair2(
                              DbConnectionAttributes.QE_SERVER_DESCRIPTION, Server));
            connectionInfo.Attributes.Collection.Add(new NameValuePair2(
                              "QE_SQLDB", true));
            connectionInfo.Attributes.Collection.Add(new NameValuePair2(
                              DbConnectionAttributes.CONNINFO_SSO_ENABLED, false));
            connectionInfo.IntegratedSecurity = false;
            connectionInfo.UserID = Username;
            connectionInfo.Password = Password;
            connectionInfo.ServerName = connString;
            connectionInfo.DatabaseName = ServerNamespace;
            connectionInfo.Type = ConnectionInfoType.CRQE;
            return connectionInfo;
    I have also tried setting connectionInfo.ServerName equal to just the real server name, but that didn't work either.
    After the above operations are performed, I simply assign the returned ReportDocument object to the Crystal Viewer control.  If I don't call the above functions, and just set the ReportDocument source (using whatever connection string was embedded in the report originally), the report runs as expected.  Only when I attempt to update the connection string, the report will not execute.  Please advise.  Thanks!

    I am using the Crystal Report Viewer control in in a Visuall Studio 2008 C# project.  The reports are created inside of Visual Studio 2008, and will be running against an InterSystems Cache database.  I have to use an ODBC (RDO) connection and use a connection string.
    I have seen many examples of how to update the connection string at runtime if it is SQL server (or some flavor thereof), but nothing for an ODBC (RDO) connection to a NON-MSSQL database.
    The problem when I update the connection string for each of the tables in the report, the report will either not run and display a window -- titled 'Datbase Login' -- that has the Server, Database, Username, and Password fields on the window, OR, it will run but not against the database that was specified at runtime (it uses the connection stored in the report).
    Code Sample #1 (This is using the connection string, and will cause a the "Database Login" window to be displayed - the first scenario from above) -- The code samples appear to be too long to post, so I will add them as seperate replies.
    rd = new ReportDocument();
    // Load the report
    rd.Load(fileName, OpenReportMethod.OpenReportByDefault);
    rd.Refresh();
    // Create the connection object
    ConnectionInfo connectionInfo = CreateConnection(Server, Port, ServerNamespace, Username, Password);
    // Set the connection info on each table in the report
    SetDBLogonForReport(connectionInfo, rd);
    SetDBLogonForSubreports(connectionInfo, rd);
    private static ConnectionInfo CreateConnection(string Server, int Port, string ServerNamespace, string Username, string Password)
            ConnectionInfo connectionInfo = new ConnectionInfo();
            string connString = "DRIVER=InterSystems ODBC;SERVER=" + Server + ";PORT=" + Port + ";DATABASE=" + ServerNamespace + ";UID=" + Username + ";PWD=" + Password;
            connectionInfo.IntegratedSecurity = false;
            connectionInfo.UserID = Username;
            connectionInfo.Password = Password;        //In examples that I have seen, this is the actual connection string, not just the server name
            connectionInfo.ServerName = connString;          connectionInfo.DatabaseName = ServerNamespace;
            connectionInfo.Type = ConnectionInfoType.CRQE;
            return connectionInfo;
    // Code smple continued in the next reply

  • Problem with Connection Manager. Can't change connection string / Server name

    p.MsoNormal, li.MsoNormal, div.MsoNormal
    {margin-top:0cm;margin-right:0cm;margin-bottom:10.0pt;margin-left:0cm;line-height:115%;font-size:11.0pt;font-family:'Calibri','sans-serif';}
    .MsoChpDefault
    {font-size:10.0pt;}
    .MsoPapDefault
    {line-height:115%;}
    @page Section1
    {size:612.0pt 792.0pt;margin:72.0pt 72.0pt 72.0pt 72.0pt;}
    div.Section1
    {page:Section1;}
    Hi,
    I have copied a number of SSID packages from a live server to my test server and am trying to get them up and running but I have a problem with the connection. The only thing that is different is the server name. I decided to keep the same connection in the connection manager as it is referenced in a dtsConfig file. I changed the dtsConfig file to reference the new servername [Data Source= new test server name]. I also check my paths and they are pointing to the correct config locations etc.
    I found this post which was similar to my problem but I still get problems with the connection
    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1319961&SiteID=1
    I updated the connection by changing the server name in the actual connection. I did this from the data flow tab in the Connection Managers sections (MS Visual Studio). Right clicked - Edit - changed the name of the server name to my test server and selected the database. Test connection was fine, and saved this.
    Once I saved this, the connection string changed to my current test server in the properties of the connection. However when I run the package I get the following error:
    Error: 0xC0202009 at ReportsImport, Connection manager "myconnectionstring": SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
    An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80004005  Description: "Login timeout expired".
    An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80004005  Description: "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.".
    An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80004005  Description: "Named Pipes Provider: Could not open a connection to SQL Server [53]. ".
    Error: 0xC020801C at Myprocess import from file, BuyAtReportsImport [79]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "myconnectionstring" failed with error code 0xC0202009.  There may be error messages posted before this with more information on why the AcquireConnection method call failed.
    Error: 0xC0047017 at Myprocess import from file, DTS.Pipeline: component "ReportsImport" (79) failed validation and returned error code 0xC020801C.
    Error: 0xC004700C at Myprocess import from file, DTS.Pipeline: One or more component failed validation.
    Error: 0xC0024107 at Myprocess import from file: There were errors during task validation.
    So even if I change the existing connection properties and save and Build my package again, my connection properties (connectionstring, servername etc) all revert back to its original data source when I re-open the package. Simply it does not seem to be saving the connection properties i put in.
    What am I doing wrong or how can I change the existing connection manager to look at the new server. The database is  the same and I have full admin privilege on the server.
    I don't want to recreate my packages as there are alot and they are not simple.
    After changing the connection properties, saving and reloading I get a connection error. But this is because it is not retaining the new connection manger setting i entered.
    Incidentally - I created a new SSID to perform a simple connection and write to the the server and it was OK so there is no problem with actually seeing the my test server.
    Thanks in advance

    Yes, the package is in visual studio and I have executed it. There are no errors but in the output i have the error message about my connection. My dtsConfig file is added to the project in the 'Package Configuration Organizer' and path and files are correct. This is the output error:
    Error: 0xC020801C at xx import from file, xxReportsImport [79]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "myconnectionname" failed with error code 0xC0202009.  There may be error messages posted before this with more information on why the AcquireConnection method call failed.
    I will try and run it using dtexec.exe. if I have two config files do i use
    dtsexec.exe /f <packagename> /conf <configfile> /conf <secondconfigfile>

  • Database connection string dynamic

    Hello everybody,
    My application should do some tests that user choses.
    For each test type I should save the database in a file with different name, something like : Report_YYYY_MM_DD_Test_x, without stopping the execution of the application.
    My problem is that i cannont rename the database after Teststand wrote in it. I must stop first the application and then I can rename it.
    I tried to build dynamic connection strings and to prepare the database before Teststand write it. But I saw that after the first acces, despite of new connection string, Testand write further in the database described in the first connection string. Also seems that the handle to database once established, will be released at the end of test. I could close the connection to the DB but i don't know if it is possible.
    for any ideea how to handle this situation i would be grateful

    Hi Harleen Kaur Chadha,
    I understand your requirement is access 5-6 database on same server using one JDB receiver channel. I think, it is possible. SAP Help [Link|http://help.sap.com/saphelp_nwpi711/helpdata/en/44/7c24a75cf83672e10000000a114a6b/frameset.htm ]. In receiver JDB channel select Message Protocol : u201CNative SQL Stringu201D. Then you have make sure that the payload coming to this JDBC receiver channel should look like this
    INSERT INTO DatabaseName : tableName 
    (column-name1, column-name2, column-name3)
    VALUES(u2018column-value1u2019, u2018column-value2u2019, u2018column-value3u2019)
    But, the mapping program you are using now, should generate the String (shown above). And SAP says this protocol is primarily for test purposes.
    FYI. If you select Message Protocol: "XML SQL Format", finally it would be converted to string (shown above) will be sent to database.
    Regards,
    Raghu_Vamsee

  • Hi expert,Incorrect connection string for addon

    hi expert
    I am getting error when connect  my addon in client pc.
    my addon working fine in server at client side.
    but in client i m getting error "Incorrect connection string for addon".in my addon i am using crystal report and two sap b1 user form. thanks in adva.
    regards
    Rajkumar Gupta
    Edited by: Rajkumar Gupta on May 23, 2009 12:49 PM

    Hi Rajkumar,
    Sometimes this error message is related to the UI server. Please see note 808354 or 852031 and see if this has any effect.
    If not, please post up a code sample so we can take a look,
    Regards,
    Niall

Maybe you are looking for

  • Unable to update Ipod mini / Computer not responding to Ipod

    I recently switched computers and I installed the iPod mini software onto my new computer. This worked at first but when I started moving music from iTunes onto my iPod from my new computer, the downloads would stop even though the music had not been

  • How do I find the new colors in Pantone Formula guide in InDesign CC?

    It seems like the Pantone library in InDesign is not updated. I can't find the newly added colors from the Formula guide I just bought. (pantone solid coated/uncoated) For examle color 2248. Where do I find the new colors and how do I add them to my

  • T61 resuming after being put to sleep

    Almost every time i put my comp to sleep it wakes up, sometimes immediately and sometimes after some time. I only put to sleep using Fn F4 because worried it will resume with lid closed. Any ideas on a setting I could change or maybe a program waking

  • App error 240 on bb curve 9320

    I downloaded an app called pic shuffler for bbm and it told me to restart my device as usual but when it turned back on it said app error 240 reset so i reset it like 5 more times still didnt work please helppp

  • Sales order costing urgent please

    friends my client wants to see the cost in sales order because his price is based on the cost price i think ek01 solves this but i am not able to bring the value into the sales order. please help me and tell me the steps to be done in sd to bring tha