Connection to Embeded Database from Crystal Reports XI

I am writing an application that uses a SQL Server Mobile Database.  I have not been able to determine how to connect to this database through Crystal Reports.
1.  Is it possible?
2.  How do I provide the connection string that uses only 2 parameters?
Gene

When you create a DSN the ODBC string expects information for Server, Database, Username, and Password.  When you are working with an Embedded Database, typically you have a filename and a password (which can be null).  I was not able to create a DSN for this connection.
What I have been able to get working is the following:
1.  Create an ADO DataSet Object within the application.
2,  Create the CR attaching ot the DataSet Object.
3.  In the application code where you are attaching the CR to a viewer you must
      a.  Define a Data Adaptor for the DataSet.
      b.  Define a Data Table and load the table from the DataSet GetData() method.
      c.  Define the full path to the report file.
      d.  Define a ReportDocument Object
      e.  Load the report path in the the ReportDocument Object
      f.  Define the DataTable as the Data Source to the ReportDocument Object
      g. Define the Viewer ReportSource as the ReportDocument Object.
I have been able to use this approach on 3 separate reports and returned the correct data.  A lot of steps, but it is working.
GFKerls

Similar Messages

  • Error connecting to database from Crystal Report

    Hi,
    I am using Crystal report 2008, .NET 3.5 on Windows Server 2008 + SQL Server 2008
    I have a batch that generates report (via export) then this batch will send the exported report via email.
    I am encountering this error when reading report from BO Server
    Error: CrystalDecisions.CrystalReports.Engine.LogOnException: Database logon failed. ---> System.Runtime.InteropServices.COMException (0x8004100F): Database logon failed.
       at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
       at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
    While when trying to read the report from physical file within the server, it will give me this error
    Error: CrystalDecisions.CrystalReports.Engine.InternalException: Failed to retrieve data from the database.
    Details:  [Database Vendor Code: 2812 ]
    Failed to retrieve data from the database.
    Error in File IAREPORT {92DFCAFC-58AC-4CB3-B9DD-A9565E07088D}.rpt:
    Failed to retrieve data from the database.
    Details:  [Database Vendor Code: 2812 ] ---> System.Runtime.InteropServices.COMException (0x800002D3): Failed to retrieve data from the database.
    Details:  [Database Vendor Code: 2812 ]
    Failed to retrieve data from the database.
    Error in File IAREPORT {92DFCAFC-58AC-4CB3-B9DD-A9565E07088D}.rpt:
    Failed to retrieve data from the database.
    Details:  [Database Vendor Code: 2812 ]
       at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
       at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
    The report is working in our SIT environment but it is not working in our UAT environment.
    I have tried the following:
    1) running the batch (that generates the report) in SIT environment to call SIT database
    Working fine
    2) running the batch (that generates the report) in SIT environment to call UAT database
    Will give the above error
    3) running the batch (that generates the report) in UAT environment to call UAT database
    Will give the above error
    4) running the batch (that generates the report) in UAT environment to call SIT database
    Working fine
    For reading report from BO Server, I have tried viewing the report directly and scheduling the report directly from BO Server and it works fine.
    Also I have tried to 'verify database' on the UAT report, but it seems it didn't solve the issue.
    Does anyone have any idea how to solve this? Or what could cause this?
    Appreciate your help.
    Thanks.

    Here's how I connect to the database
    when reading report from bo server:
    Dim enterpriseSession As CrystalDecisions.Enterprise.EnterpriseSession
                Dim enterpriseService As CrystalDecisions.Enterprise.EnterpriseService
                Dim infoObjects As CrystalDecisions.Enterprise.InfoObjects
                Dim infoObject As CrystalDecisions.Enterprise.InfoObject
                Dim infoStore As CrystalDecisions.Enterprise.InfoStore
                Dim query As String = ""
                query = "SELECT * FROM CI_INFOOBJECTS WHERE SI_PROGID = 'CrystalEnterprise.Report' AND SI_NAME LIKE '" & reportName & "'"
                'Create a session manager
                Dim sessionMgr As New CrystalDecisions.Enterprise.SessionMgr
                'Log into BusinessObjects Enterprise
                enterpriseSession = sessionMgr.Logon(cu.BOXIUser, cu.BOXIPwd, cu.BOXIServer, cu.BOXIAuthentication)
                'Create the infostore object
                enterpriseService = enterpriseSession.GetService("InfoStore")
                infoStore = New CrystalDecisions.Enterprise.InfoStore(enterpriseService)
                infoObjects = infoStore.Query(query)
                If (infoObjects.Count > 0) Then
                    infoObject = infoObjects(1)
                    crDoc.Load(infoObject, enterpriseSession)
                    crDoc.SetParameterValue("@batchID", batchID)
                    Dim CrExportOptions As ExportOptions
                    Dim CrDiskFileDestinationOptions As New DiskFileDestinationOptions()
                    Dim CrPDFFormatOptions As New PdfRtfWordFormatOptions
                    Dim CrExcelFormatOptions As New ExcelFormatOptions
                    CrDiskFileDestinationOptions.DiskFileName = reportFile
                    CrExportOptions = crDoc.ExportOptions
                    With CrExportOptions
                        .ExportDestinationType = ExportDestinationType.DiskFile
                        .ExportFormatType = IIf(reportFormat = IAConstant.PDF, _
                                                ExportFormatType.PortableDocFormat, _
                                                IIf(FINRptFormat = IAConstant.EXCELONLY, _
                                                ExportFormatType.ExcelRecord, ExportFormatType.Excel))
                        .DestinationOptions = CrDiskFileDestinationOptions
                        .FormatOptions = IIf(reportFormat = IAConstant.PDF, _
                                             CrPDFFormatOptions, CrExcelFormatOptions)
                    End With
                    crDoc.Export()
                Else
                    Throw New ApplicationException(Constant.APP_ERR & " - Report not found")
                End If
    The error is thrown when trying to export --> crDoc.Export()
    The username and password are correct because it is the same username and password that the batch used to extract the data in the initial stage.
    Here's how my batch works:
    1) Extract and massage data directly from .net SP (this is working fine)
    2) Obtain the report then use the same connection string (for physical path report) or use the report connection string (for bo server report), this report is using Stored Procedure (the problem starts here)
    For reading report from bo server, I have also checked that the connection from the report itself is correct, because we can schedule/view the report from bo server successfully.
    SQL Driver, is it the SQL Native Client you are saying? It's SQL Native Client 10.
    I think we are using Business Objects Enterprise XI 3.1 Client Tools SP2 in our apps server.

  • Error While connecting  to SAP R3 from crystal reports

    Hi Experts,
    I am trying to connect to a SAP R3 from crystal reports, it gives below mentioned error.
    Logon failed.
    Details: CMALLC: rc= 27 > Connect from SAP gateway to RFC server failed
    Connect_PM GWHOST=10.11.12.13, GWSERV=SAPGW12, SYSNR= 12
    Location SAP-gateway on host xyz/sapgw12
    Error timeout during allocate
    TIME Wed Nov 18..
    Release 700
    Component SAP Gateway
    Version 2
    RC 242
    Module gwr3cpic.c
    LINE 1872
    Detail no connect of TP sapdb12 from host 10.11.12.13 after 20 sec
    COUNTER 6
    Please help me to solve this error.
    Regards,
    Ganesh

    Hi
    please ask your network admins if there is a firewall between your CR Designer installation and your SAP R/3 system.
    I assume that you have imported the necessary trsansports in your SAP R/3 system.
    Which kind of driver do you use for the connection to SAP R/3?
    Regards,
    Stratos

  • Unable to connect to defined CMS from Crystal reports Enetrprise

    Hi all,
    I am using SAP Crystal Reports for Enterprise XI 4.0 (SP2 Patch 6). We have 2 independent Intelligence & Processing Tiers installed with their own CMS services. However, temporarily we are using only 1 common WAS Netweaver 7.3 for both CMS (when we connect to CMC/BI Launch pad we juts type different CMS name). Both of them are on same patch level, etc.
    My problem is that when I try to connect to BO Enterprise (BI 4.0) from Crystal reports, I am unable to specify to which CMS it has to connect - since it take the Server name and not the CMS name. It automatically connects me to only 1 of the CMS while there is no chance to connect to another (it might have somewhere recorded the CMS name). is there a chance to choose between those 2 CMS to which Crystal should connect?
    Thanks!
    Erik.

    Erik,
    You should specify the name of the server where BOE is installed. You can use the FQDN or even the IP address and the port name.
    Regards,
    Julian

  • How to connect to a Unix from Crystal Reports running on windows?

    <p>Any idea on how to connect from windows Crystal Reports X1 client to a Unix box
    file directoriesu2026<br>
    <br>
    Any suggestions would be much appreciatedu2026<br>
     </p>
    Edited by: DarkNight on Nov 13, 2009 10:42 AM

    Hi Darknight,
    What is it you want to find once you are connected? Since you posted this in the Database Connectivity forum I assume you want to connect to some DB or flat file on that server? If it's a DB then use the client to connect from windows. If it's a flat file then you should be able to use whatever connection utility you use to see the file system from windows. I don't know Unix so not sure but need more details.
    Thank you
    Don

  • How to extract embedded SQL from crystal reports 8.5

    I have a report created in version 8.5 with data source as crystal query (.qry) published on Crystal enterprise server.
    I have lost Qry file but the report is running by executing the embedded SQL. Is there any option where I can extract the SQL statement that is embedded in the report file.

    Hi,
    Go to 'Database' menu
    select 'Database Expert....' submenu
    It'll open 'Database Expert window. On right side of this window it shows 'Selected tables'. Under that it shows databsae name and the query used. Right click one it and you should see
    Edit,
    View, and
    Add to Repository options.
    Hope this will help.

  • Assessing Lotus Domino from Crystal reports

    Hi,
    I am going to work in Crystal reports XI reports and Lotus notes 7.0 for database.( I dont have experience in lotus notes).
    I am going to fix issues in already existing reports.
    I have Crystal reports XI and Lotus notes 7 client installed in my system.
    The database (NSF) file is in server.
    For accessing the NSF file from Crystal reports we need Lotus NotesSql ODBC driver.
    Please help me in installation and configuring the NotesSql ODBC driver for accessing the NSF database from crystal reports.
    I dont know where to install the Lotus NotesSql ODBC driver(in local machine or server) and how to configure it for NSF database.
    And help me in creating file DSN to connect database from Crystal reports.
    Thanks
    Sakthi
    Edited by: Sakthivel Duraisamy on Apr 27, 2009 11:34 AM

    Hi Sakthi,
    All we can help you with is connecting Crystal to the DB using ODBC. I suggest you post your question to installing and configuring Lotus Notes ODBC driver to Lotus's support site. Once it is configured all CR requires is that we can find the path to where the client is installed. This is always located in the PC's PATH statement.
    Creating a DSN you do through Control Panel and selecting a System DSN and then selecting Lotus ODBC driver. Fill in what ever is required and test the connection.
    Thank you
    Don

  • How do I connect from Crystal Report version XI to Oracle 10G express?

    I'm new to oracle 10G express and I'm developing an application that needs reports to preview some data from oracle tables.
    The oracle database is installed on the server and I installed the client on my machine. I need to use the crystal report 11 to report the output. Thus, I designed a crystal report that should simply read a table on oracle and though I need to be able to connect to the oracle 10G Express Edition database. I tried to create a connection from the crystal report using the Database Expert >> Create New Connection >> Oracle Server and I include the following parameters.:
    - Service: host:1521/XE
    - Username: username
    - Password: password
    Then when I tried to connect the crystal report crashes always.
    Is there any way to create a connection to the Oracle Database 10G express from Crystal Report 11?
    Please advise...

    Thank you bala,
    First, How I should start the Listener on the database server?
    Listener.ora content:
    SID_LIST_LISTENER =
    +(SID_LIST =+
    +(SID_DESC =+
    +(SID_NAME = PLSExtProc)+
    +(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)+
    +(PROGRAM = extproc)+
    +)+
    +(SID_DESC =+
    +(SID_NAME = CLRExtProc)+
    +(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)+
    +(PROGRAM = extproc)+
    +)+
    +)+
    LISTENER =
    +(DESCRIPTION_LIST =+
    +(DESCRIPTION =+
    +(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))+
    +(ADDRESS = (PROTOCOL = TCP)(HOST = Daoud-PC)(PORT = 1521))+
    +)+
    +)+
    DEFAULT_SERVICE_LISTENER = (XE)
    How to configure the tnsnames.ora on the client side?
    tnsnames.ora content:
    XE =
    +(DESCRIPTION =+
    +(ADDRESS = (PROTOCOL = TCP)(HOST = Daoud-PC)(PORT = 1521))+
    +(CONNECT_DATA =+
    +(SERVER = DEDICATED)+
    +(SERVICE_NAME = XE)+
    +)+
    +)+
    EXTPROC_CONNECTION_DATA =
    +(DESCRIPTION =+
    +(ADDRESS_LIST =+
    +(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))+
    +)+
    +(CONNECT_DATA =+
    +(SID = PLSExtProc)+
    +(PRESENTATION = RO)+
    +)+
    +)+
    ORACLR_CONNECTION_DATA =
    +(DESCRIPTION =+
    +(ADDRESS_LIST =+
    +(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))+
    +)+
    +(CONNECT_DATA =+
    +(SID = CLRExtProc)+
    +(PRESENTATION = RO)+
    +)+
    +)+
    Now I`m trying to initialize this on one machine (database & client) and so the crystal report will be on the same machine where the database exist; Additionally, this machine has OS Windows 7 Ultimate 64bit and include the Oracle 10g Express Database & Oracle 10g Express Client software.
    Please check the files content I included above and give me the way on how to establish a connection from the crystal report to the database where both are installed on the same machine.
    Thanks in advance...

  • Upgrading from CR 10 Embedded Edition to Crystal Reports (server) xi

    We recently upgraded from CR10 Embedded edition to Crystal Reports Server Xi. In our application the users access the reports via a web page (where they enter the paratemeters) and the report is displayed using the Crystal Reports viewer. The CR server xi was recently installed and all the SDK references have been as mentioned in this document: https://boc.sdn.sap.com/node/724. But now when the reports are accessed via the web page we are encountering the error 'All of your system's 0 Concurrent Access Licenses are in use at this time or your system's license key has expired. Try again later or contact your administrator to obtain additional licenses.---- Error code:-2147217397 Error code name:enterpriseLogonFailed'
    Can anyone share your thoughts or provide suggestions?
    Thanks,
    in advance!
    SG.
    Edited by: Shekhar Gorthy on Aug 4, 2008 10:58 PM
    Edited by: Shekhar Gorthy on Aug 4, 2008 10:59 PM

    Hello SG,
    A common issue that arises when migrating from Crystal Enterprise 10 Embedded to Crystal Reports Server XI applications that use the Report Application Server (RAS) SDK.
    The RAS supports two modes of operation - "Unmanaged" and "Managed" reporting.
    With CE10Embedded, you'd be using Unmanaged Reporting, where you'd copy the Crystal Report rpt file to the RAS server, and reference it by path when opening it in the ReportClientDocument class instance.
    With Crystal Reports Server XI, you can use either Unmanaged Reporting, or Managed Reporting.  Managed means you'd publish the rpt file to be "managed" by the CR Server Central Management Server (CMS).  In code, you'd log onto the CR Server, retrieve the ReportAppFactory from the CMS, retrieve the report from the InfoStore, and pass it into the ReportAppFactory to create the ReportClientDocument.
    I'm assuming you're still using "Unmanaged Reporting" with Crystal Reports Server.
    If so, each report request will be authenticated in the CMS using the "Guest" account, and each request will use up a Concurrent Access License (CAL).
    If you're getting the exception on the first report request, then that likely means you have the complimentary copy of CR Server XI, that comes with zero CALs and five Named User Licenses.
    You won't be able to use unmanaged reporting with the complimentary version.  You may want to modify your code to use managed reporting.
    If you're getting the exception on the sixth or subsequent request, then that likely means you've purchased CR Server XI, and the base edition comes with 5 CALs.
    If you contact sales, you can inform them of the number of users you have, and how frequently they request reports, and sales can recommend a license to match your requirements.
    Sincerely,
    Ted Ueda

  • See sql query from crystal report without crystal report

    see sql query from crystal report without crystal report 

    Hi,
    Depends on datasource type but you could have a look at ODBC trace or if you have access to the SQL Server you could use profiler to monitor the session.
    Regards,
    Craig
    And this will only be of use if you know which Server/Insstance/Database the Report is connecting to...
    Please click "Mark As Answer" if my post helped. Tony C.

  • Migrating from crystal report 8.5 to 10.0 giving error 01S00:error

    migrating from crystal report 8.5 to 10.0 giving error
    I am working in migrating my cr application to 10th ver from the existing 8.5 where we have to explicitly make a query in query builder and then attach it. I was using dsn in ms odbc for oracle driver to connect the DB. Now in 10.0 i have removed the query file created using 8.5 query builder and trying to write directly to command editor. the report as stand alone is working fine. but when i try to generate the pdf using my vb application then on .export option it is giving error as "Logon failed.
    Details: 01S00:[Microsoft][ODBC driver for Oracle]Invalid connection string attribute". i think the problem might be with cddb_oracle.dll or crdb_oracle.dll file as i am using a evaluation version of crystal report 10. as input to dsn i am providing
    1.dsn
    2.usid
    3.database
    4.password
    what else is missing . plz help.....

    Well, you can migrate, you can not upgrade (semantics I suppose). E.g.; the RDC was deprecated in CR XI r1 and retired in CR 2008. Thus there is no way for you to upgrade to version 12 of the RDC as there is no such thing. So, from here, you have two options: migrate / port the app to .NET, or Java SDKs.
    Re. RDC, see my blog here:
    /people/ludek.uher/blog/2008/10/20/report-designer-component--past-present-future
    For porting the app to .NET, see this article:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0eb394f-931e-2b10-3b82-9413bfc3f457
    Ludek

  • How to change the database in Crystal reports

    To give an overview there is one project going on where the oracle database is getting migrated from 10g to 11g.
    All the details of database like IP, port etc are changing as part of this.
    I can see the driver name configured as crdb_ado (Custom driver).
    We have an test environment for 11g against which we have to point all the reports and test it.
    Could you please let me know the below queries
    Where and how to change the IP details in the crystal reports to point to new test and prod databases.
    Overview on this crdb_ado driver
      Basically the database is getting changed and we want the reports to point and run from the new database.
    Thanks

    Hi Vissu,
    Thanks for your reply.
    We need to change the database from the reports which are already running from central management console.
    I can see a custom driver crdb_ado is being used and it connects to a database.
    Could you please let me know where the database configuration is done.
    Ideally we need to add one more database to a config file which i am not able to find.
    I guess it should be similar to tnsnames.ora file in oracle where the different databases are stored.
    From the above image I would like to know where the server details (NECTAR_Prod) would be configured.
    Thanks in advance

  • How to print directly to Printer from Crystal Report Viewer ?

    Hi All,
    We are integrating our Java Web Application with Crystal report XI, currently using JRC and export to PDF for user to preview and print to local printer.
    Now there is new requirement :
    Some clients is using thin client terminal (no harddisk, only has OS +Browser in ROM), so I cannot install Acrobat Reader for them to preview&print the report.
    So I am looking at  Crystal Report Viewer, the question is : Can I print from Crystal Report Viewer directly to local printer without first converting it to PDF (because I can't have acrobat reader installed) ??
    Thank you very much,
    Krist
    Indonesia

    Hi,
    It can't be achieved through XI.
    JRCXI R2 SDK offers the ability to print the report server side
    using the PrintOutputController using printReport(PrintReportOptions printReportOptions) method.
    Here is the code(for XIR2):
    import="com.crystaldecisions.reports.sdk.*"
    import="com.crystaldecisions.sdk.occa.report.lib.*"
    import="com.crystaldecisions.sdk.occa.report.document.*"
    try {
    final String REPORT_NAME = "Inventory.rpt";
    ReportClientDocument reportClientDoc = new ReportClientDocument();
    reportClientDoc.open(REPORT_NAME, 0);
    //Create and set print options.
    PrintReportOptions printOptions = new PrintReportOptions();
    //Note: Printer with the 'printer name' below must already be configured.
    printOptions.setPrinterName("
    10.10.45.220
    BOBJ 2C");
    printOptions.setJobTitle("Sample Print Job from JRC.");
    printOptions.setPrinterDuplex(PrinterDuplex.horizontal);
    printOptions.setPaperSource(PaperSource.auto);
    printOptions.setPaperSize(PaperSize.paperLetter);
    printOptions.setNumberOfCopies(1);
    printOptions.setCollated(false);
    PrintReportOptions.PageRange printPageRange = new PrintReportOptions.PageRange(1,1);
    printOptions.addPrinterPageRange(printPageRange);
    //NOTE: If parameters or database login credentials are required, they need to be set before.
    //calling the printReport() method of the PrintOutputController.
    reportClientDoc.getPrintOutputController().printReport(printOptions);
    reportClientDoc.close();
    out.println("Successfully sent report to the printer.");
    catch(ReportSDKException ex) {     
         out.println(ex);
    Please revert in case you have any query.
    Thanks,
    Neeraj

  • JNDI error while generating pdf from crystal reports in java

    Hi, i want to generate PDF from crystal reports in java. I have the .PDF file with database configured into the report. Following details are available in report.
    1. Server Name      = testdb
    2. Database Name  = testdb
    3. User
    4. Password
    I am using CR XI.
    In CRConfig.xml i had given following details.
    <JDBC>
         <CacheRowSetSize>100</CacheRowSetSize>
         <JDBCURL>jdbc:oracle:thin:@192.218.216.102:1521://TESTDB</JDBCURL>
         <JDBCClassName>oracle.jdbc.driver.OracleDriver</JDBCClassName>
         <JDBCUserName>user</JDBCUserName>
         <JNDIURL>password</JNDIURL>
         <JNDIConnectionFactory></JNDIConnectionFactory>
         <JNDIInitContext>/</JNDIInitContext>
         <JNDIUserName>testdb</JNDIUserName>
         <GenericJDBCDriver>
              <Default>
                   <ServerType>UNKNOWN</ServerType>
                   <QuoteIdentifierOnOff>ON</QuoteIdentifierOnOff>
                   <StoredProcType>Standard</StoredProcType>
                   <LogonStyle>Standard</LogonStyle>
              </Default>
         </GenericJDBCDriver>
    </JDBC>
    When i am calling from java as standalone, i am getting following error.
    JRCAgent1 detected an exception: Error finding JNDI name (testdb)
    at com.crystaldecisions.sdk.occa.report.lib.ReportSDKException.throwReportSDKException(Unknown Source)      at com.businessobjects.reports.sdk.b.i.if(Unknown Source)
    Can anyone let me know where is the problem?

    Actually, the question boils down to; does the framework support the fonts?
    I believe that my question re. this working in the designer was valid. The designer does not use the framework, so if it works there, it is either a framework issue or a runtime print engine issue.
    I believe if you use the code below, it will list fonts available to the framework:
    foreach(FontFamily ff in FontFamily.Families)
    System.Diagnostics.Debug.WriteLine(ff.Name);
    For more information see kbase [1198306 - Crystal Report displaying incorrect font in Microsoft Visual Studio .NET|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_dev/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333133393338333333303336%7D.do]
    Ludek

  • I can't connect to MySQL database from The JSP Standard Tag Library

    Hi All !
    I have a problem, please help me anybody !
    I don't connect to MySQL database from jsp page using JSTL tag but from servlet all work correctly. I set my path and put �mysql-connector-java-3.1.13-bin.jar� in ENVIRONMENT WinXP(classpath=C:\Java\jdk1.5.0_10\jre\lib\ext\mysql-connector-java-3.1.13-bin.jar) and in War project folder �WEB-INF/lib� and in [TomcatServer]\common\lib.
    I have in folder�WEB-INF/lib� following files:
    antlr.jar
    commons-beanutils.jar
    commons-collections.jar
    commons-digester.jar
    commons-fileupload.jar
    commons-logging.jar
    commons-validator.jar
    jakarta-oro.jar
    jsf-api.jar
    jsf-impl.jar
    jstl.jar
    mysql-connector-java-3.1.13-bin.jar
    standard.jar
    struts.jar
    I'm using:
    NetBeans 5.5 Build200610171010 (bundled Tomcat 5.5.17)
    Ent.Pack 20061020 Visual Wb Pack 061103
    OS WinXP SP2
    Java 1.5.0_10
    MySQL 5.0.18-nt
    1:<%@page contentType="text/html"%>
    2:<%@page pageEncoding="UTF-8"%>
    8: <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    9: <%@taglib uri="http://java.sun.com/jstl/sql" prefix="sql"%>
    10:
    11: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    12: "http://www.w3.org/TR/html4/loose.dtd">
    13:
    14: <sql:setDataSource var="ds"
    15: driver="com.mysql.jdbc.Driver"
    16: url="jdbc:mysql://localhost:3306/test"
    17: user="root"
    18: password="xxxx"/>
    19:
    20:
    21:<sql:query sql="select name, age from People" var="res"
    22: dataSource="${ds}"/>
    I have received report on mistake when entered code at the top:
    �/index.jsp [21;0] According to TLD or attribute directive in tag file, attribute dataSource does not accept any expressions�
    I used instead of (dataSource="${ds}")->(dataSource="ds") but this did not work.
    After build and run I have received
    =========================================START=================================
    HTTP Status 500
    type Exception report:
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: /index.jsp(21,0) According to TLD or attribute directive in tag file, attribute dataSource does not accept any expressions
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
    root cause
    org.apache.jasper.JasperException: /index.jsp(21,0) According to TLD or attribute directive in tag file, attribute dataSource does not accept any expressions
    org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
    org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
    org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:146)
    org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:955)
    org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:710)
    org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
    org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
    org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
    org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
    org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
    org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
    org.apache.jasper.compiler.Validator.validate(Validator.java:1489)
    org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:166)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.
    Apache Tomcat/5.5.17
    =======================================END================================
    Error: "According to TLD or attribute directive in tag file, attribute dataSource does not accept any expressions" - but according to documentation such parameter possible.
    BUT WHEN JOINING With DATABASE FROM SERVLET ALL WORK FINE.
    I read this doc - [http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html], this applicable if I Tomcat Admin, but i'am not Admin
    I simply user, i.e. I want to place its database on virtual host (Tomcat+(JSP-JSTL)+MySQL).
    There is idea how can resolve this problem
    Thank you in advance ;)

    For all how have similar problem.
    Decision instead of these ways
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql" %>
    it is necessary to indicate these
    <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

Maybe you are looking for

  • How to put apostrophes in a query

    Hi, We use JDK1.2.2 with Oracle 8. We are using JDBC with the Oracle Driver installed. We have a list of companies in our database, some of which have an apostrophe in them. However, if someone types a company name containing an apostrophe on a compa

  • HT3209 iTunes HD movies and Mac Book Pro Retina????

    Why can't i buy HD movies for my macbook pro retina? get HD error message?

  • Moving Out with 27' iMac

    Hi! I'm moving out and I need a box for my 27' iMac. I don't know what should I do like... can we call Apple to buy an empty box with styrofoam in it to protect it? That'd be great.. Any ideas? Please

  • Handy app: PDF to Keynote

    Here's a very handy tool I've just run across, and I haven't seen mentioned here: PDF to Keynote. Like the name says, it will take a PDF document, and put each page on a separate slide in a new Keynote presentation. You can set various parameters for

  • Is there an easy way to clean up HTML

    I'm currently converting a lot of installation guides from PDF to HTML files, however, when the documents are output to HTML, the <p> tags have specific styles applied and they all vary and I find myself having to scour the code by hand. Would like t