Priorité d'execution de Vi

J'ai un Vi Menu qui appelle un autre Vi Acquisition, qui fait des acquisitions de données sur un multimetre HP par liaison RS232. L'orsque les acquisitions sont terminées, le Vi Acquisition se ferme et je reviens donc au Vi Menu pour faire un autre choix ou une nouvelle application.
En gros dans mon Vi Menu:
C'est une boucle While qui comporte 2 boutons : Exit ou Lancer acquisition
- Si on clique sur exit on quitte le programme
- Si on clique sur Lancer acquisition: le Vi Acquisition se lance (dans les proriété du Vi Acquisition j'ai mis faire apparaitre la face avant lors de l'appel et fermer après execution)
Le Vi Acquisition c'est aussi une boucle while dans laquelle je communique avec le multimetre avec Visa.read et Visa.write
Le probleme c'est que les deux Vi s'executent donc en meme temps et je ne
sais pas trop comment sont gérés les 2 executions de VI simultané.
Ce qui serai bien c'est que le Vi Menu soit momentanement arrété pendant que le Vi Acquisition tourne et qu'il reprenne lorsque le Vi Acquisition a terminé. Je ne sais pas comment faire. faut il mettre priorité haute pour le Vi Acquisition et minimum pour le Vi Menu?
Ci joint les 2 Vi (épurés pour la comprehension)
Attachments:
Vi.zip ‏10 KB

Bonjour,
LabVIEW exécute ses diagrammes suivant le principe du flux de données. Ceci signifie qu'un noeud du diagramme (fonction, structure, sousVI) ne fournit ses sorties que lorsque toutes les entrées du noeud sont fournies et que si le code relatif au noeud a finit de s'exécuter. Lorsque un sous-VI est appelé par un VI principal, le flux de données "rentre" au niveau du sous-VI. Seul le sousVI est exécuté, le VI appelant est en sommeil jusqu'à ce que le noeud (le VI appelé) ait finit son exécution. Le flux de données reprend au niveau du VI appelant une fois le noeud exécuté.
En checkant ton VI, il n'y a pas de code qui s'exécute en parallèle avec le sous-VI (la boucle While est bloquée tant que le sous-VI n'a pas finit son exécution). Si il y avait une seconde boucle While en parallèle avec la première, LabVIEW exécuterait les 2 boucles dans 2 threads différents et partagerait le temps processeur entre les 2 boucles afin de switcher d'un thread à un autre et de donner une apparence d'exécution en parallèle.
Dans ton VI, ce n'est pas le cas, une fois le sous-VI appelé, le VI principal est bloqué et ne fait plus rien tant que le sous-VI n'a pas terminé son exécution. Le sous-VI est appelé de manière synchrone. On peut dans LabVIEW appeler un sous-VI sans bloquer le VI appelant avec la technologie VI Server (appel asynchrone)...mais ceci est un autre sujet.
Cordialement.
Matthieu G.
National Instruments
Message Edité par Kerouac le 07-07-2005 10:49 AM

Similar Messages

  • Report sometimes prompts for database logon prior to execution

    I have installed the Crystal Reports Integration Addon on our system and it works correclty for users on our terminal services server.  But when I installed it on a user's PC running Windows XP, when I go to execute an existing report, the Runtime viewer launches, and then displays a Database logon panel with the Server field filled in, the database field is blank, and the SA user and password fields are populated, and I get an error that says logon failed.  I type in the SA user id and password, but get the same error.
    If the same user logs onto the TS server, the runtime viewer launches correctly and the report prompts for input, then displays the appropriate data (no database logon is requested). But if it runs at that user's workstation, the viewer launches, and then prompts for database logon.
    We are running SAP 2007A SP00 PL47, CR Basic 2008 for SAP Business One, and the runtime viewer is Crystal Reports 2008 Runtime SP1. version 2.0.0.7

    Hi Bruce,
    I am not sure what the problem is.
    The only workaround I can think of is to change the Integrated Security in the report to true. This means that you will be using Windows Authentication as opposed SQL Authentication. This will not prompt for SQL username and password.
    Usually this is NOT an ideal process as you will have to Add each and every Windows user in the SQL Database you are trying to access. For example, you have to add DOMAIN_NAME\User_Name under the Database Properties.
    I am not sure what the minimum security you need to run the report. You will try a few different options and see what works best for you. Avoid permissions that would give users ability to write to the SQL database.
    Again, I know this is not ideal. But I am not sure what else can be done here.
    Krishnan

  • Client/server program validation - is it possible?

    I've been mulling over this problem for a few days, and am starting to wonder if it's theoretically possible to find a solution. I'm not looking for specific code, this probably won't even be implemented in Java, I'm just wondering if there is a theoretical program model that would work in this situation.
    The short version:
    Validate the data generated by a client program, without knowing the original data.
    The long version:
    This is a "profiling" system for a MMOG (Massively Multiplayer Online Game). The MMOG is an internet based client/server graphical program where each client connects to the server and they interact with each other and the virtual world. They pay a monthly fee for access to the game. My program is not affiliated with the MMOG or its makers. I have no connections inside the company and cannot expect any cooperation from them.
    The "profiling" system is also a client/server model. The client program runs in the background while the MMOG client is active. It accesses the memory of the MMOG client to retrieve information about the player's character. Then, possibly on request or maybe immediately, it sends the character data to our server.
    What I want to validate is that the character data being sent is unmodified and actually comes from the MMOG program.
    I can reasonably expect that with mild encryption and some sort of checksum or digest, the vast majority of problems can be avoided. However, I am not sure it's possible to completely secure the system.
    I assume that the user has access to and knowledge of the profiler client and the MMOG client, their assembly code, and the ability to modify them or create new programs, leveraging that knowledge. I also assume that the user does not have access to or knowledge of either of the server applications - the MMOG server or mine.
    In a worst-case scenario, there are several ways they could circumvent any security I have yet been able to think of. For instance, they could set up a fake MMOG client that had the data they wanted in memory, and let the profiler access that instead of the real thing. Or, they could rewrite the profiler to use the data they wanted and still encrypt it using whatever format I had specified.
    I have been considering using some kind of buffer overflow vulnerability or remote execution technique that would allow me to run specific parts of the client program on command, or get information by request, something that could not be anticipated prior to execution and thus could not be faked. But this seems not only insecure for the client but also not quite solid enough, depending on how it was implemented.
    Perhaps a series of apparently random validation codes, where the client does not know which one actually is doing the validation, so it must honor them all. Again, this is very conceptual and I'm sure that I'm not explaining them very well. I'm open to ideas.
    If I don't come up with anything better, I would consider relying on human error and the fact that the user will not know, at first, the relevance of some of the data being passed between client and server. In this case, I would include some kind of "security handshake" that looks like garbage to the client but actually is validated on the server end. A modified program or data file would result in an invalid handshake, alerting the server (and me) that this client was a potential problem. The client would have no idea anything had gone wrong, because they would not know what data the server was expecting to receive.
    I hope I have not confused anyone too much. I know I've confused myself....

    Yes, that is the general model for all MMOGs these days - no data that can actually affect the game is safe if loaded from the client's computer. All character and world data is sent from server to client and stored in memory. Any information that is saved to the client's computer is for reference only and not used by the game engine to determine the results of actions/events etc.
    My program accesses the MMOG client's memory while the game is running, and takes the character information from there. It does not have direct access to the MMOG server, and does not attempt to modify the data or the memory. Instead, it just encrypts it and sends it to our server, where the information is loaded into a database.
    The security issue comes into play because our database is used for ranking purposes, and if someone were to hack my program, they could send invalid data to our servers and affect the rankings unfairly.
    I'm just trying to think of a way to prevent that from happening.

  • Issue found with Oracle 11.2.0.2 left outter joins.

    When performing a left outter join, that returns no data - we are seeing an issue with 11.2.0.2 where it does not return any rows at all - where it should in fact return one row with null data. We have thoroughly tested this against 11.2.0.1 as well as 10g and found no issues, but for some reason 11.2.0.2 does not perform as expected.
    The following queries demonstrate what we're experiencing, and the subsequent DDL / DML will expose this issue on a 11.2.0.2 oracle DB.
    -- QUERIES --
    --Query that exposes the LOJ issue (should return one row with 4 null columns)
    -- RETURNS: NO ROWS ARE RETURNED
    SELECT lt.*
    FROM Attr attr
    JOIN Obj obj ON attr.id = obj.id
    LEFT OUTER JOIN Loc_Txt lt ON attr.id = lt.objectid AND lt.typeid = 851 AND 1 = 2
    WHERE attr.id = 225;
    --PLEASE NOTE, the 'AND 1 = 2' is necessary for our particular use case.  While this doesn't make much logical sense here, it is necessary to expose this issue.
    --Query - shows the expected behavior by simply adding a column that is not null.
    --RETURNS: ONE ROW RETURNED with first 4 columns null, and '225' for obj.id.
    SELECT lt.*, obj.id
    FROM Attr attr
    JOIN Obj obj ON attr.id = obj.id
    LEFT OUTER JOIN Loc_Txt lt ON attr.id = lt.objectid AND lt.typeid = 851 AND 1 = 2
    WHERE attr.id = 225;
    --Query - shows that the expected behavior also resumes by swapping the LoJ against obj.id instead of attr.id.  Since these tables are joined together by id, this should be ARBITRARY!
    -- RETURNS: ONE ROW RETURNED with first 4 columns null, and '225' for obj.id
    SELECT lt.*
    FROM Attr attr
    JOIN Obj obj ON attr.id = obj.id
    LEFT OUTER JOIN Loc_Txt lt ON obj.id = lt.objectid AND lt.typeid = 851 AND 1 = 2
    WHERE attr.id = 225;
    -- DDL --
    -- OBJ TABLE --
    CREATE TABLE "TESTDB"."OBJ"
         "ID" NUMBER(10,0) NOT NULL ENABLE
         ,"TYPEID" NUMBER(10,0) NOT NULL ENABLE
         ,CONSTRAINT "OBJ_PK" PRIMARY KEY ("ID") RELY ENABLE
    commit;
    -- LOC_TXT TABLE --
    CREATE TABLE "TESTDB"."LOC_TXT"
         "ID" NUMBER(10,0) NOT NULL ENABLE,
         "OBJECTID" NUMBER(10,0) NOT NULL ENABLE,
    "TYPEID" NUMBER(10,0) NOT NULL ENABLE,
         "VALUE" NVARCHAR2(400) NOT NULL ENABLE,
         CONSTRAINT "LOC_TXT_PK" PRIMARY KEY ("ID") RELY ENABLE,
         CONSTRAINT "LOC_TXT1_FK" FOREIGN KEY ("OBJECTID") REFERENCES "TESTDB"."OBJ" ("ID") RELY ENABLE
    commit;
    -- ATTR TABLE --
    CREATE TABLE "TESTDB"."ATTR"
         "ID" NUMBER(10,0) NOT NULL ENABLE,
         "ATTRIBUTEVALUE" NVARCHAR2(255),
         CONSTRAINT "ATTR_PK" PRIMARY KEY ("ID") RELY ENABLE,
         CONSTRAINT "ATTR_FK" FOREIGN KEY ("ID") REFERENCES "TESTDB"."OBJ" ("ID") RELY ENABLE
    commit;
    -- DATA --
    insert into obj (id, typeid) values(225, 174);
    insert into attr (id, attributevalue) values(225, 'abc');
    insert into obj (id, typeid) values(2274, 846);
    insert into loc_txt(id, objectid, typeid, value) values(540, 2274, 851, 'Core Type');
    commit;
    -- DROP TABLES --
    --DROP TABLE "TESTDB"."ATTR";
    --DROP TABLE "TESTDB"."LOC_TXT";
    --DROP TABLE "TESTDB"."OBJ";
    --commit;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Whilst I agree that your test cases do show some anomalies, the statement logic does smell a little odd.
    In general, I'd be wary of trying to reproduce issues using hardcoded conditions such as "AND 1=2".
    As this predicate can be evaluated at parse time, you can get plans which are not representative of run time issues.
    However....
    The trouble with ANSI - trouble as in it seems to have a lot of bugs/issues - is that it is always transformed to orthodox Oracle syntax prior to execution - you can see this in a 10053 trace file. This is possibly not helped by the distinction ANSI has between join predicates and filter predicates - something that Oracle syntax does not really have without rewriting the SQL significantly.
    For more information on a similar sounding ANSI problem, see http://jonathanlewis.wordpress.com/2011/08/03/trouble-shooting-4/
    Yours might not even be ANSI related.
    If you check the execution plan - particularly the predicates section, then you can see some of the issues/symptoms.
    See the "NULL IS NOT NULL" FILTER operation at Id 1.
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE    11.2.0.2.0      Production
    TNS for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    SQL> SELECT lt.*
      2  FROM Attr attr
      3  JOIN Obj obj ON attr.id = obj.id
      4  LEFT OUTER JOIN Loc_Txt lt ON attr.id = lt.objectid AND lt.typeid = 851 AND 1 = 2
      5  WHERE attr.id = 225;
    no rows selected
    SQL> explain plan for
      2  SELECT lt.*
      3  FROM Attr attr
      4  JOIN Obj obj ON attr.id = obj.id
      5  LEFT OUTER JOIN Loc_Txt lt ON attr.id = lt.objectid AND lt.typeid = 851 AND 1 = 2
      6  WHERE attr.id = 225;
    Explained.
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 1392151118
    | Id  | Operation            | Name    | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT     |         |     1 |   454 |     0   (0)|          |
    |*  1 |  FILTER              |         |       |       |            |          |
    |   2 |   NESTED LOOPS OUTER |         |     1 |   454 |     4   (0)| 00:00:01 |
    |*  3 |    INDEX UNIQUE SCAN | ATTR_PK |     1 |    13 |     1   (0)| 00:00:01 |
    |   4 |    VIEW              |         |     1 |   441 |     3   (0)| 00:00:01 |
    |*  5 |     TABLE ACCESS FULL| LOC_TXT |     1 |   441 |     3   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter(NULL IS NOT NULL)
       3 - access("ATTR"."ID"=225)
       5 - filter("ATTR"."ID"="LT"."OBJECTID" AND "LT"."TYPEID"=851)
    Note
       - dynamic sampling used for this statement (level=4)
    23 rows selected.
    SQL> Whereas in the next example, the FILTER operation has moved further down.
    SQL> SELECT lt.*, obj.id
      2  FROM Attr attr
      3  JOIN Obj obj ON attr.id = obj.id
      4  LEFT OUTER JOIN Loc_Txt lt ON attr.id = lt.objectid AND lt.typeid = 851 AND 1 = 2
      5  WHERE attr.id = 225;
            ID   OBJECTID     TYPEID
    VALUE
            ID
           225
    1 row selected.
    SQL> explain plan for
      2  SELECT lt.*, obj.id
      3  FROM Attr attr
      4  JOIN Obj obj ON attr.id = obj.id
      5  LEFT OUTER JOIN Loc_Txt lt ON attr.id = lt.objectid AND lt.typeid = 851 AND 1 = 2
      6  WHERE attr.id = 225;
    Explained.
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 2816285829
    | Id  | Operation            | Name    | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT     |         |     1 |   454 |     1   (0)| 00:00:01 |
    |   1 |  NESTED LOOPS OUTER  |         |     1 |   454 |     1   (0)| 00:00:01 |
    |*  2 |   INDEX UNIQUE SCAN  | ATTR_PK |     1 |    13 |     1   (0)| 00:00:01 |
    |   3 |   VIEW               |         |     1 |   441 |            |          |
    |*  4 |    FILTER            |         |       |       |            |          |
    |*  5 |     TABLE ACCESS FULL| LOC_TXT |     1 |   441 |     3   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - access("ATTR"."ID"=225)
       4 - filter(NULL IS NOT NULL)
       5 - filter("ATTR"."ID"="LT"."OBJECTID" AND "LT"."TYPEID"=851)
    Note
       - dynamic sampling used for this statement (level=4)
    23 rows selected.
    SQL> However, you might have also noticed that OBJ is not referenced at all in the execution plans - this may indicate where the issue lies, maybe in conjunction with ANSI or it may be nothing to do with ANSI.
    The foreign key constraint means that any reference to OBJ can be rewritten and eliminated.
    So, if we remove the foreign key constraint, we get the expected one row with all null values returned:
    SQL> alter table attr drop constraint attr_fk;
    Table altered.
    SQL> SELECT lt.*
      2  FROM Attr attr
      3  JOIN Obj obj ON attr.id = obj.id
      4  LEFT OUTER JOIN Loc_Txt lt ON attr.id = lt.objectid AND lt.typeid = 851 AND 1 = 2
      5  WHERE attr.id = 225;
            ID   OBJECTID     TYPEID
    VALUE
    1 row selected.
    SQL> explain plan for
      2  SELECT lt.*
      3  FROM Attr attr
      4  JOIN Obj obj ON attr.id = obj.id
      5  LEFT OUTER JOIN Loc_Txt lt ON attr.id = lt.objectid AND lt.typeid = 851 AND 1 = 2
      6  WHERE attr.id = 225;
    Explained.
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 1136995246
    | Id  | Operation            | Name    | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT     |         |     1 |   467 |     1   (0)| 00:00:01 |
    |   1 |  NESTED LOOPS OUTER  |         |     1 |   467 |     1   (0)| 00:00:01 |
    |   2 |   NESTED LOOPS       |         |     1 |    26 |     1   (0)| 00:00:01 |
    |*  3 |    INDEX UNIQUE SCAN | OBJ_PK  |     1 |    13 |     1   (0)| 00:00:01 |
    |*  4 |    INDEX UNIQUE SCAN | ATTR_PK |     1 |    13 |     0   (0)| 00:00:01 |
    |   5 |   VIEW               |         |     1 |   441 |            |          |
    |*  6 |    FILTER            |         |       |       |            |          |
    |*  7 |     TABLE ACCESS FULL| LOC_TXT |     1 |   441 |     3   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       3 - access("OBJ"."ID"=225)
       4 - access("ATTR"."ID"=225)
       6 - filter(NULL IS NOT NULL)
       7 - filter("ATTR"."ID"="LT"."OBJECTID" AND "LT"."TYPEID"=851)
    Note
       - dynamic sampling used for this statement (level=4)
    26 rows selected.Note also that with the constraint in place, I did not get a row returned regardless of whether the outer join was to attr.id or obj.id
    Edited by: Dom Brooks on Aug 15, 2011 11:41 AM

  • IDOC to PDF and XML via EMail: using InputAttachment interface in mapping

    Hello Together,
    I am working on the following scenario:
    IDOC --> Transformation Nr. 1 IDOC-XML; Transformation Nr.2 XML- PDF --> Email with 2 Attachments XML and PDF.
    Till now Iu2019ve managed "IDOC to Email" with XML-Attachment. Therefore I used MailPackage and SwapBean. Unfortunately I didnu2019t see any possibility to send PDF attachment with MailPackage approach.
    Thatu2019s why I decided to change the scenario in this way to avoid using of MailPackage:
    u2022     first step: IDOC to FTP (2 XML files)
    u2022     second step: FTP (1. file = payload + 2. file= attachment) to Email with one XML-attachment
    It works without MailPackage, but I still need the PDF-attachment. In the moment I am trying to read the XML-attachment,  to transform XML2PDF and to add the second attachment to the message inside of mapping . I use InputAttachment and OutputAttachment interfaces.
    http://help.sap.com/javadocs/pi/SP3/xpi/com/sap/aii/mapping/api/InputAttachments.html
    Unfortunately the reading of the XML-attachment with u201CInputAttachementu201D interface inside of mapping doesnu2019t work. Tracing says: "there is no attachment".
    So my questions are:
    1. Is it possible to work with Input- and OutputAttachement interfaces inside of mapping? Or does it work only inside of adapter module?
    2. If it works inside of mapping, how can I test it in design time?
    If you see any other way to solve my problem, let me know please.
    Thank you a lot, regards Anna

    Question Nr. 1:
    "... Mapping programs are executed in the Java part of SAP NetWeaver AS. Consequently, the mapping runtime transfers the message payload from the ABAP part of the SAP NetWeaver Application Server to the Java part before the mapping program is executed. Since mapping programs do not usually access any MIME attachments in a message, the default setting is for the mapping runtime to transfer the payload only and not the attachments. This applies for both attachments that are removed as part of MTOM optimization in the Web services runtime, as well as for attachments that a sender sends together with a payload by using proxy methods in the XI runtime.
    If you want to access an attachment from a mapping program, it must have been transferred from the ABAP part to the Java part prior to execution. You can configure this in the basic settings of the operation mapping in which you reference the mapping program (select the Read Attachments checkbox)..."

  • Help linking oracle 11g and joomla 1.6

    Hello
    I am currently working on a project which uses Joomla 1.6 and MySQL 5.15. We now need to migrate the DB from MySQL to Oracle 11g R2 and I would like some help in finding a driver between Oracle 11g and Joomla 1.6. If anybody has worked with and successfully connected these two could you please help me out.
    Could really do with the help as I need to complete the project soon.
    Thanks
    Bharat
    Edited by: 842910 on Mar 8, 2011 11:10 PM

    Hey there...
    Well.... It sort of all depends on how Joomla is connecting to the database. Are they using a pre-built framework like PDO or Zend ?
    If they are it should be a a relatively easy task to move it to Oracle. If not then you will have to alter their DB layer and replace a lot of the mySQL calls with Oracle calls and add a few. For example MySQL does not parse a statement prior to execution but Oracle does eg:
    $oraDB = oci_connect([parms]);
    $query = oci_parse($OraDB,'select 'a' from dual');
    // If you are binding variables it would go between the parse and execute areas and it is mostly the same as doing
    // it with MySQL
    oci_execute($query);
    $data = oci_fetch_assoc($query);The instant client and the full client do things very differently and connections to the DB server are done differently so you will need to understand those differences and code accordingly.
    The OCI_8 php libraries are well established and documented. They must be installed on the server on which Joomla is running.
    If your machine is setup correctly this is as simple as:
    %pecl install oci8
    pecl will take care of pretty much everything including dealing with 32 -v- 64 bit and all you need do is make an entry in the php extension section letting it know the OCI libraries are installed. If not it is a bit more complicated.
    The software along with the instructions ca be found here: http://pecl.php.net/package/oci8
    You must have either the instant client or the regular Oracle client installed on the server on which Joomla is running.
    http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.htmlhttp://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
    After you accept the license agreement click on "See All" and you will see both the instant client and the full client for the version you require.
    It is extremely un-wise to attempt to run any version of oracle on the machine running joomla / Apache. If you do so, then you stand a better then even chance of failure as Oracle does not like to share resources.
    Make sure you read the install instructions for the oracle client and pay very close attention to things like environment settings and permissions issues on the php server as these are some of the most common problems. Once the client is installed and the oci libraries are installed things should run very smoothly. The whole php to Oracle chain is very fast and the fact that the db server is remote from the web server will not be an issue as long as the links are fast.
    If you have problems get back to us and we will do the best we can to help you sort things out.
    - FG

  • Passing table names as parameters (aka Trouble building a dynamic SQL command)

    I am attempting to develop a template for publishing some data, and would like to pass standard table names as parameters to the various queries.  What I have created generates the following error:
    Msg 137, Level 16, State 1, Procedure spPublishTrans_FlashersCaution, Line 68
    Must declare the scalar variable "@tmpTable".
    I thought I was declaring it properly ?
    Thanks.
    DECLARE @FeatureClass as Nvarchar(MAX) = 'Trans_FlashersCaution'
    DECLARE @ED as Nvarchar(MAX) = 'edgis.dbo.' + @FeatureClass
    DECLARE @tmpTable TABLE
    [OBJECTID] [int] NOT NULL,
    [Id] [int] NULL,
    [Location] [nvarchar](60) NULL,
    [Zone] [nvarchar](5) NULL,
    [Shape] [geometry] NULL
    DECLARE @tmpTableParam AS NVARCHAR (MAX) = @tmpTable
    SELECT @tmpTableParam
    DECLARE @execquery AS NVARCHAR(MAX)
    SET @execquery = 'INSERT INTO' + @tmpTableParam +
    [OBJECTID]
    ,[Id]
    ,[Location]
    ,[Zone]
    ,[Shape]
    SELECT
    [OBJECTID]
    ,[Id]
    ,[Location]
    ,[Zone]
    ,[Shape]
    FROM' + @ED;
    EXECUTE sp_executesql @execquery

    Always PRINT the SQL string prior to execution when developing dynamic SQL script:
    PRINT @execquery
    --EXECUTE sp_executesql @execquery
    Second step, test the printed SQL script for validity.
    Dynamic SQL: http://www.sqlusa.com/bestpractices/dynamicsql/
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • Costs by operation in service order

    Hello All,
    Are there any report to show the costs of an order by operation, for instance, the total costs of an order is 200 EUR but for operation 0010 the cost is only 100 EUR. I want a report that show me only this cost.
    Regards,
    Rogério Reis

    There is no hijacking here whatsoever. The question I asked is the same as the original, I am only looking for a solution different than paying the SAP.
    edit ***
    Function module PM_ORDER_DATA_READ will retrieve RESBD data, which holds costs. Combine with AFVGD data to get operation details. (NOTE: If used within a loop, or serialized in other ways, need to use CALL FUNCTION 'CO_EXT_ORDER_RESET'  prior to execution of the FM)
    *If applicable: The function module IOPOL_OL_DATA_FOR_OPR_GET may come in handy, too.
    *If applicable: View VIQMEL has a lot of useful data.
    Gather the above data, make a few SELECTs from COBK and COEP.
    You can target COBK-REFBN, COEP-OBJNR, COEP-KSTAR, etc, to get values from COEP currency/quantity fields.
    Kind regards,
    SD
    Edited by: Srdjan Danicic on Jun 27.

  • Prompting Users to Refresh iViews in the Portal

    Hello SDN,
    How do I modify properties setting via Property Editor to prompt users to refresh the iViews PRIOR to execution?
    Please advice, thanks for any helps.
    Regards,
    NN

    Hi NN,
    This needs to be decided at the time of creating an iview only. However you can still edit that property by going to that ivew.
    Open that iview.
    Go to properties.
    Enable the Show 'Refresh' Option radio button.
    Secondly you can use the option of Cache Validity Period over there.
    If you are concerned about some webdynpro iview you can simply increase the connection timeout in the corresponding Jco connection.
    Hope this helps!
    Regards
    Atul Shrivastava

  • Dynamically configure multiple numeric limit test measurements

    I seek to dynamically (programatically) configure a multiple numeric limit test such that I may set / increase / change the number of measurements in the step during execution. For example, I'd like to setup the step for 5 measurements:
    M1, M2, M3, M4, M5 with limits 4<=x<=13.
    I'll set the result data to {1,2,3,4,5}.
    I can successfully set:
    MyMultipleNumLimTestStep.ExpectedNumMeas = 5
    MyMultipleNumLimTestStep.NumericArray (Number of elements to 5)
    MyMultipleNumLimTestStep.DataSourceArray (Number of elements to 5)
    MyMultipleNumLimTestStep.Result.Measurement (Numer of elements to 5)
    Following that, I can access the individual measurement property objects (by offset) and set the Name, Limits.Low, Limits.High, etc...
    During execution, I can view the step variables to see the values getting set correctly.
    BUT, in the report, I only see measurement name, status and the measurement value. NOT the units, limits, comparison type.
    Step
    Status
    Measurement
    Units
    Limits
    Low Limit
    High Limit
    Comparison Type
    AmpMatchTest
    Failed
    Measurement:
    M1
    Failed
    1.000
    M2
    Failed
    2.000
    M3
    Failed
    3.000
    M4
    Passed
    4.000
    M5
    Passed
    5.000
    Take note, prior to execution, I have no entries defined in the Limits tab of the step settings for this step. If I were to define, say, two steps and run again:
    Step
    Status
    Measurement
    Units
    Limits
    Low Limit
    High Limit
    Comparison Type
    AmpMatchTest
    Failed
    Measurement:
    M1
    Failed
    1.000
    dB
    4
    13
    GELE(>= <=)
    M2
    Failed
    2.000
    dB
    4
    13
    GELE(>= <=)
    M3
    Failed
    3.000
    M4
    Passed
    4.000
    M5
    Passed
    5.000
    If I define >5 entries, my code will limit the result to 5. Any ideas?
    Thanks,
    Derek

    Hi jigg.
    I also need to configure a multiple numeric limit test programatically. Unfortunately your solution seems not to work (in Teststand 2013). Also with your code I get limits and comparsion entries in the report only for the first measurement. This is the one already existing in the step configuration.
    Step
    Status
    Measurement
    Units
    Limits
    Low Limit
    High Limit
    Comparison Type
    Dynamic Call
    Passed
    Measurement:
    AllParts
    Passed
    1
    1 = Pass
    1
    EQ(==)
    Another Part
    Passed
    1
    Part 20
    Passed
    1
    Part 2
    Passed
    1
    Part 1
    Passed
    1
    If I add a second measurement in the step, this one is shifted (like expected) and shows the limits and comparsion in the report.
    Step
    Status
    Measurement
    Units
    Limits
    Low Limit
    High Limit
    Comparison Type
    Dynamic Call
    Failed
    Measurement:
    AllParts
    Passed
    1
    1 = Pass
    1
    EQ(==)
    Another Part
    Passed
    1
    Part 20
    Passed
    1
    Part 2
    Passed
    1
    Part 1
    Passed
    1
    Measurement 1
    Failed
    0
    1 = Pass
    1
    EQ(==)
    What is special with the preconfigured measurements, compared to the programatically created test? Any help is very appreciated.
    Thanks
    --rainer

  • OCI calls using select *

    Hi,
    I have been able to write OCI programs that select a know select-list following the examples in cdemo81.c and cdemo6.cc, but I've been unable to get an OCI program working that does a select * and then get the data out of the select. More to the point I need to be able to handle sql statements that I know nothing about prior to execution.
    If you could give me a piece of sample code or point me to some that would be great. Please bear in mind that I'm writing a C++ program. If anyone knows how to get the libriaries for the older oparse, oexec stuff to compile in a C++ program that would be just a helpful. I'll be more than happy with either.
    Any help would be appreciated.
    Thanks in advance!
    Bob Brown
    null

    I would investigate using Oracle's Transparent Data Encryption and giving up on re-inventing the wheel. Your wheel will be square and clunky as opposed to Oracle's wheel, but Oracle's wheel is an extra cost option of course. Larry's boat need to be paid somehow.
    Sybrand Bakker
    Senior Oracle DBA

  • Default Logic Optimization

    Hello All,
    I have built a BADI and I am using it in Default logic. I have included scoping statements in my default logic to get all the information for my BADI. If I look at my default log, the total execution of default logic is 3 mins, out of which 165 seconds is in the query read prior to execution of the BADI. BADI executes only for 10 seconds. How can I decrease this query time? I do have employee dimension with 20,000 members. I use
    *XDIM_MEMBERSET EMPLOYEE=<ALL> to get everyone as I am calculating Labor costs at Employee level. Script I have in default logic is:
    *XDIM_MEMBERSET TIME = %YEAR%.INP
    *XDIM_MEMBERSET JOB = <ALL>
    *XDIM_MEMBERSET P_ACCT = FTE,HR_RATE,MNTHLY_PREM_PAY,OT_RATE
    *XDIM_MEMBERSET EMPLOYEE = <ALL>
    *START_BADI LABOR
    QUERY = ON
    WRITE = ON
    *END_BADI
    Any ideas and help is appreciated.
    Thanks!

    Gersh,
    I see drastic performance improvment when I set the QUERY=OFF and read the data in the BADI using UJQ_RUN_RSDRI_QUERY. Is this normal?
    Also, I see that if I run my BADI using START_BADI it executes much faster in UJKT rather than in a BPC package. Any ideas why?
    Also, why is there performance gain when I perform XDIM_MAXMEMBERS on the script scoping? For instance, one of dimension has 20,000 members. When I have the scoping statement for that dimension as *XDIM_MEMBERSET EMPLOYEE=<ALL> it runs for 20 seconds, but when I specify the same statement along with *XDIM_MAXMEMBERS EMPLOYEE=25,000, its down to 8 seconds.
    Thanks.

  • Modify Query at runtime

    Hi everyone,
    I use Forms 6i to connect to a non-Oracle data source.
    Just wondering, can we modify the select query at runtime?
    I read the online help for the pre-select trigger. In the "Usage Notes", it says "Use a Pre-Select trigger to prepare a query prior to execution against a non-ORACLE data source."
    I can get the constructed query :system.last_query here. But I can't modify it at this stage.
    Please Help. Thanks

    Hi,
    I do use pre-query, but I use it to modify either the where or order by clause of the select statement. If that is what you want then you could use the set_block_property
    Example;
    set_block_property('blockname', default_where,'new condition');
    Hope this helps.
    Regards,
    Bob DJ

  • Include rownum in toplink

    When we form the query using Expression in toplink. How we can add rownum as one of the field in the query??

    To use ROWNUM for pagination in 10.1.3.3 you will need to extend the framework. Below is a QueryRedirector that can be used with any read query to translate the firstResult and maxRow configurations into Oracle specific ROWNUM SQL.
    package oracle.toplink.extension.queryframework;
    import oracle.toplink.internal.databaseaccess.DatasourceCall;
    import oracle.toplink.internal.sessions.AbstractSession;
    import oracle.toplink.publicinterface.DatabaseRow;
    import oracle.toplink.queryframework.*;
    import oracle.toplink.sessions.Record;
    import oracle.toplink.sessions.Session;
    * This is an example of how a TopLink QueryRedirector can be used to extend the
    * query framework and provide Oracle specific ROWNUM filtering. The redirector
    * forces the generation of the SQL for the query and wraps it in additional
    * SQL clauses to limit the results being returned.
    * http://www.oracle.com/technology/oramag/oracle/06-sep/o56asktom.html
    * Limitations/Issues:
    * - Code provided as is for 10.1.3.3. The complete feature has been added to
    *   Oracle TopLink 11gR1 and EclipseLink
    * - Does not support limiting the rows on batch reading of relationships
    * @author Doug Clarke
    * @since Oracle TopLink 10.1.3.3
    public class OracleRowNumRedirector implements QueryRedirector {
        public static final String PREFIX =
            "SELECT * FROM ( SELECT a.*, ROWNUM rnum FROM (";
        public static final String MAX_COMPARE = ") a WHERE ROWNUM <= "; // MAX
        public static final String MIN_COMPARE = ")  WHERE rnum  >= "; // FIRST
        public Object invokeQuery(DatabaseQuery query, Record arguments,
                                  Session session) {
            AbstractSession sessionImpl = (AbstractSession)session;
            DatabaseRow argsImpl = (DatabaseRow)arguments;
            // Ensure the query is read and the max value is set
            if (query.isReadQuery() && ((ReadQuery)query).getMaxRows() > 0) {
                query.checkPrepare(sessionImpl, argsImpl);
                SQLCall call = (SQLCall)query.getCall();
                ReadQuery readQuery = (ReadQuery)query;
                boolean usesBinding = call.usesBinding(sessionImpl);
                // Cache the values
                int maxValue = readQuery.getMaxRows();
                int firstValue = readQuery.getFirstResult();
                // Compute the string values for the SQL creation
                String max = usesBinding ? "?" : Integer.toString(maxValue);
                String first = usesBinding ? "?" : Integer.toString(firstValue);
                // Provide the custom SQL and reset the call so the query does not generate its own SQL
                call.setSQLString(PREFIX + call.getSQLString() + MAX_COMPARE +
                                  max + MIN_COMPARE + first);
                query.setCall(call);
                // Clear the previous first & max values to ensure the JDBC limits are
                // not applied
                readQuery.setFirstResult(0);
                readQuery.setMaxRows(0);
                call.setFirstResult(0);
                call.setMaxRows(0);
                // If binding is enabled then add the values to the call's parameters
                if (usesBinding) {
                    call.getParameters().add(maxValue);
                    call.getParameterTypes().add(DatasourceCall.LITERAL);
                    call.getParameters().add(firstValue);
                    call.getParameterTypes().add(DatasourceCall.LITERAL);
            // Continue the execution with the query as is
            return query.execute(sessionImpl, argsImpl);
    }To use it you simply need to configure the redirector on your query prior to execution:
            ReadAllQuery raq = new ReadAllQuery(Employee.class);
            raq.addAscendingOrdering("id");
            raq.setFirstResult(6);
            raq.setMaxRows(10);
            raq.setRedirector(new OracleRowNumRedirector());Doug

  • Differents bt function and subroutine

    hi gem's
    i want 2 know  wether the form return's a value r not......

    hi,
    1)
    Functions should behave like mathematical functions. That is, they should take arguments and compute and return a result without any side effects. They should not perform I/O and they should not change the values of their actual arguments. (Fortran won't stop you from writing a function that causes side effects, but it is poor form nonetheless.)
    Subroutines should take arguments and (since they can't return anything) cause side effects. That is, they should perform I/O or change the values of their actual arguments. This is the only way that a subroutine has of communicating with the outside world.
    2)
    Subroutines
    A subroutine takes a number of input parameters but does not return a value.  The input parameters are passed by-value, which means their values are copied directly onto the stack when the routine is called.  There are no pointers in TEA.  A subroutine may have local variables which must also be stored on the stack.  The number of input parameters and local variables is limited by the amount of free stack space.
    An example subroutine is listed below.  It has two input parameters and one local variable.  The asm block contains VM instructions .
    void foo(int n, char c)
      int var1;
      asm
        (VM code goes here)
    When executing a subroutine, the input parameters go on the stack first in the order in which they are declared.  The call instruction pushes the return address bytes to the stack and branches to the subroutine.  Once inside the subroutine, any local variables are stored on the stack in the order in which they are declared.  Uninitialized local variables are initialized to "-1" by default.  Calling the example routine listed above requires seven stack bytes: three for the input parameters, two for the return address, and two for the local variable.  Prior to execution of the instructions in the asm block, the top seven stack btyes will contain:n (high) n (low) c return addr. (high) return addr. (low) var1 (high) var1 (low)
    If n=0x0320, c=0x14, and the return address is 0x0120, the values in the top seven stack bytes will be:0x03 0x20 0x14 0x01 0x20 0xFF 0xFF
    The TEA compiler creates code that does this parameter passing and local variable allocation automatically.  The user may write code within the asm block that accesses the input parameters and local variables.  After the subroutine completes its task, the VM will pop the local variables off the stack, branch to the return address, and discard the input parameters.  This clean-up process is also automatic.
    Functions
    A function takes a number of input parameters and returns a value.  As with subroutines, the input parameters are passed by-value.  Parameter passing and local variable allocation also works the same way.  Unlike subroutines, functions require a place holder in the stack for the return value.  Furthermore, the compiler requires an explicit return statement for each function.  Because of this, the user must declare a local variable to hold a temporary return value and use the TEA return statement to pass the result.
    An example function is listed below.  It has one input parameter and two local variables.  The asm block contains VM instructions .
    int foo(char c)
      int result;
      int var1=0;
      asm
        (VM code goes here)
      return result;
    When executing a function, the first thing to go on the stack is a place holder for the return value.  Calling the example routine listed above requires nine stack bytes: two for the return value place holder, one for the input parameter, two for the return address, and four for the local variables.  Prior to execution of the instructions in the asm block, the top nine stack btyes will contain:int (high) int (low) c return addr. (high) return addr. (low) result (high) result (low) var1 (high) var1 (low)
    If c=0x24 and the return address is 0x024A, the values in the top nine stack bytes will be:0xFF 0xFF 0x24 0x02 0x4A 0xFF 0xFF 0x00 0x00
    The result variable is unitialized so it is set to "-1" by default.  The return value place holder is also set to "-1" by default.  The var1 variable is initialized to "0".  The code in the asm block must write its output to the result variable for the function to work properly.  At function completion, the return statement writes the return value into the place holder.  Then the VM will pop the local variables off the stack, branch to the return address, and discard the input parameters.  The return value will be on top of the stack.

Maybe you are looking for

  • I want to create a command button for my Numbers spreadsheet.

    I am creating a Numbers spreadsheet and need to have a command button. It is really simple in Excel so I assume Numbers would be too. Please advise. Thanks, Hank

  • Details of getting a director app to my iphone

    I have registred with Apple and paid the $99 as a developer.  In the x-code software, in the Organizer - Devices part, I see an IOS Team Provisioning profile in the window when, on the left, I click on Provisioning Profiles under my iPhone heading. 

  • Three questions: how to turn green letters and why is text now just crossed out

    Why is my text green and not black as set the text color to be? I have the new Maverick and every thing seems different. The text is coming out green and not black, I delete a word and all it does is cross it out, and how do I change words like cafe

  • Itunes mini player in keynote

    After searching through the forums I haven't really stumbled upon an answer to this... Is there a way to see the itunes mini player in your keynote presentation screen? I have my macbook set up to a projector and I need to play music throughout the p

  • Ipod in a car

    Hi all. Recently got a car with an aux input (3.5mm jack) ideal for ipods and other mp3 players. Mine's an ipod 80gb classic. I've always assumed that better sound quality comes from the "dock connector" rather than the headphone output. Looked aroun