Date enquiry

hello,
excuse my ignorance, but, can you insert a date stored as a string in a column with a "date" data type (ie, how can you insert a date entered by users in a jsp's textbox - say in '23/03/04' String format - in a table's column with a 'date' data type)? (I guess that, if possible, you would need to somehow convert it to YYYY-MM-DD format).
also, i would like to do this: i am having users to enter two dates in text boxes in a jsp (again in '23/04/04' format), and then i want to retrieve some numeric data from a table, for all dates between the first one and the day before the last one (in this table, i guess i need to use a 'date' data type for the dates, to be able to compare them; so, i would need to convert the dates entered as strings to 'Date' objects). Then, i need to check whether the retrieved numeric data, for each date, is equal or greater than a specific figure; if any of the retrieved numeric data is less than that specific figure, i need to return 'false' or something like that (ie, no further checking is necessary once a single retrieved numeric value is less than the required level). Any ideas?
Sorry, just thought about it, how can u convert a date in String format (say '23/04/04') to a 'Date' object?
thanks,

hello,
excuse my ignorance, but, can you insert a date
stored as a string in a column with a "date" data
type (ie, how can you insert a date entered by users
in a jsp's textbox - say in '23/03/04' String format
- in a table's column with a 'date' data type)? (I
guess that, if possible, you would need to somehow
convert it to YYYY-MM-DD format).
Databases store 'date'/'time'/'timestamp' as a timestamp. Or at least I have never seen a database that stored just a 'date' or a 'time'. This is true regardless of what the field is called.
So if you have a timestamp in your database you need to store a timestamp.
To do this the best way is to use the PreparedStatement method setTimestamp. You can also use setTime and setDate but if you do so you must understand that java and your database are still using timestamps and merely doing a close approximation to 'time' and 'date'.
To convert a string, from a gui (like JSP) to a java.util.Date you use java.text.SimpleDateFormat. You must then convert that to a java.sql.Timestamp (or Date/Time.)
also, i would like to do this: i am having users to
enter two dates in text boxes in a jsp (again in
'23/04/04' format), and then i want to retrieve some
numeric data from a table, for all dates between the
first one and the day before the last one (in this
table, i guess i need to use a 'date' data type for
the dates, to be able to compare them; so, i would
need to convert the dates entered as strings to
'Date' objects). Then, i need to check whether the
retrieved numeric data, for each date, is equal or
greater than a specific figure; if any of the
retrieved numeric data is less than that specific
figure, i need to return 'false' or something like
that (ie, no further checking is necessary once a
single retrieved numeric value is less than the
required level). Any ideas?Time range extraction must use exclusion on one end and inclusion on the other. A SQL string usuable in a prepared statement would look like this...
select afield from atable where aDateField > ? and aDateField <= ?
In the above the start date would 'bind' (using setTimestamp) to the first '?' and the end date would go to the second '?'.

Similar Messages

  • Fetching Enquiry date in RFQ sapscript

    Hi all,
    I need to fetch Enquiry date in my customized standard sap script form .The field name is ANFDT and it is declared in structure RM06E.Please let me know hoe to do it.
    Thanks
    Manu

    Hi
    check this Table/Filed EKKO-ANGDT
    In EKKO Table you will get RFQ Data.And you need to check the document category and type to A and AN respecitvely.
    Ranga

  • Enquiry on Master data

    Hi All,
    I am loading master data  BI7 from 0fund_pu_attr(info pack) to (DTP)0fund.........records are 90...........till yesterday
    Today users addes  5 more new records at r/3 side......so total now is 95.....how do i update at bw side?
    and also to load the data.........do i need to delete the previous requests at info pack and dtp and reload again or  is there any other way i could do it?
    Any deltas possibe?
    Regards,
    Raj

    Hi Raj,
    See whenever the data is added at r/3 side the data doesnot get loaded automatically. We need to load the data from our system. I.e through infopackage.
    Now since you are loading master data then its always good to do a full upload if the number of records are not very huge. So you can just run the infopackage without deleting any of the previous request.
    You can automate this process of loading the data through Process Chain.
    Datasource creation and replication is always one time activity. No need to replicate datasource once again if you just want to load the data.
    If by any chance if you have added some new field or deleted any field from your datasource than in that case you need to replicate the datasource again.
    hope this helps.
    Rgds,
    Anup

  • Enquiry abt Date stamp after the access log name

    Hi anyone could explain this date stamp of the following
    error_log.1097539200- [Tue Oct 12 08:00:08 2004]
    access_log.1097539200 - [12/Oct/2004:08:00:23 +0800]
    error_log.1097625600 - [Wed Oct 13 08:00:04 2004]
    access_log.1097625600 - [13/Oct/2004:08:00:23 +0800]
    i could not figure out the date stamp behind each log file
    i saw from the example in the documents it should be something like this error_log.20041310 which represents 13 oct 2004 but some how the above log extension is diff

    Thanks for your help now and in the prior post you sent me. I tried and was unable to successfully implement option 1. (See error output below) and I was hoping to not change the way the suffix is calculated in conf files since I read that SA (or system updates) can stomp on those changes.
    Error after putting wildcard character logfile path:
    sudo perl awstats.pl -update -config=www.myserver.org
    Create/Update database for config "./awstats.www.myserver.org.conf" by AWStats version 6.6 (build 1.887)
    From data in log file "/var/log/httpd/access_log*"...
    Error: Couldn't open server log file "/var/log/httpd/access_log*" : No such file or directory
    Setup ('./awstats.www.myserver.org.conf' file, web server or permissions) may be wrong.
    Check config file, permissions and AWStats documentation (in 'docs' directory).

  • Enquiry about audigy 4 [NON-PRO] & audigy 2

    Hi, I would like to make an enquiry about a few creative products.
    I am currently intrested in getting a T7900 speaker system.
    However i have doubts on the soundcard that i should get.
    Could anyone identify the difference with a Audigy 4 [NON-Pro] and a Audigy 2 ZS.
    I couldn't find any through comparison on these 2 products in the whole creative website.
    And also, is the T7900 7. speaker system compatible with either of the 2 audigy sound cards.
    Which card would you recommand me to go for too.
    Thanks in advance. =)Message Edited by kutysam on 02-8-200603:48 AM

    Well im feeling lazy ATM so I have no technical data to pass on. I would say thought the differents are :
    : Price,, hmm get which is cheaper
    2: The Audigy 4 would have ( at a guess anyway?)?more settings/tools and banks for media creation and the like.
    Other than that, not a great deal between them. As far as games go, they both do the very same thing and with DVD movies they would produce the same rates as with music.
    Id say, get the ZS if your into games and DVDs+music, or get the A 4 for the same reasons + Media creation/mixing and stuff like that.
    Like I said, to lazy to research it further but close enough

  • BP master data ship to address show in SO

    Dear All,
    In the BP master data, there is a Addresses tab, inside this tab, there is the Ship to address with Address Name, Zip Code, State... etc.
    In the Sales Order, there is a Logistic tab, in the Ship to, user can select which address want to be selected for the default ship to address, in the textbox of the ship to address, would like to enquiry how to set which line of Ship to address can set in here? for example, i just want to display the Address Name and State, but not the Zip Code.
    Thank you very much!

    Hi!
    It's very much possible.
    Do the setting in
    Administration > setup > Business Partner > Address Format
    1. Go to Find Mode
    2. Press *
    3. Select your Country code
    4. Change the Address Format as you wish.
    5. Restart SAP Once Again.
    --- See to that all other users are logged out from SAP B1

  • Over a Month of waiting... still no resolution dat...

    Well after an initial activation date of 20th March and many hours spent on hold I still have no broadband. I have a £15 phone bill from my initial chase, and since finally getting my phone connected earlier this month, I still have no broadband which is all I joined BT for.
    Utterly dissatisfied and if I have no further information this week I will be cancelling my subscription and joining the masses of people who warn future customers away from BT. I have had several slow and unhelpful reactions to my regular calls and queries. Each time I get a new "Account Manager" who's going to deal with my query personally and call me back in 48 hours. 72 hours later after having patiently waited I have to chase again, from scratch and explaining my issue from the ground up. Then I get a new name in India, who "understands my frustration" and will be updating me... I never hear back.
    All I wanted was a date for when I will be connected, if it was close I'd have been prepared to wait.. if it was far out I'd have gone elsewhere. Something tells me BT knew that it would be a slow process hence their lack of transparency. I'm unable to work from home without an internet connection and I'm fully understanding why the BT consistently hit the bottom of the Which.co.uk independent polls! Can someone in the UK provide me with some detail?
    I've invested enough time chasing, perhaps someone could offer me some help? If not I'll go elsewhere.

    Provided that you are not running a business on a residential line, which is not allowed, I will ask for help.
    I have asked a moderator to provide assistance, they will post an invite on this thread.
    They are the only BT employees on this forum, and are a UK based team of people, who take personal ownership of your problem.
    Once you get a reply, make sure that you are logged into the forum, then click on their name, you will see a screen like this. Click on the link as shown below.
    Please do not send them a personal message, as they cannot deal with service issues that way.
    For your own security, do not post any personal details, on this forum. That includes any tracking number you are give.
    They will respond either by phone or e-mail, when its your turn in the queue.
    Please use the tracked e-mail, to reply, not via the forum. Thanks
    This is the form you should see when you click on the link. If you do not see this form, then you have selected the wrong link.
    When you submit the form, you will receive an enquiry number, so please keep a note of it
    There are some useful help pages here, for BT Broadband customers only, on my personal website.
    BT Broadband customers - help with broadband, WiFi, networking, e-mail and phones.

  • N73 - date for new software version

    Please see below the date for the next update. This came from their Director of Customer Care:
    "With regards to your recent enquiry concerning software availability for your product code 0539101 for UK Country Variant I can confirm that at present you already have the latest software version available. New software version for your product should be available no later than Friday the 8th December in both our Nokia service points and Nokia Software Updater."

    goodie...
    for all those complaining about no Country Variant fw editions, just hang on 2 more weeks and have a merry xmas

  • Inquiry Number,Inquiry Date,Quotation No,Quotation Date,Sales order No

    Hi ALL,
    Please let me know from which SD cubes can we get data relation to these fields
    Inquiry Number,Inquiry Date,Quotation No,Quotation Date,Sales order No,Sales order Number,.
    Or do we need to enhance these field .
    Regards

    hi,
    We can link enquiry, quotation & sales order through the document type there is a field -
    Reference mandatory  in that you entered the  link
    Thanks
    naresh

  • Reset or delete transactional data in SD

    Dear All,
    We would like to delete the existing transactional data in SAP-SD  in our Development server such as Enquiry Quotations, Order, Delivery, Billing Documents, Excise Invoice, ARE1 and ARE3.
    Request to let me know the TCODE or Program or Report to reset the transactional data.
    Regards

    Hi,
    Inform your Basis person on the data you need to clean up. The basis person will take care of it.
    Regards,

  • Need help with SQL retrieval for previous month till current date

    Hi ,
    Need help generating statistics from previous month from date of enquiry till current date of enquiry.
    and have to display it according to date.
    Date of enquiry : 03/02/2012
    Application Type| 01/01/2012 | 02/01/2012 | 03/01/2012 |...... | 31/01/2012 | 01/02/2012 | 02/02/2012 | 03/02/2012 |
    sample1 20 30 40
    sample 2 40 40 50
    sample 3 50 30 30
    Hope you guys can help me with this.
    Regards

    Hi,
    932472 wrote:
    Scenario
    1)If i run the query at 12 pm on 03/2/2012. the result i will have to display till the current day.
    2)displaying the count of the application made based on the date.
    Application type 01012012 | 02012012 | 03012012 | ..... 01022012| 02022012|03022012
    sample 1 30 40 50 44 30
    sample 2 35 45 55
    sample 3 36 45 55Explain how you get those results from the sample data you posted.
    It would help a lot if you posted the results in \ tags, as described in the forum FAQ. {message{id=9360002}
    SELECT     application_type as Application_type
    ,     COUNT (CASE WHEN created_dt = sysdate-3 THEN 1 END)     AS 01012012 (should be getting dynamically)
    ,     COUNT (CASE WHEN created_dt = sysdate-4 THEN 1 END)     AS 02022012
    ,     COUNT (CASE WHEN created_dt = sysdate-5 THEN 1 END)     AS 03022012
    , COUNT (CASE WHEN created_dt = sysdate-6 THEN 1 END)     AS 04022012
    FROM     table_1
    GROUP BY application_type
    ORDER BY     application_typeThat's the bais idea.
    You can simplify it a little by factoring out the date differences:WITH got_d     AS
         SELECT     qty
         ,     TRUNC ( dt
              - ADD_MONTHS ( TRUNC (SYSDATE, 'MON')
                        , -1
              ) AS d
         FROM table1
         WHERE     dt     >= ADD_MONTHS ( TRUNC (SYSDATE, 'MON')
                        , -1
         AND dt     < TRUNC (SYSDATE) + 1
    SELECT     SUM (CASE WHEN d = 1 THEN qty END)     AS day_1
    ,     SUM (CASE WHEN d = 2 THEN qty END)     AS day_2
    ,     SUM (CASE WHEN d = 62 THEN qty END)     AS day_62
    FROM     got_d
    See the links I mentioned earlier for getting exactly the right number of columns, and dynamic column aliases.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Enquiry Quatation Scenario

    Hi all,
    Scenario starts with a formal enquiry from customer in a predefined
    format which will be punched in the system.
    1>Enquiry acceptance to be done.
    2>Checks to be built where quotation cannot be sent without the formal
    process of feasibility,
    3>Acceptance being followed. Enquiry feasibility minutes to be
    documented in the system, Template to be designed.
    4>Automatic cost calculation based on input of Process flow Diagram (
    Routing ) and work center master cost description;
    5>user can assign the margins based on margins desired.
    6>Also the user will be able to feed approx quantities to be Long term
    planning and the SAP will check if the additional work on the work
    center is possible based on capacity availability.
    7>If not, system will suggest capex based on cost of the work center
    available in the asset master.
    8>All this data will help the company while quoting to the customer.
    This is requirement before we send quatation to customer.
    Pls advice the feasibility in Standard SAP and the development
    requiered.

    Hi,
    Have a look at the MCSD certification tracks:
    https://www.microsoft.com/learning/en-us/mcsd-certification.aspx (open in Chrome or Firefox, will not work with IE)  MCSD is the most recent development certification from Microsoft.
    For SQL have a look at the MCSA for SQL 2012 certification
    https://www.microsoft.com/learning/en-us/mcsa-sql-certification.aspx (open in Chrome or Firefox, will not work with IE)
    After MCSA you can get MCSE:Data Platform with two addition exams:     
    https://www.microsoft.com/learning/en-us/mcse-sql-data-platform.aspx
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer
    Danny van Dam
    MVP, MCC

  • Enquiry System in Workspace

    Hi all,
    Can I implement a Enquiry System that query database and return some results in Workspace? I tried to do it in search form and assign the results using "AssignTask" back to the creator, but the user will need to check his "To Do" list to retrieve the results. Can the result and search form in the same Form/Task without the user going to the "To Do" list?
    Thank you.

    There is another way. Similar to Jasmin's suggestion, but instead of prepopulating the data into the form, get the form to invoke a web service. You can pass parameters to the web service to determine what search you want to do, and can parse the results, and populate a table (or whatever) in the form.
    You can write the web service itself using whatever tools you like, including (my personal preference:-) a livecycle orchestration - so all the connection and query logic are in the backend, not the form - the form just does the user interface.
    We do this all the time in many of our forms to retrieve "lookup" data to dynmamically populate dropdowns, etc. If you'd like some assistance getting this set up, email info-at-avoka.com.
    Another option would be to build a flex application, and embed this into the Workspace as an initial form.
    Howard
    http://www.avoka.com

  • Enquiry on converting a *.txt file to a *.pdf file

    Enquiry on converting a *.txt file to a *.pdf file
    Aim of this software: Let the user to choose a *.txt file to convert it to a *.pdf file.
    1. User clicks a choose file button. [chooseFileButton]
    2. User clicks the Export 2 button [exportButton2]
    3. User clicks the Text -> PDF button [pdfConverterButton]
    After choosing the file and click the choose file button:
    System prints out (for debbuging use...)
    ---------------------------Print from Trans.java - method transMemory--------------------
    File's name: file.txt
    File's path: C:\Users\charles\Desktop\netbean\Pdfproject1\file.txt
    After clicking the Export 2 button, system prints out:
    ---------------Print out the File's name - from DataOut.java - getData() Method-------------------------
    File's Name: file.txt
    ----------------Print out the file's path - from DataOut.java - getData() Method--------------
    File's path: C:\Users\charles\Desktop\netbean\Pdfproject1\file.txt
    The file now being read by the system: transNameData.txt
    The data being copied to this file: copyOfFileName.txt Destination
    This file has been copied: file.txt Original
    The following content has been copied:
    ---start of content - from TheFile.java - save2() method---
    Some content.....................................
    --------end of content--------
    Jul 18, 2010 3:32:04 PM mainFrame1 exportButton2ActionPerformed
    SEVERE: null
    java.io.IOException: Permission denied
    at java.io.FileInputStream.readBytes(Native Method)
    at java.io.FileInputStream.read(FileInputStream.java:199)
    at java.io.DataInputStream.read(DataInputStream.java:132)
    at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
    at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
    at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
    at java.io.InputStreamReader.read(InputStreamReader.java:167)
    at java.io.BufferedReader.fill(BufferedReader.java:136)
    at java.io.BufferedReader.readLine(BufferedReader.java:299)
    at java.io.BufferedReader.readLine(BufferedReader.java:362)
    at TheFile.save2(TheFile.java:144)
    at mainFrame1.exportButton2ActionPerformed(mainFrame1.java:168)
    at mainFrame1.access$200(mainFrame1.java:30)
    at mainFrame1$3.actionPerformed(mainFrame1.java:79)
    at java.awt.Button.processActionEvent(Button.java:392)
    at java.awt.Button.processEvent(Button.java:360)
    at java.awt.Component.dispatchEventImpl(Component.java:4630)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    After clicking the text -> PDF button, system prints out:
    The following data is called by the PDF converter button...
    ---------------Print out the File's name - from DataOut.java - getData() Method-------------------------
    File's Name: file.txt
    ----------------Print out the file's path - from DataOut.java - getData() Method--------------
    File's path: C:\Users\charles\Desktop\netbean\Pdfproject1\file.txt
    MakePdf.java is loading... - createPdf() method
    File you have chosen and this file will be converted to a PDF file: file.txt
    And the content of the file is:
    ---start of content--- (Info from MakePdf.java)
    Some content.....................................
    ---end of content---
    Print out the content again: Some content..................................... ---> Info from SubClass DocToPdf of MakePdf.java
    Exception in thread "AWT-EventQueue-0" ExceptionConverter: java.io.IOException: The document has no pages.
    at com.lowagie.text.pdf.PdfPages.writePageTree(Unknown Source)
    at com.lowagie.text.pdf.PdfWriter.close(Unknown Source)
    at com.lowagie.text.pdf.PdfDocument.close(Unknown Source)
    at com.lowagie.text.Document.close(Unknown Source)
    at MakePdf$DocToPdf.createDoc(MakePdf.java:140)
    at MakePdf.createPdf(MakePdf.java:97)
    at TheFile.forPdfUse(TheFile.java:267)
    at mainFrame1.pdfConverterButtonActionPerformed(mainFrame1.java:184)
    at mainFrame1.access$300(mainFrame1.java:30)
    at mainFrame1$4.actionPerformed(mainFrame1.java:86)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.Component.processMouseEvent(Component.java:6263)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
    at java.awt.Component.processEvent(Component.java:6028)
    at java.awt.Container.processEvent(Container.java:2041)
    at java.awt.Component.dispatchEventImpl(Component.java:4630)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
    at java.awt.Container.dispatchEventImpl(Container.java:2085)
    at java.awt.Window.dispatchEventImpl(Window.java:2478)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    BUILD SUCCESSFUL (total time: 1 minute 41 seconds)

    Source code: MakePdf.java
    import com.lowagie.text.DocumentException;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.swing.*;
    import java.lang.String;
    import java.io.*;
    public class TheFile {
    String pathData;
    String nameData;
         public void PrepareJFileChooserData2(){
            try {
                // Create a object for JFileChooser.
                final JFileChooser choose = new JFileChooser();
                choose.showOpenDialog(null);
                File file = new File(choose.getSelectedFile(), "");
                pathData = file.getPath(); //get the path of the chosen file
                nameData = file.getName(); //get the name of the chosen file
                //Try to copy file to a temp file.
                Cfile2 cfile = new Cfile2();
                cfile.writeFile(nameData); // write nameData into the temp.txt file.
                //return pathData;
            } catch (IOException ex) {
                Logger.getLogger(TheFile.class.getName()).log(Level.SEVERE, null, ex);
          public String getPathName(){
                return pathData;
          public String getNameData(){
              return nameData;
        public class Cfile2{
        public void writeFile(String fName) throws IOException {
            PrintWriter pr = new PrintWriter(new File("temp.txt"));
            pr.println();
            pr.print("\n");
            pr.write("-------------------From SubClass - Cfile2 in TheFile.java----------------------");
            pr.write("File Name: " +nameData); // write the value of nameData to temp.txt
            pr.print("\n");
            pr.write("File's Path: "+pathData); // write the value of pathData to temp.txt
            pr.print("\n");
            pr.print("-------------------------------------------------------------------------------");
            pr.flush();  // Flush the data.
            pr.close();  // Close to unlock and flush to disk.
        public void save2() throws FileNotFoundException, IOException{
           // Copy and print out the file's name only
           String fileName = "transNameData.txt";
           File originFile = new File(fileName); //open the file to read
           System.out.println("The file now being read by the system: " +originFile);  //originFile = transNameData.txt
           File destinationFile = new File("copyOfFileName.txt"); // open another file and prepare to write in
        try {
            //Start trying to write data to file - copyOfFileName.txt
          byte[] readData = new byte[2048];
          FileInputStream fis = new FileInputStream(new File(fileName)); // Seems it writes the value of transNameData.txt to copy.txt
          int count = fis.available();
          if(count>0){
          FileOutputStream fos = new FileOutputStream(destinationFile);
          int i = fis.read(readData);
          while (i != -1) {
            fos.write(readData, 0, i);
            i = fis.read(readData);
          System.out.println("The data being copied to this file: " +destinationFile+ " Destination");
          fos.flush();
          fos.close();
          fis.close();
            }else{
              System.out.print("Error");
        } catch (IOException e) {
          System.out.println(e);
        // Copy the content of the file only
        FileInputStream fstream = new FileInputStream("transNameData.txt");
        // Get the object of DataInputStream
        DataInputStream in = new DataInputStream(fstream);
        BufferedReader br = new BufferedReader(new InputStreamReader(in));
        String strLine;
        //Read File Line By Line
        while ((strLine = br.readLine()) != null)   {
          // Print the content on the console
          System.out.println ("This file has been copied: " +strLine+ " Original"); //Work successfully, strLine has the value [file's title]
          File newDestinationFile = new File("ContentCopy.txt"); //Open the newCopy.txt file
          byte[] newReadData = new byte[2048];
          FileInputStream newFileInputStream = new FileInputStream(new File(strLine)); // See whether it can write it in... ok done!
          //String newString = newReadData.toString();
          //System.out.print("Content that has been copied: " +newString); //It prints out data in byte form...?!
          FileOutputStream newFileOutputStream = new FileOutputStream(newDestinationFile);
          int i = newFileInputStream.read(newReadData);
          while (i != -1) {
            newFileOutputStream.write(newReadData, 0, i);
            i = newFileInputStream.read(newReadData);
        FileInputStream newfstream = new FileInputStream(strLine);
        // Get the object of DataInputStream
        DataInputStream newin = new DataInputStream(newfstream);
            BufferedReader newbr = new BufferedReader(new InputStreamReader(newin));
        String content;
        //Read File Line By Line
        while ((content = newbr.readLine()) != null)   {
          // Print the content on the console
            System.out.println("\n");
            System.out.println("The following content has been copied: ");
            System.out.println(" ");
            System.out.println("---start of content - from TheFile.java - save2() method---");
            System.out.println(" ");
            System.out.println(content);
            System.out.println(" ");
            System.out.println("--------end of content--------");
        //Close the input stream
        in.close();
        //Close the input stream
        in.close();
    //----------- start PDF parser  ---> to txt format -------
       public void pdf() throws FileNotFoundException, IOException{
        //-----again--
       FileInputStream inStream = new FileInputStream("transNameData.txt");
        // Get the object of DataInputStream
        DataInputStream in = new DataInputStream(inStream);
            BufferedReader br = new BufferedReader(new InputStreamReader(in));
        String strLine;
        //Read File Line By Line
        while ((strLine = br.readLine()) != null)   {
          // Print the content on the console
          System.out.println ("Watch out: " +strLine+ "  ---> It should be printed successfully!!"); //Work successfully
        //---again......
        PDFTextParser pdftextparser = new PDFTextParser();
        pdftextparser.pdftoText(strLine);
        public void forPdfUse() throws FileNotFoundException, IOException, DocumentException{
            MakePdf makePdf = new MakePdf();
            makePdf.createPdf();
    }

  • Session Facade and Access to a Non SQL Based Persistent Data Store

    Hi,
    We are currently using jDeveloper 10.1.3.5 and Oracle Application Server 10.1.3.5. We develop all our applications as Java portlets using Oracle PDK and they are exposed through Oracle Portal.
    In our environment, the persistent data is stored on a combination of an Oracle database and a non SQL based persistent data store.
    The way we access the non SQL persistent data store is by posting a URL and receiving an XML document back in response. This mechanism is used both for enquiry and update of the persistent store.
    We have to create a new XML schema for each entity that we need to access and there are software changes on both our environment (Java) and the non SQL based persistent data store.
    In an attempt to shorten development times we are looking to start using ADF faces and EJB3.
    We have downloaded the SRDemo tutorial and made it work but there are some challenges.
    1. The SRDemo seem to have a very minimal implementation of a business layer. From what I can see, it is essentially some straightforward wiring between database attributes and their viewable representation. Is there a demo/tutorial containing a bit more meat in the business layer that you are aware of?
    2. Given our non SQL based persistent data store, how would you go about implementing EJB3 for such scenario. Is it recommended at all? How would you go about integrating the rest of the application (business layer and representation layer) to data arriving from such source?
    3. SRDemo is not intended to be exposed as a portlet. Is there a tutorial that we can use incorporating JSR168, ADF Faces and EJB3 in the same application? I also understand that there is a JSF-JSR168 bridge available. Can you provide some pointers here? Where can we find it? Would we be able to use it in jDeveloper 10.1.3.5?
    Regards

    Matt,
    The only way to associate an "x-axis" with a signal in the Write Data VI would be to feed it waveforms, which are constrained to use time as the x-axis unit. There is really no way around this, so in my opinion, the best solution for you would be to use the "rows are channels" conversion and write the frequency and amplitude values to the file independently. Then when you read the file in DIAdem, take the two channels and build a graph out of them there.
    Regards,
    E. Sulzer
    Applications Engineer
    National Instruments
    E. Sulzer
    Applications Engineer
    National Instruments

Maybe you are looking for

  • Table relating site and bank

    Hi Experts,    Using the Site Id I need to get the bank number(bank key) . I tried getting customer number using site from KNA1 table and using customer number tried to find bank number using knbk table. But the KNBK table has only around 500 entries

  • Cannot connect to the internet on WRT54GS

    I recently pressed the setup button on my router by mistake and lost connectivity to my wireless network. I upgraded the firmware and ran the Easy Link Connect this evening, the network is back in my listing but I still can't connect to the internet.

  • PowerView cannot connect to SSAS Database

    This will be latest problem with Power View that I will probably get no help with but you never know... SharePoint 2013 SQL Server 2012 SP1 I have reporting services and power view set up in SharePoint. I can create a data connection in SharePoint an

  • Does Apple plan to have exchagable Battries

    Does Apple have any plans on having battery packs for the MacBooks?  I was wondering, since if you go on a long flight and want to use the MacBook to watch movies, after so long, you will run out of juice.  I know that even if you could swap battery

  • ADE doesn't start on windows 7,

    After the installation of ADE without error, I'm able to start ADE. But after restart of my PC I'm not able to start ADE. ADE doesn't start and no error messages appears. I can see ADE started in the "Windows task" but after few second ADE dissapears