Trying to write to a HashMap from C++

I've no idea if this is possible, never mind sensible, but what I want to do is pass the C++ method a HashMap, on which it calls the put(key, value) method thereby adding data to it.
My code looks a bit like this:
JNIEXPORT jboolean JNICALL Java_...snip...(JNIEnv *env, jobject obj, jobject hashmap)
     jclass cls = env->GetObjectClass(hashmap);
jmethodID mid = env->GetMethodID(cls, "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;");
     if (mid==0) //doesn't happen
          return false;
     env->CallObjectMethod(hashmap, mid, "somekey", "somevalue"); //cause of problem
     return true;
The jobject hashmap parameter sent to it is, naturally, a HashMap. When I run this code, or my alternative attempts with it, I encounter various problems, the main being that I'm given a NullPointerException presumably on the callback to the 'put' method.
I wondered if this is because I should really be sending a java.lang.Object to it rather than my strings, but I'm neither convinced nor do I have any idea how. Any suggestions to work directly on the HashMap, i.e. without adding my own indirect 'put' method within the calling Java class?

The hashmap wants object parameters, not C strings.
You have to create the String - jstring - objects.

Similar Messages

  • "Check that you have permission to write to the library directory." I had this error pop up when trying to access a iPhoto Library from Finder.

    The error, "Check that you have permission to write to the library directory." Displayed after trying to access a iPhoto Library from finder. The file is located on the local hard drive and was accessed not 5 minutes before the error displayed. Upon searching the forums I found a similar problem and the instructions said to check a permission box in the "Get Info" tab. There was no box visible and after clicking the arrow to open the "Open With" tab, the rainbow wheel started to spin and I could no longer access Finder or the desktop. I was deleting files trying to make space on my hard drive and noticed as I was deleting files more data was being added to the iPhoto Library. My question is how can I fix this and how can I prevent this in the future, thank you very much for any help, I would really like to keep these pictures.

    I found a similar problem and the instructions said to check a permission box in the "Get Info" tab.
    This applies only when the Library is on an external drive. You cannot ignore permissions on the system drive.
    I was deleting files trying to make space on my hard drive
    What were you deleting?
    and noticed as I was deleting files more data was being added to the iPhoto Library.
    Hard to see how deleting files can add data to the iPhoto Library. Can you explain why you thought this?
    I would really like to keep these pictures.
    Make a back up now.
    Most Simple Back Up:
    Drag the iPhoto Library from your Pictures Folder to another Disk. This will make a copy on that disk.
    Slightly more complex: Use an app that will do incremental back ups. This is a very good way to work. The first time you run the back up the app will make a complete copy of the Library. Thereafter it will update the back up with the changes you have made. That makes subsequent back ups much faster. Many of these apps also have scheduling capabilities: So set it up and it will do the back up automatically.
    Example of such apps: Chronosync - but there are many others. Search on MacUpdate or the App Store

  • Hi i am trying to write a program which reads from a properties file the pr

    hi,
    this is ayesha.
    I am trying to write a program wherein i will be reading the value of a property from a properties file which will be true initially. I want to loop in there till the time when the value of the property is false.
    The code is as follows:
    public static void main(String[] args) {
              ReadingAPropertiesFile propers=new ReadingAPropertiesFile();
              propers.ReadingFileRegularly("F:\\ayesha.properties");
    public String ReadingFileRegularly(String FilePath){
              Properties props = new Properties();
              String message;
              String filePath=FilePath;
              try {
    props.load(new FileInputStream(filePath));
    message = props.getProperty("ayesha");
         boolean theValue = Boolean.parseBoolean(message);
         while(theValue){
              System.out.println("trueeeeeeeeeeeeeeeeeeeeeee");
              Thread.sleep(60000);
              ReadingFileRegularly(filePath);
              catch(Exception ex){
                   ex.printStackTrace();
              String messagean="something";
              return messagean;
    The contents of ayesha.properties are :
    ayesha=true
    After 5 minutes it will be set to false so i want to loop in there till the value of ayesha=false at which time i will return
    But i dont know how to loop in there for that time:
    while(theValue) ?????????????/ what after this???????????
    Any suggestons are awaited.

    ayeshaparween wrote:
    hi,
    this is ayesha.
    I am trying to write a program wherein i will be reading the value of a property from a properties file which will be true initially. I want to loop in there till the time when the value of the property is false.
    The code is as follows:
    public static void main(String[] args) {
              ReadingAPropertiesFile propers=new ReadingAPropertiesFile();
              propers.ReadingFileRegularly("F:\\ayesha.properties");
    public String ReadingFileRegularly(String FilePath){
              Properties props = new Properties();
              String message;
              String filePath=FilePath;
              try {
    props.load(new FileInputStream(filePath));
    message = props.getProperty("ayesha");
         boolean theValue = Boolean.parseBoolean(message);
         while(theValue){
              System.out.println("trueeeeeeeeeeeeeeeeeeeeeee");
              Thread.sleep(60000);
              ReadingFileRegularly(filePath);//recursive call this is a bad idea might result in stack overflow error
              catch(Exception ex){
                   ex.printStackTrace();
              String messagean="something";
              return messagean;
    The contents of ayesha.properties are :
    ayesha=true
    After 5 minutes it will be set to false so i want to loop in there till the value of ayesha=false at which time i will return
    But i dont know how to loop in there for that time:
    while(theValue) ?????????????/ what after this???????????
    Any suggestons are awaited.I think you better rethink your design , do not use recursion, I would normally use a loop like you did but without loading the content of the file each time, I would use File.l lastModified() method and compare with previous results from this method to see if the file was modified. Then if it was modified then load the new File and check if the property value has changed.

  • A client is trying to write pdfs to a remote server from Central

    A client is trying to write pdfs to a remote server from Central, they can send a dat files from the remote server to Central and they can copy files from the Central Server in Windows Explorer and from a Command prompt, the folder is set to users everyone, read, write, etc. Central gives the cannot find output device in log. Central is installed with a local user ID and local host. Any ideas I am not finding anything on this on devnet forums I am going to check JetForm Alumni next. Thanks. I think it has something to do with the Central account and password but I don't know what to do.

    It sounds like the account used to run Central does not have rights to access that remote server/directory.
    Try changing the Central user account to use a more privileged account - normally a network account would be used to allow access to all resources across the enterprise - printers and file shares.

  • My word gives a message of "The disk is full trying to write to Macintosh HD. Free some space...." what do I do to stop the message from popping up all the time?

    My word gives a message of "The disk is full trying to write to Macintosh HD. Free some space on this drive, or save the document on another disk."
    what do I do to stop the message from popping up all the time? I have only had my mac for 7 months and haven't saved a ton of stuff.

    Kathryn,
    Is MS Word the only app that is causing this issue, if so then it's probably a problem with Word. If I'm correct about it only occuring with Word then please re-post to:
    http://www.officeformac.com/productforums/
    When you do please let them know the version of Office installed on your computer, it will be either Office 2004, 2008 or 2011!

  • Trying to write a Listener on a CheckBox to change the Model of a ComboBox

    I am trying to change the list that appears in a ComboBox dynamically based on if a CheckBox is selected or not. I have multiple CheckBoxes and ComboBoxes being created in a loop based on a variable assigned at creation. Every tutorial i have seen writes out a listener that explicitly defines the checkbox instance but in my case i don't acctually know. My checkboxes are in an array of checkboxes as are the comboboxes as they are being created at runtime. Any help would be much apreciated this issue has been with me for two days now.

    here is a snippit of my code in how i was implementing this:
    int numButton = 17; //this is for testing only, this variable is set from another class normally
    // these variables are defined private elsewhere in the class
    JCheckBox PlayerByeCheck[] = new JCheckBox[numButton + 1];
    JCheckBox PlayerHomeCheck[] = new JCheckBox[numButton + 1];
    boolean PlayerOnBye[] = new boolean[numButton + 1];
    for (int i = 1; i <= numButton; i++) {
             PlayerByeCheck[i] = new JCheckBox();
         PlayerHomeCheck[i] = new JCheckBox();
         PlayerOnBye[i] = false;
    // more code here for building the gui it is not important for this problem
    // code to build the list starts here
    for (int i = 1; i <= numButton; i++) {
         ((TableLayout)PlayerRosterPanel.getLayout()).insertRow(1, TableLayout.PREFERRED);
             PlayerByeCheck.setOpaque(false);
         PlayerByeCheck[i].addItemListener(this);
         PlayerByeCheck[i].setName("PlayerByeCheck" + i);
         PlayerRosterPanel.add(PlayerByeCheck[i], new TableLayoutConstraints(2, 1, 2, 1, TableLayoutConstraints.CENTER, TableLayoutConstraints.FULL));
    //the comboox that i want to change
    //---- PlayerTeamSelect1 ----
         if (PlayerOnBye[i] = true) {
              PlayerTeamSelect[i].setModel(new DefaultComboBoxModel(new String[] {
                   "ARI",
                   "ATL",
                   "BAL",
              "BUF",
         "BYE"
              PlayerTeamSelect[i].setSelectedItem("BYE");
         } else {
              PlayerTeamSelect[i].setModel(new DefaultComboBoxModel(new String[] {
                   "ARI",
                   "ATL",
                   "BAL",
                   "BUF",
                   "CAR",
              "BYE"
         PlayerTeamSelect[i].setOpaque(false);
         PlayerRosterPanel.add(PlayerTeamSelect[i], new TableLayoutConstraints(4, 1, 4, 1, TableLayoutConstraints.FULL, TableLayoutConstraints.FULL));
    //more gui code here method gets closed
    //Item Action Listener starts here this is where i am having the problem                         
    public void itemStateChanged(ItemEvent e) {
         Object source = e.getItem();
         if (source == PlayerByeCheck[1])
         int select = e.getStateChange();
              if (select == ItemEvent.SELECTED)
              PlayerOnBye[1] = true;
    PlayerRosterPanel.repaint();
    //repaint the window i think can't get the listener to work to see if this is the right way to do this
    //i doubt it is
    I have tried several different ways to write the listener, the example in the code above is following the java swing tutorial by explicitly defining the checkbox. I have tried to write the listener as i am creating the checkbox, which doesn't seem to work or i am wrting it wrong, which is entirely possible. Once the listener sets the value i think it should repaint the screen but i am sure that that is wrong right now as well. As my hunch is the repaint will reset the checkbox to DESELCTED the default value. I will come to that issue once i figure out how to get the listener working. Ideally i want to be able to set the listener for the checkboxes regardless as to how many there are. As stated above i am generating a list of checkboxes, comboboxes and other fields based on a variable that is defined in one of my objects. If the user selects checkbox 3 than combobox 3 should be changed, and the others should not. if the user selects all the checkboxes than all the comboboxes change.
    thanks for any help. Still plugging along on it trying to figure this one out.

  • Write data to SharePoint from embeded Flex swf

    I am trying to integrate Flex 3 applications into SharePoint 2007 environment which would allow our users to read/write/delete data from SharePoint using an embeded Flex app inside SharePoint. While the article from matthew.meier on "Adding Event Driven Flex Components to Microsoft Sharepoint 2007" is great and another article by Serge van den Oever on "Use Flex to retrieve data from a SharePoint list" is fantastic, they neither touch the topics of writing or inserting data into SharePoint. My goal is to create a two-way communication between Flex and SharePoint to dynamically pull (read) data into Flex  from SharePoint lists, etc via GUID or other method AND to also write or update SharePoint from a front-end Flex inside SharePoint.

    I have been working on a solution which appears like it would work, but I am getting errors. The source code and examples are found on Code Project http://www.codeproject.com/KB/aspnet/FlexASPWebService.aspx?msg=3270246#xx3270246xx This Flex/ASP example uses a web service to communicate to a SQL database. Flex makes a web service call to the .asmx file via WSDL and the magic happens. I am running into a roadblock as I receive an error that the app cannot find the WSDL. I have tried to run the same WSDL URL in a browser and I get an server application error.
    I also tried a solution found at http://shardulbartwal.wordpress.com/2008/03/20/import-web-servicewsdl-wizard-in-flex-30/ to load the WSDL file directly into Flex, but I ran into another roadblock. When I get to this step below Flex gives an error that it cannot find the WSDL file either…
    Here is the WebService call from Flex…
    The files from Code Project contain a directory structure as such:
    TestWebService\Service.asmx
    TestWebService\Web.config
    TestWebService\App_Code
    TestWebService\App_Code\Service.cs
    TestWebService\App_Data
    The Service.cs file is inside the App_Code directory and is referenced from the Service.asmx file with this code:
    My Flex file calls the Service.asmx?WSDL which then calls the file Service.cs and then it breaks.
    The Code for the Flex file is as follows…
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
    <mx:Script>
          <![CDATA[
                import mx.controls.Alert;
                import mx.rpc.events.FaultEvent;
                import mx.rpc.events.ResultEvent;
                private function init():void {
                      // Get Data from WebService and fill datagrid when you fist invoke the application
                      ws.GetEmployees(); 
                private function GetEmployees(event:ResultEvent):void {
                      // Databind data from webservice to datagrid
                      datagrid.dataProvider = event.result;
                private function SaveEmployee(event:ResultEvent):void {
                      // To Refresh DataGrid;
                      ws.GetEmployees();
                      Alert.show("Saved Successfully");
                private function AddRecord(event:MouseEvent):void {
                      // Save a record using a WebService method
                      ws.SaveEmployee(txtEmpId.text, txtEmpName.text, txtEmpEmail.text); //
                private function fault(event:FaultEvent):void {
                      // Oppps some error occured
                      Alert.show(event.toString());
          ]]>
    </mx:Script>
    <!-- WebService definition -->
    <mx:WebService id="ws" wsdl="http://localhost/TestWebService/Service.asmx?WSDL" fault="fault(event)">
          <mx:operation
                name="GetEmployees"
                resultFormat="object"
                result="GetEmployees(event)"
                 />
          <mx:operation
                name="SaveEmployee"
                resultFormat="object"
                result="SaveEmployee(event)"
                 />
    </mx:WebService>
          <mx:Panel x="41.5" y="66" width="714.5" height="237" layout="absolute" title="ASP.NET WebService + Flex Demonstration">
                <mx:HBox height="95%" width="95%" horizontalCenter="0" verticalCenter="0">
                      <mx:DataGrid id="datagrid" width="465" height="100%">
                            <mx:columns>
                                  <mx:DataGridColumn headerText="Emp Id" dataField="EmpId"/>
                                  <mx:DataGridColumn headerText="Emp Name" dataField="EmpName"/>
                                  <mx:DataGridColumn headerText="Emp Email" dataField="EmpEmail"/>
                            </mx:columns>
                      </mx:DataGrid>
                      <mx:Form x="608" y="74" width="100%" height="100%" borderStyle="solid">
                            <mx:FormItem label="EmpId">
                                  <mx:TextInput width="106" id="txtEmpId"/>
                            </mx:FormItem>
                            <mx:FormItem label="EmpName">
                                  <mx:TextInput width="106" id="txtEmpName"/>
                            </mx:FormItem>
                            <mx:FormItem label="EmpEmail">
                                  <mx:TextInput width="106" id="txtEmpEmail"/>
                            </mx:FormItem>
                            <mx:FormItem width="156" horizontalAlign="right">
                                  <mx:Button label="Add" id="btnAdd" click="AddRecord(event)"/>
                            </mx:FormItem>
                      </mx:Form>
                </mx:HBox>
          </mx:Panel>
    </mx:Application>
    The Flex app error states it cannot locate the WSDL. Any ideas?
    I don’t know what I am doing wrong…

  • Trying to load a javascript link from text file into a dynamic textfile

    Can anyone help me with this problem? Im trying to load in a
    newsfeed from freshcontent.net into my text field. If i put this
    javascript link on an html page, the page shows correctly, which is
    im supposed to get 3 dynamic links with news content headlines.
    Please view the link to see what i mean:
    http://www.freshcontent.net/directory/real-estate/real_estate.html
    Now, i cannot get this same type of display behavior in my
    text field if i just paste into my text file the javascript link
    thats supposed to bring up the 3 headlines. It is my understanding,
    that flash cannot do this without some sort of specific
    actionscripting, that involves asfusion, and/or externalInterface.
    Im not sure exactly how to go about setting this up to make this
    work. My current code looks like this:
    If anybody could tell me where im going wrong and what i
    should change in order to get the desired result im going for, Id
    very much appreciate it. Thanks

    well sorry there fanmap - but I don't think you're going to
    be able to get this to work. here's why: the link points to a php
    file - which gathers dynamic info from a DB - the return from the
    php is generating a string that is based on the DOM and
    'constructs' a javascript method that in turn writes to the html
    document. although we can embed html into a textField in Flash
    there are a limited number of supported html tags - and JS methods
    will not operate internally. in addition, (i'm not certain someone
    correct this if i'm off) there's no way to 'change' the output of
    the php call, therefore you will not be able to read the return
    because it is designed to use the DOM and write solely to the
    current document. Even if you were to access the JS method from the
    swf file (which one can) it will still only write the content of
    the php return to the html document - and the output is not
    compatible with the textField class.

  • Write to the database from a BI Publisher report

    I have a requirement to setup a BI Publisher report that writes a snapshot of data to a database table whenever the report is run.
    Putting aside whether doing this is a good idea or not (I'd prefer not to do it for security reasons) if I were to do it in SQL server (that i'm more familiar with) I'd write a stored procedure that does this and enter "exec storedprocedurename" as the report query.
    From searching through this board I see that I'm supposed to use a pipelined function instead of a stored procedure but I'm unclear if once I have setup the pipelined function that I'll be able to achieve my objective of both returning the data to the report as well as writing it to a snapshot table, is this possible? If so then I have some questions as I don't really understand the syntax with my limited pl/sql knowledge.
    create type numset_t as table of number; --where does this go, it doesn't appear to be part of the function?
    create function f1(x number) return numset_t pipelined is
    begin
    for i in 1..x loop
    pipe row(i);
    end loop; -- do I need to do a looP? i just want to do select *...
    return;
    end;
    select * from table(f1(3)); -- again this appears to be outside the function, where does it go?
    Thanks
    Bruce

    Jorge:
    I was looking into something similar some time ago. The suggested solution may or may not work for you, depending on what it is you want to write to the tables. I was trying to write audit information - who ran what report when. Through BI Publisher template variables I could get the who and the when, but not what report was being run, so the report trigger option wasn't of any use to me.
    In the end, I opted to change the attributes of the report so that the "show controls" checkbox is unchecked and make users run all reports through BI Publisher Scheduler. It turns out that reports run via the scheduler have all of that data saved off and you can see it from the Schedules/History display.
    Good luck,
    Gaff

  • NotSerializable error while trying to write arraylist

    I am getting a NotSerializable error while trying to write an arraylist to a file.
    Here's the part of the code causing problem
    File temp = fileOpenerAndSaver.getSelectedFile(); // fileOpenerAndSaver is a JFileChooser object which has been created and initialized and was already used to select a file with
    currentWorkingFile = new File (temp.getAbsolutePath() + ".gd");      // currentWorking file is a file object
    try
         ObjectOutput output = new ObjectOutputStream (new BufferedOutputStream(new FileOutputStream(currentWorkingFile)));
         output.writeObject(nodeList); // <-- This is the line causing problem (it is line 1475 on which exception is thrown)
         output.writeObject(edgeList);
         output.writeObject(nodesWithSelfLoop);
         output.writeObject(nextId);
         output.writeUTF(currentMessage);
         output.close();
    catch (Exception e2)
         JOptionPane.showMessageDialog (graphDrawer, "Unknown error writing.", "Error", JOptionPane.ERROR_MESSAGE);
         e2.printStackTrace();
    } As far as what nodeList is -- it's an arraylist of my own class Node which has been serialized and any object used inside the class has been serialized as well.
    Here is the declaration of nodeList:
         private ArrayList <Node> nodeList; // ArrayList to hold a list all the nodesLet me show you whats inside the node class:
    private class Node implements Serializable
         private static final long serialVersionUID = -4625153386839971250L;
         /*  edgeForThisNodeList holds all the edges that are between this node and another node
          *  nodesConnected holds all the nodes that are connected (adjacent) to this node
          *  p holds the top left corner coordinate of this node.  The centre. of this node is at (p.x + 5, p.y + 5)
          *  hasSelfLoop holds whether this node has a self loop.
          *  **NOTE**: ONLY ONE SELF LOOP IS ALLOWED FOR A NODE.
         ArrayList <Edge> edgeForThisNodeList = new ArrayList <Edge> ();
         ArrayList <Node> nodesConnected = new ArrayList <Node> ();
         Point p;
         boolean hasSelfLoop = false;
         int index = -1;
         BigInteger id;
                     ... some methods following this....
    }Here is the edge class
    private class Edge implements Serializable
         private static final long serialVersionUID = -72868914829743947L;
         Node p1, p2; // The two nodes
         Line2D line;
          * Constructor:
          * Assigns nodes provided as appropriate.
          * Also calls the addEdge method on each of the two nodes, and passes
          * "this" edge and the other node to the nodes, so that
          * this edge and the other node can be added to the
          * data of the node.
         public Edge (Node p1, Node p2)
              this.p1 = p1;
              this.p2 = p2;
              line = new Line2D.Float(p1.p.x+5,p1.p.y+5,p2.p.x+5,p2.p.y+5);
              p1.addEdge(this, p2, true);
              p2.addEdge(this, p1, false);
         }Here is the error I am getting:
    java.io.NotSerializableException: javax.swing.plaf.metal.MetalFileChooserUI
         at java.io.ObjectOutputStream.writeObject0(Unknown Source)
         at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
         at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
         at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
         at java.io.ObjectOutputStream.writeObject0(Unknown Source)
         at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
         at java.io.ObjectOutputStream.writeObject0(Unknown Source)
         at java.io.ObjectOutputStream.writeObject(Unknown Source)
         at MyPanel.save(MyPanel.java:1475)
         at GraphDrawer.actionPerformed(GraphDrawer.java:243)
         I inentionally did not write the whole error stack because it was way too long and I ran out of characters. But line 1475 is where I do the writeObject call. I also goet some weird not serialized exceptions before on some other classes that are not being written to the file or are not part of the object that I am writing. I serialized those classes and now it's this unknown object that's causing problems.
    Edit: The problem may be due to the JFileChooser I am using to select the file as it is a non-serializable object. But I am not trying to write it to the file and in fact am just writing the arrayLists and BigInteger as objects to the file.
    Edited by: Cricket_struck on Dec 21, 2009 1:25 PM
    Edited by: Cricket_struck on Dec 21, 2009 1:32 PM
    Edited by: Cricket_struck on Dec 21, 2009 2:16 PM

    java.io.NotSerializableException: javax.swing.plaf.metal.MetalFileChooserUIThat's a Swing component and it is clearly related to the JFileChooser.
    I also get some weird not serialized exceptions before on some other classes that are not being written to the file or are not part of the object that I am writing.That's a contradiction in terms. If you get NotSerialzableException it means the objects are being written. So they are reachable from the objects you're writing.
    Edit: The problem may be due to the JFileChooser I am using to select the file as it is a non-serializable object.JFileChooser implements Serializable, but you're right, you shouldn't try to serialize it. But clearly this is the current problem. Somewhere you have a reference to it reachable via the object(s) you are serializing.
    I suspect that Node and Edge inner classes and that you aren't aware that inner classes contain a hidden reference to their containing class. The solution for serializaition purposes is to make them static nested classes, or outer classes.

  • Has anyone tried to write a wizard in labview?

    Hi,
    We are planning a new GUI for our hardware, and we want to implement a Wizard, with next and back buttons. Our old GUI is implemented in Labview, and we had lots of database problems (globals, memory etc.). Is there a way to implement a wizard in Labview with a database that can be updated easily (not a structure - everytime you add something everything changes, a file seems slow and cumbersome, a functional global  - would it work for a large amount of data?) and will prevent race conditions (part of the program trying to write the same time as another)?
    Any ideas would be welcome!
    Thanks,
    Danielle
    "Wisdom comes from experience. Experience is often a result of lack of wisdom.”
    ― Terry Pratchett

    Danielle,
    i didn't say that a FGV is not good for the task. I only doubt that a single FGV will do the job.
    dsavir wrote:
    [...]because we always adding new capabilities to our hardware[...]
    Does that require complete new elements in your datastructure? If yes, it is very hard to solve it.
    I asuyme that most changes can be captured by using "intelligent" elements in your datastructure like enums and typified clusters.
    Bringing up a very important point: In situations like this, it is imho mandatory to create good typedefinitions in order to keep proper versioning.
    Working with SCC helps a lot, too, because you can track all changes made over time very easy, and switching back is possible as well.
    Regarding the queue-question:
    There are many good examples/tutorials and posts available, so please do a short search.
    I recommend you to start here. 
    hope this helps,
    Norbert 
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Write PL/SQL query from SSRS 2008

    Hello,
    I've need of writing the following statement as query or procedure within SSRS 2008(SQL Server Reporting Services 2008) to query Oracle data.
    IF :PARAMETER1 = 1
    SELECT A1,B1,C1 FROM TABLE1
    INNER JOIN TABLE2 ON TABLE2.X = TABLE1.X
    INNER JOIN TABLE3 ON TABLE3.Y = TABLE1.Y
    WHERE TABLE1.FIELD1 = :PARAMETER1
    ELSE IF :PARAMETER1 = 0
    SELECT A1,B1,C1 FROM TABLE1
    INNER JOIN TABLE2 ON TABLE2.X = TABLE1.X
    WHERE TABLE1.FIELD1 = :PARAMETER1
    Can someone please help since I am trying to write query with IF ELSE statement or block from SSRS 2008?
    Brief scenario - I'm trying to query data from Oracle db by using Oracle data source connection(11g client) from SSRS 2008 to display on SSRS report.
    Thanks,
    JS.

    user1378136 wrote:
    Thank you for the tip and sample snippet as you mentioned it may not work, it did not work.
    Probable I did not ask the question right way. Let me ask you this. If I were to write SQL or PL/SQL (which ever is required because of IF condition) to query Oracle DB how do I do below mentioned statements,
    IF condition = true
    do something.....
    Else IF condition = false
    do something.....
    Thank you,
    JS.Typically i'd create a function that returns a ref cursor for something like this (on the Oracle database you need to query) and then call that from wherever it is required.
    create or replace function get_some_data
       p_PARAMETER1   number
    return sys_refcursor
    is
       some_ref_cursor   sys_refcursor;
    begin
       IF p_PARAMETER1 = 1
       then
          open some_ref_cursor for
             SELECT A1,B1,C1 FROM TABLE1
             INNER JOIN TABLE2 ON TABLE2.X = TABLE1.X
             INNER JOIN TABLE3 ON TABLE3.Y = TABLE1.Y
             WHERE TABLE1.FIELD1 = 1;
       ELSIF p_PARAMETER1 = 0
       then
          open some_ref_cursor for for
             SELECT A1,B1,C1 FROM TABLE1
             INNER JOIN TABLE2 ON TABLE2.X = TABLE1.X
             WHERE TABLE1.FIELD1 = 0;
       end if;
       return some_ref_cursor;
    end get_some_data;
    /So you'd return a pointer to 1 of 2 queries via this function, and the client would process it accordingly.

  • Trying to write an SQL import script

    Hello All,
    I am trying to write a bulk importer for data for my clients and I am just about there. However I am running into a problem updating records in a second table.
    I want to do all this through the SQL Server for resource purposes.
    The SQL statement will go through the entire temp table (users to be added or updated) and compare it to the main existing table. First it will compare records and determine who are exactly the same (no changes) and then delete those records out of the temp table. Now it will find the records that are in the table (by employee ID), but have changes in their profiles (name, number, etc.).
    This is my problem:
    When I compare the phonenumbers in a separate table, which are connected by a sub_id. Example
    Main Table: (Fields) sub_id, fname, lname, address, groups, subgroups, etc.
    Phonenumbers Table: sub_id, account_id, sub_user_number, active
    Right now, I am performing update statements:
    -- Update sub_user_number
    print('Update sub_user_number');
    print('  -sub_user_number3');
    UPDATE WENS..SUBSCRIPTION
    SET sub_user_number = i.sub_user_number3
      FROM WENS_IMPORT..IMPORT_INSPIRON i INNER JOIN WENS..SUBSCRIPTION s
       ON i.misc1 = s.misc1
      LEFT JOIN WENS..ACCOUNT_USER_GROUPS g
       ON g.sub_id = s.sub_id
      WHERE s.account_id = @account_id
      AND isnull(i.sub_user_number, '') <> isnull(s.sub_user_number, '')
      AND g.group_id IN (@group_id)
    The problem is that if I have three numbers, it updates all three numbers with the same number.
    Ideally what I would like to do is completely delete the numbers and then re-enter them. For example:
    Perform a DELETE of all numbers out of PHONENUMBERS table where maintable.sub_id = temptable.sub_id
    LOOP through numbers found in temptable
    INSERT new number into PHONENUMBERS (sub_id, account_id, active, sub_user_number)
    END LOOP
    Therefore at the end of the loop, we will have entered three numbers (two that were originally in there and one that is new)
    Could someone help me with the SQL syntax that will work in SQL Server Query analyzer?
    Thank you VERY much for anything you all can do.

    LOOP through numbers found in temptable
    I have only skimmed this thread, but I would say do not loop unless it is truly needed.  Databases are designed to work best with "sets" of information. So it is usually more efficient to process a group of records than one record at a time.
    What I usually do with imports is run a series of bulk updates on my #temp table(s) to identify which items are "new" which ones are "changed". When finished I can easily JOIN to the base tables and do a single UPDATE for changed records and INSERT for new records.  Usually a lot more efficient than looping one record at a time.
    I want to do all this through the SQL Server for resource
    purposes.
    BTW: Not to ignore your question, but database questions are usually best answered in a database forum (in your case MS SQL).  Because once you get the information into the #temp table, it is strictly sql from there and any database guru could assist. They do not have to know anything about CF ;-)
    Message was edited by: -==cfSearching==-

  • Trying to write code for clicking on the links that are in HTML table

    Hi,
    I have an application, where in I created a table test for one HTML table. The table test case is passed. Now I am trying to write some VBA code for clicking on the links that are in the table.
    Please help me.
    I was trying to write the following code:
    Dim tbl As HTMLTable
    ' tbl = "window(index=0).Tag[TABLE](index=11)"
    Dim tblrow As HTMLTableRow
    For Each tblrow In tbl
    tblrow.click
    Next
    but getting error as runtime error 424: Object required.
    Is what I am doing is correct.
    I also have another question regarding assigning the no of links to a integer.
    Call RSWApp.WriteToLog("Number of links", objDocument.links.Length) ( i have this code from one of the forum entries).
    This writes the links to the Results log. but is there a way to assign this value to an integer.
    Thanks in advance.
    Sailaja.

    Hi,
    Thanks.
    Q1: I am able to copy all the links to a .csv file for databank. But not able to pass that variable through VBA code in order to click the links.
    I used the following code to copy the links from the application to .csv file
    Dim myFs As Scripting.FileSystemObject
    Dim myFile As Scripting.TextStream
    Set myFs = New Scripting.FileSystemObject
    Set myFile = myFs.OpenTextFile("C:\Empirix\eTEST\DataBank\linksData.csv", ForWriting)
    Q2: I was using the following code for clicking. ( This is different from above. I was trying other alternative without using databank.)
    Dim myDoc As HTMLDocument
    Dim myLink As HTMLAnchorElement
    Set myDoc = RSWApp.om.GetTopDocument
    For Each myLink In myDoc.links
    If myLink.Id = "AppsNavLink" Then
    myLink.click
    End If
    Next
    The problem here is, The "clicking" is happening but not visible in the application. I have 70 links to click, after the test is passed, the cursor is pointing to the last link ( 70th link).
    Please help me if I am doing wrong.
    Thanks,
    Sailaja.

  • SQL errors in SMS_STATE_SYSTEM - Trying to write NULL values to PropertyLocale

    Hi!
    We are getting a lot of the following error in the SMS_STATE_SYSTEM:
    Microsoft SQL Server reported SQL message 515, severity 16: [23000][515][Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot insert the value NULL into column 'PropertyLocale', table 'CM_I20.dbo.CatalogAppModelProperties'; column does not allow
    nulls. UPDATE fails. : usp_BuildCatalogPropertyTable
    Please refer to your Configuration Manager documentation, SQL Server documentation, or the Microsoft Knowledge Base for further troubleshooting information.
    I understand what this message means but i cant find which applications are causing the problem.
    (actually i think I do but I still get the error messages after deleting them..)
    It seems it's trying to write NULL-values twice every 5 minutes, but from "where"? What is telling it to update the row with a NULL value?

    Here are part of the statesys.log - It's not very helpful ;)
    Seems it's the  'Update Application Catalog Tables'-task who is responsible for the mess.. But it does not say anything about the application..
    Started task 'Update Application Catalog Tables'
    SMS_STATE_SYSTEM 03.02.2014 16:18:14
    4744 (0x1288)
    *** exec usp_RunCatalogTableTasks NULL, 0xA102000074652041
    SMS_STATE_SYSTEM 03.02.2014 16:18:29
    4744 (0x1288)
    *** [23000][515][Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot insert the value NULL into column 'PropertyLocale', table 'CM_I20.dbo.CatalogAppModelProperties'; column does not allow nulls. UPDATE fails. : usp_BuildCatalogPropertyTable
    SMS_STATE_SYSTEM 03.02.2014 16:18:29
    4744 (0x1288)
    *** exec usp_RunCatalogTableTasks NULL, 0xA102000074652041
    SMS_STATE_SYSTEM 03.02.2014 16:18:29
    4744 (0x1288)
    *** [24000][0][Microsoft][SQL Server Native Client 11.0]Invalid cursor state
    SMS_STATE_SYSTEM 03.02.2014 16:18:29
    4744 (0x1288)
    *** exec usp_RunCatalogTableTasks NULL, 0xA102000074652041
    SMS_STATE_SYSTEM 03.02.2014 16:18:33
    4744 (0x1288)
    *** [23000][515][Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot insert the value NULL into column 'PropertyLocale', table 'CM_I20.dbo.CatalogAppModelProperties'; column does not allow nulls. UPDATE fails. : usp_BuildCatalogPropertyTable
    SMS_STATE_SYSTEM 03.02.2014 16:18:33
    4744 (0x1288)
    Task 'Update Application Catalog Tables' failed after running for 19 seconds.
    SMS_STATE_SYSTEM 03.02.2014 16:18:33
    4744 (0x1288)
    Will sleep until task 'Update NAP Restriction Error Summary' is due in 220 seconds.
    SMS_STATE_SYSTEM 03.02.2014 16:18:33
    4744 (0x1288)
    Main thread waiting for file change notification or timeout after 220 seconds.
    SMS_STATE_SYSTEM 03.02.2014 16:18:33
    4744 (0x1288)
    Inbox notification triggered, pause for 10 seconds....
    SMS_STATE_SYSTEM 03.02.2014 16:19:53
    4744 (0x1288)
    Found new state messages to process, starting processing thread
    SMS_STATE_SYSTEM 03.02.2014 16:20:03
    4744 (0x1288)
    Thread "State Message Processing Thread #0" id:3088 started
    SMS_STATE_SYSTEM 03.02.2014 16:20:03
    3088 (0x0C10)
    total chucks loaded (1) SMS_STATE_SYSTEM
    03.02.2014 16:20:03 3088 (0x0C10)
    total chucks loaded (0) SMS_STATE_SYSTEM
    03.02.2014 16:20:03 3088 (0x0C10)
    Thread "State Message Processing Thread #0" id:3088 terminated normally
    SMS_STATE_SYSTEM 03.02.2014 16:20:03
    3088 (0x0C10)
    CThreadMgr::ThreadTerminating - All threads have stopped running
    SMS_STATE_SYSTEM 03.02.2014 16:20:03
    3088 (0x0C10)
    Found new state messages to process, starting processing thread
    SMS_STATE_SYSTEM 03.02.2014 16:21:03
    4744 (0x1288)
    Thread "State Message Processing Thread #0" id:6468 started
    SMS_STATE_SYSTEM 03.02.2014 16:21:03
    6468 (0x1944)
    total chucks loaded (1) SMS_STATE_SYSTEM
    03.02.2014 16:21:03 6468 (0x1944)
    total chucks loaded (0) SMS_STATE_SYSTEM
    03.02.2014 16:21:03 6468 (0x1944)
    Thread "State Message Processing Thread #0" id:6468 terminated normally
    SMS_STATE_SYSTEM 03.02.2014 16:21:03
    6468 (0x1944)
    CThreadMgr::ThreadTerminating - All threads have stopped running
    SMS_STATE_SYSTEM 03.02.2014 16:21:03
    6468 (0x1944)
    Started task 'Update NAP Restriction Error Summary'
    SMS_STATE_SYSTEM 03.02.2014 16:22:18
    4744 (0x1288)
    Task 'Update NAP Restriction Error Summary' completed successfully after running for 15 seconds, with status 0.
    SMS_STATE_SYSTEM 03.02.2014 16:22:33
    4744 (0x1288)
    Will sleep until task 'Update Application Catalog Tables' is due in 60 seconds.
    SMS_STATE_SYSTEM 03.02.2014 16:22:33
    4744 (0x1288)
    Main thread waiting for file change notification or timeout after 60 seconds.
    SMS_STATE_SYSTEM 03.02.2014 16:22:33
    4744 (0x1288)
    Inbox notification triggered, pause for 10 seconds....
    SMS_STATE_SYSTEM 03.02.2014 16:23:20
    4744 (0x1288)
    Found new state messages to process, starting processing thread
    SMS_STATE_SYSTEM 03.02.2014 16:23:30
    4744 (0x1288)
    Thread "State Message Processing Thread #0" id:4076 started
    SMS_STATE_SYSTEM 03.02.2014 16:23:30
    4076 (0x0FEC)
    total chucks loaded (1) SMS_STATE_SYSTEM
    03.02.2014 16:23:30 4076 (0x0FEC)
    total chucks loaded (0) SMS_STATE_SYSTEM
    03.02.2014 16:23:30 4076 (0x0FEC)
    Thread "State Message Processing Thread #0" id:4076 terminated normally
    SMS_STATE_SYSTEM 03.02.2014 16:23:30
    4076 (0x0FEC)
    CThreadMgr::ThreadTerminating - All threads have stopped running
    SMS_STATE_SYSTEM 03.02.2014 16:23:30
    4076 (0x0FEC)
    Started task 'Update Application Catalog Tables'
    SMS_STATE_SYSTEM 03.02.2014 16:23:45
    4744 (0x1288)
    *** exec usp_RunCatalogTableTasks NULL, 0xA102000074652041
    SMS_STATE_SYSTEM 03.02.2014 16:24:00
    4744 (0x1288)
    *** [23000][515][Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot insert the value NULL into column 'PropertyLocale', table 'CM_I20.dbo.CatalogAppModelProperties'; column does not allow nulls. UPDATE fails. : usp_BuildCatalogPropertyTable
    SMS_STATE_SYSTEM 03.02.2014 16:24:00
    4744 (0x1288)
    *** exec usp_RunCatalogTableTasks NULL, 0xA102000074652041
    SMS_STATE_SYSTEM 03.02.2014 16:24:00
    4744 (0x1288)
    *** [24000][0][Microsoft][SQL Server Native Client 11.0]Invalid cursor state
    SMS_STATE_SYSTEM 03.02.2014 16:24:00
    4744 (0x1288)
    *** exec usp_RunCatalogTableTasks NULL, 0xA102000074652041
    SMS_STATE_SYSTEM 03.02.2014 16:24:04
    4744 (0x1288)
    *** [23000][515][Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot insert the value NULL into column 'PropertyLocale', table 'CM_I20.dbo.CatalogAppModelProperties'; column does not allow nulls. UPDATE fails. : usp_BuildCatalogPropertyTable
    SMS_STATE_SYSTEM 03.02.2014 16:24:04
    4744 (0x1288)
    Task 'Update Application Catalog Tables' failed after running for 19 seconds.
    SMS_STATE_SYSTEM 03.02.2014 16:24:04
    4744 (0x1288)
    Found new state messages to process, starting processing thread
    SMS_STATE_SYSTEM 03.02.2014 16:24:49
    4744 (0x1288)
    Thread "State Message Processing Thread #0" id:6800 started
    SMS_STATE_SYSTEM 03.02.2014 16:24:49
    6800 (0x1A90)
    total chucks loaded (1) SMS_STATE_SYSTEM
    03.02.2014 16:24:49 6800 (0x1A90)
    total chucks loaded (0) SMS_STATE_SYSTEM
    03.02.2014 16:24:49 6800 (0x1A90)
    Thread "State Message Processing Thread #0" id:6800 terminated normally
    SMS_STATE_SYSTEM 03.02.2014 16:24:49
    6800 (0x1A90)
    CThreadMgr::ThreadTerminating - All threads have stopped running
    SMS_STATE_SYSTEM 03.02.2014 16:24:49
    6800 (0x1A90)
    Will sleep until task 'Update NAP Restriction Summary' is due in 16 seconds.
    SMS_STATE_SYSTEM 03.02.2014 16:26:04
    4744 (0x1288)
    Main thread waiting for file change notification or timeout after 16 seconds.
    SMS_STATE_SYSTEM 03.02.2014 16:26:04
    4744 (0x1288)
    Inbox notification triggered, pause for 10 seconds....
    SMS_STATE_SYSTEM 03.02.2014 16:26:20
    4744 (0x1288)
    Started task 'Update NAP Restriction Summary'
    SMS_STATE_SYSTEM 03.02.2014 16:26:30
    4744 (0x1288)
    Task 'Update NAP Restriction Summary' completed successfully after running for 15 seconds, with status 0.
    SMS_STATE_SYSTEM 03.02.2014 16:26:45
    4744 (0x1288)
    Will sleep until task 'Update Application Catalog Tables' is due in 139 seconds.
    SMS_STATE_SYSTEM 03.02.2014 16:26:45
    4744 (0x1288)
    Main thread waiting for file change notification or timeout after 139 seconds.
    SMS_STATE_SYSTEM 03.02.2014 16:26:45
    4744 (0x1288)

Maybe you are looking for

  • My ipod touch 3G the bottom doesn't work. How do i fix it?

    Everything on the top works. From the bottom, its slowly moving up. now i'm not able to slide to unlock it.

  • Problems with "non-Apple" Hitachi 100GB/7200 RPM internal drives?

    I bought a Hitachi Travelstar 7K100 drive from a third-party vendor and had it installed in my 15" PBG4, which promptly began kernel-panicking when coming out of sleep. Pulled the Travelstar and reinstalled the original 60GB drive, and the kernel pan

  • Mac book Pro or mac pro for pro photgraphy

    i need a new mac for photo editing and i need to know if I would be best served  by the most powerful configuration of Mac Book Pro with retina display or by a Mac Pro medium config (maybe it is a little overkill). For photography on Photoshop, Light

  • Oracle support table w/HACMP on RS/6000

    There use to a be a table that we could reference for versions of Oracle supported with versions of HACMP. What happened to it? It used to be: http://www.oracle.com/ibm/rs6000/html/rs6matrix.html#rdbms Any ideas?

  • Mixed screen ratios in iDVD - problem

    I'm using iDVD to make a DVD with mixed content - some is 16:9 some 4:3.  Problem is when the 4:3 content plays iDVD puts grey padding either side to make up the widescreen.  Is there any way I can change this padding to black? iDVD 7.1.1, Macbook Pr