Using Data Provider

Hi,
I am using Data Provider.
Below are the pararmeters I am passing to it,
oms:dataSource <parameter>mslv/oms/oms1/internal/jdbc/DataSource</parameter> DefaultValue=Xquery
oms:sql <parameter>select name from employee where job=?</parameter> DefaultValue=Xquery
in:1
Now I want to pass a dynamic value for the where clause in the Sql.
My Order Data is,
<OrderData>
<Employee>
<Name></Name>
<Job>Engineer</Job>
</Employee>
</OrderData>
Now I want to pass the "Engineer" value to the where clause. How can I define a Xpath or Xquery for the in:1 parameter?
Please help.

You can find documentation for the DatabaseAdapter "Data Provider" class (also known as a View Framework Adapter) in the OSM SDK Javadocs. The Javadocs for the class provide information and an example to let you do what you are trying to do. I've copy/pasted them here for your reference:
This class implements a View Framework external instance adapter that executes a SQL statement and builds an XML document based on the result set.
There are two mandatory parameters for this class, oms:sql and oms:dataSource.
oms:dataSource: Refers to the jndi name of a JDBC datasource defined in WebLogic. For example 'mslv/oms/oms1/internal/jdbc/DataSource'
oms:sql: Contains the sql that will be sent to the database. For example 'select * from scott.emp where empno=?'
Additional optional input parameters may be supplied that will be bound to parameters defined in the oms:sql value. For example, in the above sql statement a parameter is used to define the value for 'empno' in the where clause. A value for this parameter may be specified by defining a paremter called "in:1". If there were additional input parameters defined in the sql statement, these could be passed as "in:2", "in:3" and so on.
In all cases these input parameters will be assumed to be string values and bound to the sql statement as string values.
The following is an example of using the DatabaseAdapter to invoke a query:
<instance name="well_paid_salesman" xsi:type="externalInstanceType">
<adapter>com.mslv.oms.view.rule.adapter.DatabaseAdapter</adapter> <parameter
name="oms:dataSource">'mslv/oms/oms1/internal/jdbc/DataSource'</parameter> <parameter
name="oms:sql">"select * from scott.emp where job='SALESMAN' and sal > ?"</parameter> <parameter
name="in:1">1250</parameter> </instance>
The above declaration returns the following XML instance:
<results> <rowSet> <row> <empno>7499</empno> <ename>ALLEN</ename> <job>SALESMAN</job> <mgr>7698</mgr>
<hiredate>1981-02-20 00:00:00.0</hiredate> <sal>1600</sal> <comm>300</comm> <deptno>30</deptno> </row> <row>
<empno>7844</empno> <ename>TURNER</ename> <job>SALESMAN</job> <mgr>7698</mgr> <hiredate>1981-09-08
00:00:00.0</hiredate> <sal>1500</sal> <comm>0</comm> <deptno>30</deptno> </row> </rowSet> </results>
The DatabaseAdapter can also be used to execute SQL stored procedures.
The DatabaseAdapter provides a stored procedure SQL escape syntax that allows stored procedures to be called in a standard way for all RDBMSs. This escape syntax is defined as part of the Java JDBC API.
This escape syntax has one form that includes a result parameter and one that does not. If used, the result parameter must be registered as an OUT parameter. The other parameters can be used for input, output or both. Parameters are referred to sequentially, by number, with the first parameter being 1.
{?= call [,, ...]}
{call [,, ...]}
Values for input parameters to the stored procedure are specified using the in:1, in:2 (etc.) parameters in the same way as they are for regular SQL queries.
Output parameters are specified using out:1, out:2 (etc.). Keep in mind that the parameter number (1, 2, 3, etc.) are numbered sequentially from 1 ordered from left to right in the specified SQL statement including both input and output parameters.
The value of the parameter is the parameter SQL type (see http://java.sun.com/j2se/1.4.2/docs/api/java/sql/Types.html for a list of types).
The following example illustrates how to call a database stored procedure that has one output parameter (the result of the stored procedure call), and one input parameter.
<instance name="lock_count" xsi:type="externalInstanceType">
<adapter>com.mslv.oms.view.rule.adapter.DatabaseAdapter</adapter> <parameter
name="oms:dataSource">'mslv/oms/oms1/internal/jdbc/DataSource'</parameter> <parameter
name="oms:sql">"{? = call om_cartridge_pkg.get_any_cartridge_id('my_cartridge',?)}"</parameter> <parameter
name="out:1">'INTEGER'</parameter> <parameter name="in:2">'1.1'</parameter> </instance>
The above declaration returns the following XML instance:
<results> <outputParameter number="1">1234</outputParameter> </results>
Hope this helps.
Brian.

Similar Messages

  • Newbie attempting to use Data Provider

    Hello everyone, I just downloaded Flex and am eager to learn
    but I'm having some difficulties finding any debugging tools to
    help me troubleshoot the code below. I basically grabbed the data
    provider example and tried to rework it for something I need but
    the cursor gets set to busy and the data never loads.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="400" height="300" creationComplete="qSrv.send()">
    <mx:Script>
    <![CDATA[
    import mx.rpc.events.InvokeEvent;
    import mx.managers.CursorManager;
    import mx.rpc.events.ResultEvent;
    import mx.rpc.events.FaultEvent;
    import mx.controls.Alert;
    import mx.collections.ArrayCollection;
    [Bindable]
    private var questionsCol:ArrayCollection;
    // Gets called when HTTPService is invoked to
    // request the XML.
    private function qSrvInvokeHandler(event:InvokeEvent):void
    // Display the busy cursor
    CursorManager.setBusyCursor();
    // Gets called when the XML is successfully loaded.
    private function qSrvResultHandler(event:ResultEvent):void
    // Save a reference to the list of questions
    questionsCol = event.result.MBTI.question;
    // Hide the busy cursor
    CursorManager.removeBusyCursor();
    private function qSrvFaultHandler(event:FaultEvent):void
    // There was an error in loading the XML
    Alert.show (event.fault.message);
    // Hide the busy cursor
    CursorManager.removeBusyCursor();
    ]]>
    </mx:Script>
    <mx:HTTPService id="qSrv" url="data/questions.xml"
    invoke="qSrvInvokeHandler(event);"
    result="qSrvResultHandler(event);"
    fault="qSrvFaultHandler(event);" />
    </mx:Canvas>
    and the xml located in the data folder:
    <?xml version="1.0" encoding="UTF-8"?>
    <MBTI>
    <question>
    <description>
    You are almost never late for your appointments
    </description>
    </question>
    </MBTI>

    Okay here is a different way of doing it. It doesn't seem to
    render properly if I have a canvas component and try to load the
    data, only if it's within the application directly. Below is the
    code I currently have, why does the label of the QuestionHBox
    always come up blank?
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns:components="*" layout="absolute"
    creationComplete="qSrv.send()">
    <mx:Script>
    <![CDATA[
    import mx.rpc.events.InvokeEvent;
    import mx.managers.CursorManager;
    import mx.rpc.events.ResultEvent;
    import mx.rpc.events.FaultEvent;
    import mx.controls.Alert;
    import mx.collections.ArrayCollection;
    [Bindable]
    private var questionsCol:ArrayCollection;
    // Gets called when HTTPService is invoked to
    // request the XML.
    private function qSrvInvokeHandler(event:InvokeEvent):void
    // Display the busy cursor
    CursorManager.setBusyCursor();
    // Gets called when the XML is successfully loaded.
    private function qSrvResultHandler(event:ResultEvent):void
    // Save a reference to the list of questions
    questionsCol = event.result.MBTI.question;
    // Hide the busy cursor
    CursorManager.removeBusyCursor();
    private function qSrvFaultHandler(event:FaultEvent):void
    // There was an error in loading the XML
    Alert.show (event.fault.message);
    // Hide the busy cursor
    CursorManager.removeBusyCursor();
    ]]>
    </mx:Script>
    <mx:HTTPService id="qSrv" url="data/questions.xml"
    invoke="qSrvInvokeHandler(event);"
    result="qSrvResultHandler(event);"
    fault="qSrvFaultHandler(event);" />
    <mx:Model id="artwork" source="data/questions.xml"/>
    <mx:Panel title="Employee Factor Personality Assessment"
    height="95%" width="95%"
    paddingTop="10" paddingLeft="10" paddingRight="10"
    paddingBottom="10">
    <mx:Text width="100%" color="blue"
    text="Welcome Kim Garland"/>
    <mx:HBox borderStyle="solid" width="100%"
    paddingTop="5" paddingLeft="5" paddingRight="5"
    paddingBottom="5">
    <mx:Button id="searchButton" label="Take Test"
    click="myViewStack.selectedChild=search;"/>
    <mx:Button id="cInfoButton" label="View Results"
    click="myViewStack.selectedChild=custInfo;"/>
    </mx:HBox>
    <!-- Define the ViewStack and the three child containers
    and have it
    resize up to the size of the container for the buttons.
    -->
    <mx:ViewStack id="myViewStack" borderStyle="solid"
    width="100%" height="80%">
    <!-- <components:TestQuestionsPart1 id="search"
    backgroundColor="#FFFFCC" label="Search" width="100%"
    height="100%">
    <mx:Label text="Test Part 1" color="#000000"/>
    </components:TestQuestionsPart1> -->
    <mx:Canvas id="search" backgroundColor="#CCFFFF"
    label="Customer Info" width="100%" height="100%">
    <mx:Label text="Test" color="#000000"/>
    <mx:TileList dataProvider="{questionsCol}"
    itemRenderer="QuestionHBox" />
    <!--<mx:Repeater dataProvider="questionsCol">
    <mx:Label text="name" />
    </mx:Repeater> -->
    </mx:Canvas>
    <mx:Canvas id="custInfo" backgroundColor="#CCFFFF"
    label="Customer Info" width="100%" height="100%">
    <mx:Label text="Test Results" color="#000000"/>
    </mx:Canvas>
    </mx:ViewStack>
    </mx:Panel>
    </mx:Application>
    QuestionHBox:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:HBox xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="100%" height="20" scroll="false">
    <mx:Label text="{data.name}" width="700" fontSize="12"
    textAlign="left"/>
    <mx:RadioButtonGroup id="radiogroup1"/>
    <mx:RadioButton label="Yes" groupName="radiogroup1"
    height="100%"/>
    <mx:RadioButton label="No" groupName="radiogroup1"
    height="100%"/>
    </mx:HBox>
    questions.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <MBTI>
    <question>
    <name>You are almost never late for your
    appointments</name>
    </question>
    <question>
    <name>You are almost never late for your
    appointments</name>
    </question>
    </MBTI>

  • Use table component without data provider

    Since it is very difficult to solve the browser "BACK" button problem caused by my data provider, I decide not to use data provider to populate the table.
    Does anyone know some sample code about playing around with the table component without using data provider?
    Thanks in advance,

    Unfortunately, Table Component from basic category does not work with out Data Provider. But Data Table component from standard section works with out data provider. But it does not have the frills and whistles of basic table component.
    - Winston
    http://blogs.sun.com/roller/page/winston?catname=Creator

  • How can I use more than one Data Provider in my web Apps

    I am trying to use two different data provider in my web apps to run two different queries from the same table ,the data provider A is working correctly but when I attempt to run data provider B ,It display an error page ,here is the error message : Exception Details :javax.servlet.ServletEx ception
    java.lang.RuntimeException: java.sql.SQLException : Cannot connect .Both dataSourceName and url properties are null.

    Hi,
    You can use more than one data provider in your application. However if you have defined a dataprovider for a particular table already, and wish to bind a component, select the component and use its context menu to Bind to Data...

  • Extracting SQL statement from a Webi document's data provider using SDK.

    Hi all,
    Is it possible to extract the SQL statement from an existing Webi document's data provider using BO SDK?  I've searched through the class library but haven't found any information on this yet.  If you have done it, could you provide some guidance.  Many thanks.

    I found the following Java code that might be of some help to you. I realize you are using .NET but this might push you down the right path.
    The trick here is to use the Report Engine SDK to get the DataProvider of the DocumentInstance. Then, look at the SQLDataProvider to get your SQLContainer.
    My apologies for the poor formatting. This didn't copy and paste over to the forums very well. I've cleaned up as much as I could.
    <%@ page import="com.crystaldecisions.sdk.framework.*" %>
    <%@ page import="com.crystaldecisions.sdk.exception.SDKException" %>
    <%@ page import="com.crystaldecisions.sdk.occa.infostore.*" %>
    <%@ page import="com.businessobjects.rebean.wi.*" %>
    <%
    boolean loginSuccessful = false;
    IEnterpriseSession oEnterpriseSession = null;
    String username = "username";
    String password = "password";
    String cmsname  = "cms_name";
    String authenticationType = "secEnterprise";
    try
    //Log in. oEnterpriseSession = CrystalEnterprise.getSessionMgr().logon( username, password, cmsname, authenticationType);
    if (oEnterpriseSession == null)
    out.print("<FONT COLOR=RED><B>Unable to login.</B></FONT>");
    else
    {  loginSuccessful = true;
    catch (SDKException sdkEx)
    { out.print("<FONT COLOR=RED><B>ERROR ENCOUNTERED</B><BR>" + sdkEx + "</FONT>");}
    if (loginSuccessful) { IInfoObject oInfoObject = null;
    String docname = "WebI document name";
    //Grab the InfoStore from the httpsession IInfoStore oInfoStore = (IInfoStore) oEnterpriseSession.getService("", "InfoStore");  //Query for the report object in the CMS.  See the Developer Reference guide for more information the query language.   String query = "SELECT TOP 1 * " +        "FROM CI_INFOOBJECTS " +        "WHERE SI_INSTANCE = 0 And SI_Kind = 'Webi' " +        "AND SI_NAME='" + docname + "'";
    IInfoObjects oInfoObjects = (IInfoObjects) oInfoStore.query(query);
    if (oInfoObjects.size() > 0)
    //Retrieve the latest instance of the report  oInfoObject = (IInfoObject) oInfoObjects.get(0);
      // Initialize the Report Engine  ReportEngines oReportEngines = (ReportEngines)
    oEnterpriseSession.getService("ReportEngines"); 
    ReportEngine oReportEngine = (ReportEngine) oReportEngines.getService(ReportEngines.ReportEngineType.WI_REPORT_ENGINE);
      // Openning the document  DocumentInstance oDocumentInstance = oReportEngine.openDocument(oInfoObject.getID());   
    DataProvider oDataProvider = null; 
    SQLDataProvider oSQLDataProvider = null; 
    SQLContainer oSQLContainer_root = null; 
    SQLNode oSQLNode = null;
    SQLSelectStatement oSQLSelectStatement = null; 
    String sqlStatement = null;
      out.print("<TABLE BORDER=1>");
    for (int i=0; i<oDocumentInstance.getDataProviders().getCount(); i++)
    oDataProvider = oDocumentInstance.getDataProviders().getItem(i);
      out.print("<TR><TD COLSPAN=2 BGCOLOR=KHAKI>Data Provider Name: " + oDataProvider.getName() + "</TD></TR>");
       if (oDataProvider instanceof SQLDataProvider)
    oSQLDataProvider = (SQLDataProvider) oDataProvider;
        oSQLContainer_root = oSQLDataProvider.getSQLContainer();
        if (oSQLContainer_root != null)
    for (int j=0; j<oSQLContainer_root.getChildCount(); j++)
    oSQLNode = (SQLNode) oSQLContainer_root.getChildAt(j);
          oSQLSelectStatement = (SQLSelectStatement) oSQLNode;             
    sqlStatement = oSQLSelectStatement.getSQL();     
    out.print("<TR><TD>" + (j+1) + "</TD><TD>" + sqlStatement + "</TD></TR>");   
    else
    out.print("<TR><TD COLSPAN=2>Data Provider is not a SQLDataProvider.  SQL Statement can not be retrieved.</TD></TR>");   }  }  out.print("</TABLE>");
      oDocumentInstance.closeDocument(); }
    oEnterpriseSession.logoff();}%>

  • Using a Web Service as a data provider for a Crystal Report

    <p>I&#39;m trying to write a Crystal Reports XI report that uses a Web Service as the data provider.  I have a Web Service written in ColdFusion that looks like this.<br /><br /><cfcomponent displayName="FindEmployee" ><br />   <cffunction name="FindEmployeeSort" access="remote"          <br />               returnType="xml" output="false"><br />      <cfdump var=form><br />      <cfset myXML = ""><br />       <!--- FindEmployeeSort body ---><br />       <cfquery name="EmployeeQuery" datasource="Production"><br />           Select * from employee<br />          <cfif isdefined(&#39;form.lastname&#39;)><br />             WHERE lastname LIKE &#39;%#form.lastname#%&#39; <br />          </cfif><br />           Order by lastname asc <br />        </cfquery><br />     <cfreturn EmployeeQuery>  <br />   </cffunction><br /></cfcomponent><br /><br />I can get the web service to work from a ColdFusion page (either locally or on a remote server).</p><p>When I try to create the CR data source, I get the following error:</p><p>Crystal Reports<br />! Logon Failed.<br />Details: Cannot find correspondign table information in the XML file</p><p>The steps I took were:<br />* Choose XML from the "Avalable Data Sources"<br />* Choose "Use Web Service Data Source"<br />* Choose "Use HTTP(S) WSDL" with a url of <a href="http://host/directory/FindEmployee.cfc?wsdl">http://host/directory/FindEmployee.cfc?wsdl</a><br />* Leave the "HTTP(S) Web Service User ID:" and "HTTP(S) Web Service Password:" parameters blank<br />* Accept the defaults for Services, Ports, and Methods.  They are respectively FindEmployee, FindEmployee.cfc and FindEmployeeSort.<br />* Then get the error</p><p>The most likely candidate to me is the user id and password, but I have no idea what to use.  I didn&#39;t have to set any login information up in the ColdFusion pages that I used to test the Web Service.</p><p>Any ideas where to go from here?</p><p>Thanks,</p><p>Brian</p>

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

  • I bought new i phone 5 3 days back, after that asked for new update which is 6.1.4, after updating my iphone i am not able to use cellular data services. I called up data provider, they says its the problem with new software update. There is no option add

    I bought new i phone 5 3 days back, after that asked for new update which is 6.1.4, after updating my iphone i am not able to use cellular data services. I called up data provider, they says its the problem with new software update. There is no option add APN. Now when i switch to safari its showing you are not subscribed for cellular data. But I am able to use data on other phone.
    Will you please help me in this regard?
    Another issue, since i bought my new iphone there is dust inside back main camera.
    Your advises are highly appreciated.

    Hey Shaiju isac,
    I'd take a look at the following article, it'll guide you though steps to you troubleshoot cellular data issues on your iPhone:
    iPhone: Troubleshooting a cellular data connection
    http://support.apple.com/kb/ts3780
    Cheers,
    David

  • Best Practice on using and refreshing the Data Provider

    I have a �users� page, that lists all the users in a table - lets call it master page. One can click on the first column to of the master page and it takes them to the �detail� page, where one can view and update the user detail.
    Master and detail use two different data providers based on two different CachedRowSets.
    Master CachedRowSet (Session scope): SELECT * FROM UsersDetail CachedRowSet (Session scope): SELECT * FROM Users WHERE User_ID=?I want the master to be updated whenever the detail page is updated. There are various options to choose from:
    1. I could call masterDataProvider.refresh() after I call the detailDataProvider.commitChanges() - which is called on the save button on the detail page. The problem with this approach is that the master page will not be refreshed across all user sessions, but only for the one saving the detail page.
    2. I could call masterDataProvider.refresh() on the preRender() event of the master page. The problem with this approach is that the refresh() will be called every single time someone views the master page. Further more, if someone goes to next page (using the built in pagination on the table on master page) and clicks on a user to view its detail and then close the detail page, it does not keep track of the pagination (what page the user was when he/she clicked on a record to view its detail).
    I can find some work around to resolve this problem, but I think this should be a fairly common usage (two page CRUD with master-detail). If we can discuss and document some best practices of doing this, it will help all the developers.
    Discussion:
    1.     What is the best practice on setting the scope of the Data Providers and CahcedRowSet. I noticed that in the tutorial examples, they used page/request scope for Data Provider but session scope for the associated CachedRowSet.
    2.     What is the best practice to refresh the master data provider when a record/row is updated in the detail page?
    3.     How to keep track of pagination, (what page the user was when he/she clicked on the first column in the master page table), so that upon updating the detail page, we cab provide user with a �Close� button, to take them back to whaterver page number he/she was.
    Thanks
    Message was edited by:
    Sabir

    Thanks. I think this is a useful information for all. Do we even need two data providers and associated row sets? Can't we just use TableRowDataProvider, like this:
    TableRowDataProvider rowData=(TableRowDataProvider)getBean("currentRow");If so, I am trying to figure out how to pass this from master to detail page. Essentially the detail page uses a a row from master data provider. Then I need user to be able to change the detail (row) and save changes (in table). This is a fairly common issue in most data driven web apps. I need to design it right, vs just coding.
    Message was edited by:
    Sabir

  • Using Data-Dependent Routing in combination with Membership provider

    Hi there!
    Currently we have two Web applications running on azure using a single SQL database. We are experiencing problems with performance because we are using only one database. We are investigating some solutions like documentDB and elastic scale.
    DocumentDb seems like a really good option for us because it looks like it can be implemented easily and we know just what to do.
    With elastic scale on the other hand we have to figure out what our options are. We are using a membership provider for our users to login in one of the two applications. The other web applications does not use a membershipprovider, it does not use a login
    system at all.
    in the backend of our code we determine a subscription_id for both applications to retrieve tenant data.
    I think we have a few options here
    1. to keep using the membershipprovider we could create a database just for the login mechanism so we can determine the subscription_id, and with that subscription_id we can use Data-Dependent Routing to retrieve the correct data from the correct shard.
    2. We can add extra columns to the Shard Map Manager database (i think i've read that it's not supposed to be used for user data) like username and password so we can login through this database.
    Does anyone has better options than the options mentioned before and can anyone give me advise on how we should deal with these issues?
    Thanks!

    Elmar --
    The best approach would be to maintain the Membership DB in a separate Azure SQL database.  Then you could shard your transaction details across an Elastic Scale set of databases based on the subscription ID.   (The Shard Map Manager
    database is not designed to be extended with additional columns, and Elastic Scale works by caching that Shard Map data in the client application anyway, and those in-memory structures can't be changed).
    You would use an ordinary ADO.Net connection to query membership for a Subscription ID, and then get an appropriate shard-specific connection using the Elastic Scale GetOpenConnectionForKey method, passing the subscription ID retrieved from
    the membership query. 

  • How to use Db Provider Factories with System.Data.SqlServerCe

    I'm using SQL Server Compact Edition, but in the future I would like to be able to switch to another SQL Server Edition or even a different database. To achieve this, Microsoft recommends using DB Provider Factories (see: Writing Provider Independent Code in ADO.NET, http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=674426&SiteID=1).
    I enumerated the available data providers on my PC with:
    Code Snippet
    System.Reflection.Assembly[] myAssemblies = System.Threading.Thread.GetDomain().GetAssemblies();
    The important entry is:
    "SQL Server CE Data Provider"
    ".NET Framework Data Provider for Microsoft SQL Server 2005 Mobile Edition"
    "Microsoft.SqlServerCe.Client"
    "Microsoft.SqlServerCe.Client.SqlCeClientFactory, Microsoft.SqlServerCe.Client, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"
    When executing:
    Code SnippetdataFactory = DbProviderFactories.GetFactory("System.Data.SqlServerCe");
    I got at first this error run time message:
    Failed to find or load the registered .Net Framework Data Provider.
    I added a reference to "Microsoft.SqlServerCe.Client" at C:\Programme\Microsoft Visual Studio 8\Common7\IDE\Microsoft.SqlServerCe.Client.dll and the program runs.
    Of course, it uses "Microsoft.SqlServerCe.Client" instead of "System.Data.SqlServerCe". Laxmi Narsimha Rao ORUGANTI from Microsoft writes in the post  "SSev and Enterprise Library" that "Microsoft.SqlServerCe.Client" is not meant to be used and that we should add the following entry to the machine.config file:
    Code Snippet<add name="SQL Server Everywhere Edition Data Provider" invariant="System.Data.SqlServerCe" description=".NET Framework Data Provider for Microsoft SQL Server Everywhere Edition" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
    After changing the code to:
    Code Snippet
    dataFactory = DbProviderFactories.GetFactory("Microsoft.SqlServerCe.Client");
    I get the same error message as before, even after adding a reference to "System.Data.SqlServerCe"  at C:\Programme\Microsoft Visual Studio 8\Common7\IDE\System.Data.SqlServerCe.dll.
    Any suggestion what I should do ? Just use "Microsoft.SqlServerCe.Client" ? Anyway, I don’t like the idea that I have to change the machine.config file, since I want to use click once deployment.

    It seems there is no DbProviderFactory for System.Data.SqlServerCe. At least I couldn’t find one, no matter how hard I searched on the Internet. I only found Microsoft.SqlServerCe.Client.SqlCeClientFactory. But we are not supposed to use Microsoft.SqlServerCe.Client and the 2 classes do have quiet some differences among their members. So I decided to write my own factory:
    Code Snippet
    public class SqlCeClientFactory: DbProviderFactory {
    public static readonly SqlCeClientFactory Instance = new SqlCeClientFactory();
    public override DbCommand CreateCommand() {
    return new SqlCeCommand();
    public override DbCommandBuilder CreateCommandBuilder() {
    return new SqlCeCommandBuilder();
    public override DbConnection CreateConnection() {
    return new SqlCeConnection();
    public override DbDataAdapter CreateDataAdapter() {
    return new SqlCeDataAdapter();
    public override DbParameter CreateParameter() {
    return new SqlCeParameter();
    That was easy enough, right ? I spent 1 week investigating the problem, 10 minutes solving it. I wonder why Microsoft didn’t include this class, because they have already the code in Microsoft.SqlServerCe.Client. I guess they have their reasons, but of course, they don’t tell us. After wasting one more month, I probably can tell. Oh, how I hate this.
    Or has anyone an idea what might be the problem ?

  • Bank row was added in webi rich client when using excel as data provider

    reproduding steps:
    1.open webi rich client.
    2.Create a new webi report,then select "local data source"
    3.select an excel file as data source.
    4.run query.
    For example,there are 5rows in excel,but in webi report there are 6 rows,and the last row is bank which is added by webi.
    question
    1. mcro has been defined in the excel file,is there any impact by using macro?
    2.I want to know why this happens,

    >could you please test the following solution if you have multiple data providers in the report.
    >We need to manually link the dimensions then in the resulting crosstab/table we are need to apply >filters and select only the values but not the #empty values.
    I have only one data provider in the report.
    And, I have do the following test,
    test1:Delete the last row which is blank row of the excel file,refresh webi report, the last blank row is still there.
    test2: press ALT+F8,delete marco in the excel file,refresh webi report, the last blank row is still there,then delete the last blank row in the excel file ,save excel file,refresh webi,the last blank row is disappear.

  • Use condition for assigning query to data provider with Javascript

    Hi gurus,
    I want to assign a query dynamically to a data provider when the user activated a Tab Panel in a Web Template (BI7).
    I can do that easily with the standard function SET_DATA_PROVIDER_PARAMETERS but this action is do each time of the activation of the Tab Panel.
    So I try to make a javascript for assign the query to the data provider only one time.
    My problem is I havenu2019t found a solution to get the default query assigning to the data provider.
    Itu2019s an example of what I try to do with javascipt :
    function Load_Query()
    var r=GET_DATA_PROVIDER PARAMETER ("QUERYVIEW_DATA_PROVIDER")
    if (r <>empty)
        executeJS_SET_DATA_PROVIDER_PARAMETERS_R()
    Thank you for help,
    Franck

    Hi Janice,
    You can check the Option Display Variable values only once.
    Thie you will the variables being displayed only once eventhough they are used in Multiple Data provider.
    If you want som variable to be data provider specific, then , you can create a new variable and add it int eh query.
    For example in your case let us say COMP1 is the variable for company code used in DP1 and DP2.
    If you want a different values to be selected for company code in DP1 and DP2 just replce the variable in DP2 with a new variabel COMP2.
    Hope this helps.
    Regards.
    Shafi.

  • How to read data from the data provider using javascript

    Hi,
    Please let me know how to read the data from the dataprovider using javascript(query assigned to the data provider).
    My query has filter charateristics, free charateristics, charateristics in rows and key figure in column.
    Thanks a lot for your kind help
    Regards
    Kandasamy

    Kandaswamy,
    Assign an ID to your table item , then in JavaScript , you can use ID.innerHTML and you will get the HTML code within that table for the same , then you can find out how best to get the exact value you desire from the innerHTML value which is a string with the entire HTML from within the table item.
    Arun
    Hope it helps....

  • Using HTTPService as data provider for mx:ComboBox

    Hello all,
    I'm trying to use an HTTPService as a data provider for an
    mx:ComboBox. Here's how I have my HTTPService configured:
    <mx:HTTPService id="listStates" url="
    http://localhost:3006/state/list"
    useProxy="false" method="GET" />
    I have a Rails backend setup and talking to a database on my
    local machine. I have a list of states in a table in my database,
    and the table has two columns: id and name. When I go to
    localhost:3006/state/list in my browser, I get the following XML:
    <states>
    <state>
    <id type="integer">1</id>
    <name>New Mexico</name>
    </state>
    <state>
    <id type="integer">2</id>
    <name>Arizona</name>
    </state>
    </states>
    I have my mx:ComboBox set up like so:
    <mx:ComboBox width="199" id="state" dataProvider="{
    listStates.lastResult.states.state }" />
    However, when I browse to my .swf file, my state combo box
    shows [object Object] twice in the drop-down list. Anyone have any
    idea why it's not parsing the data correctly? Any suggestions on
    how to make it work?
    Thanks in advance!!! -- BTR

    Alright I worked one out for you. Let me know if you have any
    questions.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute"
    creationComplete="dropDown.send()">
    <mx:Script>
    <![CDATA[
    import mx.rpc.events.ResultEvent;
    import mx.collections.ArrayCollection;
    import mx.controls.Alert;
    public var dropArr:XML;
    public function get_drop_down(e:ResultEvent):void{
    dropArr = e.result as XML;
    state.dataProvider = dropArr.state;
    state.labelField = "name";
    state.data = "id";
    ]]>
    </mx:Script>
    <mx:HTTPService id="dropDown" useProxy="false"
    url="
    http://localhost/dropDown.php"
    resultFormat="e4x"
    result="get_drop_down(event)" />
    <mx:ComboBox width="199" id="state" />
    </mx:Application>

  • Error using an XML as data provider for either datagrid or linechart

    Hi,
    I am developing an application using Flex and Java servlets.
    Upon user
    event, I load the data using the servlet and store the data
    in a
    Dictionary. I am running into couple of issues from here
    a. If I try to use the XML object in the dictionary as the
    data provider
    for either Datagrid or Linechart I am unable to view the
    data. I did a
    trace on the object and it has the correct data.
    b. Also, I am unable to access the content of child elements
    when using
    a parent element as the data provider.
    ex. parent. child1. child2 does not work, it works when I
    provide child2
    as the dataprovider directly.
    Please let me know what might be the root causes and
    resolutions.
    Thanks in advance,
    Nataraj

    I did not find a solution to the problem and created a list
    of the child objects and used that as the source instead of the top
    level XML object. This worked.

Maybe you are looking for

  • Dynamic page references within document

    I am working on a small binder style book that has 8 sections. The project is destined to be updated frequently and the client only wants to reprint the appropriate sections. So the question is, within the body text are numerous page references that

  • Ipad Glass

    Have a small unexpected crack in the glass of the my Ipad2.  Can it be replaced and if so where and what woudl it cost?  Also my Ipad2 does not play volume when connected to an HDMI TV with the HDMI adapter that was purchases with the Ipad2.  It did

  • Car blue tooth caller can't hear me clearly. How can I resolve this?

    I have just installed a MEX-N5050BT which is working well except my callers cant hear me clearly. How can I resolve this? I cant find any way of increasing the volume of sound through microphone. Any ideas appreciated.

  • User-defined tables, user-defined fields, and records limitation

    Hi,   I would like to use UDT and UDF as my add on table. I doubt there is the limitation (performance issue) using these. Can someone tell me what is the max UDT, UDF, and records can application support? rgds ERIC

  • SAP Gui - no ABAP documentation appearing

    Hi, Im facing problem with my SAP GUI. Im not able to see documentation. When I see 'F1' help for any object, a blank window appears. Also in SE80 (Object Navigator), the areaa where we can enter objects is coming as blank. Im not able to enter objec