Selecting data on basis of string from ms access using database toolkit

i want to read data from ms access in labview using database toolkit,but the problem is that i want to enter/select pipetype and other fields must be filled from the database with respect to pipe type intead of indexing(1,2,3,....)..kindly tell me how to make my selectio from database depending on pipe type.
Attachments:
database.zip ‏324 KB

What is pipetype and what exactly do you mean by 'selecting data on basis of string'.

Similar Messages

  • Retrieving data from Microsoft Access using JDBC

    I noticed that when i tried retrieving data from Microsoft access using JDBC, I realised that it was throwing SQLException when the column names were two word with spaces between them, e.g. Date Birth. But after i removed the space from the column names, my SQL queries were retrieving data. Was it because of the space in between the column names of the table?

    Yeah, as far as I know having two word column names isn't allowed in SQL. There might be some way to escape it, but generally it's sensible to avoid it.

  • HOw to connect and extract the data from MS ACCESS SOURCE(Database) system

    Hi experts ,
    I have to extract the data from MS access database system using JDBC adapter will it work if Yes HOW?

    Hi Sushma,
    how to configure sendor JDBC adapter ..
    Select adapter type is JDBC..
    Give the Transport Protocol:.JDBC 2.0 (Example)............
                Message Protocol:...JDBC...........
                IAdapter Engine : Integration Server
    Processing Parameters..
    Quality of service.....(Example)..Exactly once
    Poll Interval .... Example ..10
    Query Sql statement..Example ..select * from XXXXX
    Document Name.....
    Update Sql stetement.....
    Thanks,
    Satya
    Reward points if it id useful...

  • Problem loading data to Hyperion Planning app. from Oracle EBS using ERPi

    I'm using ERPi to load data to Planning application from EBS.
    I have configured Source and Target, created import formats, location, data load rules etc.
    When I'm running data load rule it is showing that data is imported and exported sucessfully. I can see data in the right format in data load workbench. ODI shows process completed sucessfully. But still there is no data loaded in Planning.
    Even AIF_HS_BALANCES staging view in ERPi repository shows correct data.
    Can some one tell me what could be the problem.
    Or where I can see logs for the data load step for Planning.
    ODI operater logs are not very clear to me. Same for log tables in ODI work repository.

    Hi Tony
    Apologies for the delay (my email spammed the notification that you had replied, helpful!!). When you say that you have done it but discourage accessing the tables directly how did you achieve this? Were you just careful which data intersections your selected from the tables (e.g. always base level data so it is stored not calculated)?
    I have used the HFM relational tables a couple of times to make use of the metadata that they contain but not tried to get data before.
    Regards
    Stuart

  • Unable to read data in Excel 2010/2013 from encrypted Access 2010/2013 database

    A customer has an Access database (.accdb), which was encrypted/given a database password in Access 2013. It should be possible to read that data from Excel 2010/2013, but when clicking on Data-->From Access
    and the correct path is put in and the correct database password has been entered, Excel just keeps prompting for the database password. This happens with both Excel 2010 and 2013.
    The database password supplied is correct as evidenced by opening the database in Access 2013 using the same database password.
    A colleague in a separate company has found that a separate .accdb file he has recently encrypted also has the same problem as above, yet a .accdb file encrypted ages ago
    is readable from Excel.
    How do I get Excel 2010/2013 to read the data from the encrypted .accdb file, please?

    Since Access 2010 the encryption algorithm has changed:
    Source
    Follow the next steps to apply an encryption method that will allow you to (programmatically) connect to the database:
    1. Decrypt the database
    2. Change the encryption method:
        - In Access Options select 'Client Settings'
        - Scroll down to section 'Advanced'
        - 'Encryption Method': select option 'Use legacy encryption (..'
        - Click 'OK'
    3. Encrypt the database
    Hope this helps.
    Emiel Nijhuis

  • How to show data in a matrix form from a table using SQL

    Dear Friends,
    I have a table with three columns with the following data:
    Market, Product, Date, Value
    Market-A Product-A 01/01/04 34
    Market-A Product-A 01/02/04 33
    Market-A Product-A 01/03/04 67
    Market-A Product-A 01/04/04 64
    Market-A Product-B 01/01/04 34
    Market-A Product-B 01/02/04 36
    Market-A Product-B 01/03/04 77
    Market-A Product-B 01/04/04 32
    Market-B Product-C 01/01/04 25
    Market-B Product-C 01/02/04 56
    Market-B Product-C 01/03/04 45
    Market-B Product-C 01/04/04 68
    Market-B Product-D 01/01/04 78
    Market-B Product-D 01/02/04 75
    Market-B Product-D 01/03/04 32
    Market-B Product-D 01/04/04 35
    I have a requirement where in I have to filter the products based on market and then show in the following format on the screen:
    After filtering based on Market-A (eg) the data should look like:
    01/01/04 01/02/04 01/03/04 01/04/04
    Product-A 34 33 67 64
    Product-B 34 36 77 32
    Kinldy suggest how can I write a query to get the data in this format using SQL
    Thanks & Regards,
    Vinay

    scott@ORA92> -- test data:
    scott@ORA92> SELECT * FROM a_table
      2  /
    Market-A Product-A 01/01/04         34
    Market-A Product-A 01/02/04         33
    Market-A Product-A 01/03/04         67
    Market-A Product-A 01/04/04         64
    Market-A Product-B 01/01/04         34
    Market-A Product-B 01/02/04         36
    Market-A Product-B 01/03/04         77
    Market-A Product-B 01/04/04         32
    Market-B Product-C 01/01/04         25
    Market-B Product-C 01/02/04         56
    Market-B Product-C 01/03/04         45
    Market-B Product-C 01/04/04         68
    Market-B Product-D 01/01/04         78
    Market-B Product-D 01/02/04         75
    Market-B Product-D 01/03/04         32
    Market-B Product-D 01/04/04         35
    scott@ORA92> -- query:
    scott@ORA92> SELECT product,
      2           SUM (DECODE (the_date, to_date ('01/01/2004', 'mm/dd/yyyy'), value)) AS "01/01/04",
      3           SUM (DECODE (the_date, to_date ('01/02/2004', 'mm/dd/yyyy'), value)) AS "01/02/04",
      4           SUM (DECODE (the_date, to_date ('01/03/2004', 'mm/dd/yyyy'), value)) AS "01/03/04",
      5           SUM (DECODE (the_date, to_date ('01/04/2004', 'mm/dd/yyyy'), value)) AS "01/04/04"
      6  FROM   a_table
      7  WHERE  market = 'Market-A'
      8  GROUP  BY product
      9  /
    Product-A         34         33         67         64
    Product-B         34         36         77         32
    scott@ORA92>

  • Extracting a string from a URL using regular expression

    Given the following expression:
    "^.*" + "http://www\\.xyz\\.gov/class/"+ "([0-9]+)";
    I would expect that if i pass the string "http://www.xyz.gov/class/17950142?dopt=abstract" it should match to everything up to the ? character.
    Why does it not do that in the following code snippet?
    public class RegexTester {
      private final static String EPR_TYPE_1 = "http://www\\.xyz\\.gov/class/";
      public static void main(String args[]){
      String testRegex = "^.*" + EPR_TYPE_1 + "([0-9]+)";
      String testString = "http://www.xyz.gov/class/17950142?dopt=abstract";
      Pattern PATTERN = Pattern.compile(testRegex, Pattern.CASE_INSENSITIVE);
      Matcher m = PATTERN.matcher(testString);
      if(m.matches()) {
      System.out.println(m.group(1));
      }else{
      System.out.println("No match");
    I tried the same expression and string in an online regex tester and it seems to work See example here RegExr

    index4 = line.indexOf( "@photo" );
    String strUid = line.substring(index4,-10);I assumed that index4 would be around 30 as it starts
    at around the 30th character in the string line. And
    then if i wanted the 10 characters preceding this to
    use -10.
    It throws an out of bounds exception thoughIt will as the 2nd parameter is -10 which is before the start of the string
    you need
    String strUid = line.substring(index4 - 10 , index4);

  • How to Get Current Date from MS Access in a Select Statement

    From a java method, I want to use JDBC to get the current date from MS Access. In Oracle I would do "select sysdate from dual", but I can't figure out how to do it in MS Access. Here are some of my attempts. I have a table in my Access db called PARM.
    //        String sql = "SELECT '0', NOW() FROM PARM";
    //rs.next() is false
    //        String sql = "SELECT NOW() AS CURR_DT FROM PARM";
    //rs.next() is false
    //        String sql = "SELECT DATE() AS CURR_DT FROM PARM";
    //rs.next() is false
    //        String sql = "SELECT NOW()"; 
    //StringIndexOutOfBoundsException: String index out of range: -1
    //        String sql = "select { fn now() } from parm";
            String sql = "SELECT Date()";
    //java.lang.StringIndexOutOfBoundsException: String index out of range: -1
            ResultSet rs = stmt.executeQuery(sql);
            if (rs.next()) {
                return rs.getString(1);
            } else {
                   return null;
              }

    Why are you getting it as a String? You should be getting it as a timestamp.
    Although getString works for me too. There is something else wrong that you haven't shown.
    Here is some shoddy, but simple, test code that demonstrates it working.
    import java.sql.*;
    public class Test{
      public static void main(String args[])throws Exception{
        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
        Connection c = DriverManager.getConnection("jdbc:odbc:stats");
        Statement s = c.createStatement();
        ResultSet rs = s.executeQuery("SELECT NOW()");
        while(rs.next()){
          System.out.println(rs.getTimestamp(1));     
        rs.close();
        s.close();
        c.close();
    }

  • Is there any difference , selecting particular string from left to right

    hi
    we have a problem for selecting a string ...
    we selecting a string from JEditorPane ..
    useing JEditorPane.getselectedText();
    After selecting text we adding some tags to selected text
    it working fine when we are selecting from right to left .
    when we are selecting text left to right it's not working .but
    we geting selected text in both times(right to left, left to right) ..
    pls help very urgent

    I can only guess... But if it is true that you mean by 'selecting right to left' that the selection started at the right and ended on the left. Perhaps you are storing values from JEditorPane.getSelectionStart() and JEditorPane.getSelectionEnd(). If this is true, it could mean the failure you have in your code, because the number for getSelectionStart() is higher then getSelectionEnd() if you started from right and lower when you started from left. That could cause your problem.
    You could fix this for example by this:
    if (MyEditorPane.getSelectionEnd()<getSelectionStart())
    change values.
    or vice versa, hope that helps...

  • How to get selected data in AdvancedDataGrid

    I have an advanced data grid with selection mode set to multiple rows. I need to highlight the selected rows differently based on certain criteria on the row data. For that I define my own selectionIndicatorFunction. The question is: how do I know the current selected data in the function? I tried to use the selectedItem field, however it is NULL; field selectedCells give all the selected rows, not the latest selected row.
    Can anybody enlighten me how can I get the most recent selected row data? I'm using flex 4.5. Thanks in advance.

    Now in the Servlet we can get the same bean by this code:
    PageContext pageContext = JspFactoryImpl.getDefaultFactory().getPageContext(this, request, response, null, true, 8192, true);
    UserBean userbean = (UserBean)pageContext.getAttribute("userbean", PageContext.SESSION_SCOPE);
    String userid = userbean.getUsername();
    For this code to work it is needed to import 2 files:
    import org.apache.jasper.runtime.JspFactoryImpl;
    import javax.servlet.jsp.PageContext;
    The JspFactoryImpl is in jasper-runtime.jar file provided in tomcat dir.It seems to me that you are exactly knowing what you are doing :-(
    You can get a Bean stored in a Session by
    request.getSession().getAttribute("userbean");
    In the login.jsp page for example we have the code
    <jsp:useBean id="userbean" scope="session"class="com.newproj.UserBean" />
    <jsp:setProperty name="userbean" property="*" />the jsp:setProperty is not called when you click on the submit button
    if fills the bean with the request values from the previous request.
    andi

  • What makes a field eligible for selecting data in a subreport?

    Hello,
    I have posted the following question to [StackOverflow|http://stackoverflow.com/questions/4366702/what-makes-a-field-eligible-for-selecting-data-in-a-subreport], but it has so far generated no replies. I decided to cross-post it here to see if I could get a better result.
    The TL;DR of it is that I have a field which I should be able to link in my Subreport, but it does not appear, and I was wondering what I need to do to make it appear.
    I have a Crystal Report I'm trying to recreate from scratch after an update from VS2008 to VS2010 caused it to implode horribly.
    I've gotten most of the way through, but I'm at a stage where I'm linking a field in the Main Report to a corresponding field in the Subreport.
    I have set up a bunch of Database fields in the Subreport, I've added the table I want, TableA, I've linked it up as everything was linked in the original report, with TableA at the head of the linking chain, so that all the rows I want can be derived from the result of that first query ( Actually, all of the links from the original Report were red in the Database Fields linking dialog, whereas mine are a bit rainbow-y. All the links in TableA are red, though... _ )
    In the "Subreport Links" dialog, I have an integer which I know is being pulled from the database correctly. I've added it in the "Fields to link to" listbox, and selected the newly-created parameter in the "Subreport parameter to use" combobox. I've ticked the "Select data in subreport based on field" checkbox.
    The database field I want to link to then does not appear in the second combobox.
    Another integer field in TableA shows up fine in the "Select data..." combobox (and is linked to another field being passed in), so I don't know why these two integer fields, which are equally important, and exist on the same level, on the same table, are being treated differently by the report designed.
    Any ideas what I'm doing wrong?

    Here is what I'd do:
    1) Download CR 2008 eval designer from here:
    http://www.sap.com/solutions/sapbusinessobjects/sme/freetrials/index.epx
    2) Try the linking in CR 2008 designer
    3) If it does not work there, ask why not in the [CR design|SAP Crystal Reports, version for Visual Studio; forum.
    4) If you get the linking working in the CR 200 designer, try to run the report in your VS2010 app (after ensuring the report woks as expected in CR 2008).
    5) If (4) above works out for you, please let me know as this may be an issue with CRVS2010.
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • Reconstructing a string from a database retrieval

    What is the correct way to retrieve data such as a string from a database? If I inputing data to the database like this...
    std::string inputString = "hello world";
    data.data = &inputString;
    data.size = inputString.size();
    ret = dbp->put(dbp, NULL, &key, &data, DB_NOOVERWRITE);
    and retrieving it like this...
    ret = dbp->get(dbp, NULL, &key, &data, 0);
    what do I need to do with 'data' to recover my string?
    std::string outputString = ??????;
    Thanks in advance.

    I'm using c++, just didn't realize that there was a db_cxx.h. I still have the same problem though. Here is my test code...
    #include <sys/types.h>
    #include <stdio.h>
    #include <string.h>
    #include <db_cxx.h>
    #define DATABASE "access.db"
    int main()
         Db db(NULL,0);
         int ret;
         db.open(NULL, DATABASE, NULL, DB_BTREE, DB_CREATE, 0);
         std::string KEY = "THE KEY";
         std::string DATA = "THE DATA: A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z";
         Dbt key(&KEY, KEY.length());
         Dbt dataIn(&DATA, DATA.length());
         if((ret = db.put(NULL, &key, &dataIn, DB_NOOVERWRITE)) != 0)
              db.err(ret, "DB->put");
         Dbt dataOut;
         if((ret = db.get(NULL, &key, &dataOut, 0)) != 0)
              db.err(ret, "DB->get");
         std::string outStr = *(std::string *)dataOut.get_data();
         std::cout << outStr.c_str() << std::endl;
         if((ret = db.close(0)) != 0)
              db.err(ret, "DB->close");
         return 0;
    If I run this twice, the first time through everything behaves as I believe it should. The database gets created and the output is "THE DATA: A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z". However, the second time I run it, 'put' returns an error due to an existing identical key/data pair (as it should), but the string is just junk as if the pointer is not pointing to the correct memory location. Since 'put' returned the appropriate error message, I expect that the database is fine, and the problem is somewhere in the 'get' function or conversion back to a string. Any ideas?

  • Error while trying to retrieve string from STDIN

    Hello,
    I want to read a string from input I use this code but getting compilation error:
    String s = System.in.readLine();
    Error is:
    symbol : method readLine ()
    location: class java.io.InputStream
    String s=System.in.readLine();
    ^
    1 error
    what's going wrong?
    System is Linux Slackware 9.1
    Thanks,
    Regards.

    Yeah, don't use readLine if you just want a single character. Actually you don't need the BufferedReader at all unless you want to do buffering for a reasoon other than to make it easy to read a line at a time. (Of course, buffering is a good thing anyway, but it's not strictly relevant to grabbing a character.)
    Re: requiring enter to be pressed, that may have a lot to do with your shell as well.
    try {
      Reader in = new InputStreamReader(System.in);
      int theChar; // you need an int because the read method returns values
                   // beyond the bits required for a char, to denote end of file
      while((theChar = in.read()) > -1) {
        System.out.println("Char read: " + (char) theChar);
      System.out.println("end of file reached");
    } catch (IOException e) {
      e.printStackTrace();
    }

  • Connected webpart - add item with selected data

    Hi!
    I have a page with connected web parts.
    Example:
    List one: Companies
    a address List with companies
    List two: Employees
    A list with employees and a relation to companies (Company name).
    On the view item on companies i have list Employees connected. When i add an item i would like to have the Company name selected in the drop down.
    I have seen examples on using JavaScript but this doesn´t work in SharePoint 2013. Anyone with a solution for this, Jslink perhaps?

    Hi,
    According to your post, my understanding is that you wanted to add item with selected data in connected webpart.
    I recommend to use lookup column in the Employees to add a relation to companies.
    You can check “Yes” under “Require that this column contains information”. Then you need to select an company when you add a item.
    The result is as below:
    If you want to set the defult value for the lookup column, you can use InfoPath and no code.
    For more information, please refer to:
    SharePoint 2010 - Set default value for a lookup column using InfoPath and no code
    In addition, a simple add-on(SharePoint Default Value Add-On) which inject a "default value" section into "Create Column" dialog, seems to be a solution.
    Thanks,
    Linda Li
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Linda Li
    TechNet Community Support

  • Getting image from Microsoft Access database to display in browser

    Hey! anybody please help me
    I've been trying with no success to get an image from a microsoft access database
    so far this is what i have:
    package Servlets;
    import java.io.*;
    import java.net.*;
    import utils.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class serv extends HttpServlet {
        java.sql.ResultSet rs=null;
        ClsConexion conexion=new ClsConexion("Nedermex");
        protected void processRequest(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            conexion.conectate("1", "1");
            rs=conexion.obtenRegSelect("SELECT * FROM Flores WHERE ID=1");
            try{
                rs.next();
                System.out.println("sadfsadf " + rs.getString("ID"));
            }catch(Exception e){
                e.printStackTrace();
            String ubicGIF = request.getParameter("ubicGIF");
            if((ubicGIF==null) || ubicGIF.length() == 0 ){
                indicarError(response, "Archivo de imagen no establecido");
                return;
            //String archivo = getServletContext().getRealPath(ubicGIF);
            try{
                if(rs.next()){
                    System.out.println("sadfsadf " + rs.getString("ID"));
                    BufferedInputStream ingreso = new BufferedInputStream(rs.getBinaryStream("Imagen"));
                   // BufferedInputStream ingreso = new BufferedInputStream(new FileInputStream(getServletContext().getRealPath("1.jpg")));
                    ByteArrayOutputStream flujoBytes = new ByteArrayOutputStream(512);
                    int byteImagen;
                    while ((byteImagen= ingreso.read()) != -1){
                        flujoBytes.write(byteImagen);
                    ingreso.close();
                    String indiPersistencia = request.getParameter("usePersistence");
                    boolean usePersistence = ((indiPersistencia == null) || (!indiPersistencia.equals("no")));
                    response.setContentType("image/jpeg");
                    if(usePersistence){
                        response.setContentLength(flujoBytes.size());
                    flujoBytes.writeTo(response.getOutputStream());
            }catch(IOException ioe){
                indicarError(response, "Error: " + ioe);
            }catch(java.sql.SQLException sqle){
                indicarError(response, "Error: " + sqle);
        public void indicarError(HttpServletResponse response, String mensaje) throws IOException {
            response.sendError(response.SC_NOT_FOUND, mensaje);
        // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
        /** Handles the HTTP <code>GET</code> method.
         * @param request servlet request
         * @param response servlet response
        protected void doGet(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            processRequest(request, response);
        /** Handles the HTTP <code>POST</code> method.
         * @param request servlet request
         * @param response servlet response
        protected void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            processRequest(request, response);
        /** Returns a short description of the servlet.
        public String getServletInfo() {
            return "Short description";
        // </editor-fold>
    }i have a class Conexion wich controls the connection and resultsets
    As you can see, i tested accessing a jpeg file: 1.jpg with FileInputStream, and it works perfectly, but when i try to get an image from Microsoft Access using the resultset the way i did, the browser shows the following message
    The image �http://localhost:8084/Nedermex/serv� cannot be displayed, because it contains errors.
    My table in the database in Access is configured as following
    FieldName::::::::::::::DataType
    ID::::::::::::::::::::::::::::::Number
    Imagen::::::::::::::::::::OLE Object
    Now, when i insert an image in the Imagen field, i select the option "Create from file" and select the jpg file (the one that worked with the FileInputStream) and uncheck the Link option (to save the data in the db
    maybe there is something wrong with the sizes or something....
    please help me here!!!
    thank you!

    Yes it is an sql question
    Consider this as my condition need to fetch records collected in database on 16-4-2012 
    Table name =TEST_REPORT
    i have passed the following query
    Select Serial_Number,System_Date,System_Time,Department,O​perator_Name,Serial_Number,Test_Case,Pass_Fail from TEST_REPORT  where System_Date = 4-16-2012, it displays the entire record from database. i have my vi along with this mail.
    Attachments:
    Report Viewer.vi ‏24 KB

Maybe you are looking for

  • More Guru Winners for February 2015 in the T-SQL category and many others!

    It's been a busy week that also saw the TECHNET WIKI SUMMIT 2015 Then we had the results for February's TechNet Guru competition ALSO posted! http://blogs.technet.com/b/wikininjas/archive/2015/03/19/technet-guru-february-2015.aspx Below is a summary

  • Memory leak in solaris 2.5.1

    Hi, I have a multithreaded application running under Solaris 2.5.1 , all created threads are dettached , but even after i call pthread_exit() function, the allocated memory is not freed up, is it normal ? Solaris only freed up the allocated memory wh

  • Regarding initialization parameters

    Hai all, Can anybody please help me regarding this initialization parameters like 1.what is correct value (how to find) 2. indetail about each parameter 1._optimizer_mjc_enabled 2.max_dump_file_size 3.optimizer_index_caching 4.optimizer_index_cost_ad

  • Importing videos and photos error

    Hi,    I wanted to import all my pictures and videos from my iphone to my mac, but there seems to be a problem. An error message "iPhoto cannot import your photos because there was a problem downloading an image." shows this. Help please.    Thanks

  • Crystal Reports and UCCX

    I am running UCCX 8.0(2) and I am trying to connect Crystal Reports to the database but the documentation states only V11 will work is that really the case? We are not able to get Version 11 only Version14 is now available. Is there anyone running th