How to read a byte data from maxdb data base

Dear All,
I have a issue in reading the data from database table.
I have a column named as templateData which contains the byte data (biometric template data, which comes from fingerprint device) which is DataType of LONG and CODE of BYTE.
I am not using the below to get the template data
Connection con = null;
  Statement stmt = null;
  ResultSet resultSet = null;
byte[] DbBioData = new byte[1024];
InitialContext ctx = new InitialContext();
   if(ctx == null)
     throw new Exception("Boom - No Context");
   DataSource ds = (DataSource)ctx.lookup(db_drvstr);
   con = ds.getConnection();
   stmt = con.createStatement();
   resultSet  = stmt.executeQuery(db_query + " where SUBJECT_ID='"+ username +"'");
   if(resultSet.next())
    DbBioData = resultSet.getBytes(1);
    _loc.infoT("verify", "verify::Got BioData From MAXDB" +DbBioData );
    loc.infoT("verify", "verify::Query is: " +dbquery + " where SUBJECT_ID='"+ username +"'" );
But I am not getting the proper data, could anyone please tell me the way to read the biometric data from data base table.

Hi Kishore,
is it me or is there no query definition in that code?
I see that you concatenate a "db_query" with a string to make up a WHERE clause, but the db_query is nowhere defined before.
So at least you should provide something like
stmt = con.createStatement("SELECT templateDate FROM <tablename> ");
before you do anything with the query.
Besides this: have you ever heard of SQL injections? Try to use BIND-variables instead of concatenating strings. Otherwise your application will spend much time just with parsing your queries...
Hmm... possibly the best thing you could do about this is to read the JAVA manual for MaxDB:
<a href="http://maxdb.sap.com/currentdoc/ef/2de883d47a3840ac4ebb0b65a599e5/content.htm">Java Manual (SAP Library - Interfaces)</a>
Best regards,
Lars
Edited by: Lars Breddemann on Dec 17, 2007 1:12 PM - corrected link

Similar Messages

  • How to compute data from different data sources?

    All we are doing with data is from one single datasoure, which could be from oracle or sql server or a excel table, the issue is how could we combine these data from different data source with SQL?
    Example: i need some data from Sale Table in Excel and some data from Custumer Table in oracle, how could SQL complete this mission? Solutions are welcomed and appreciated.
    消息编辑者为:Datathinker from Raqsoft

    Hi,
    This forum is dedicated to SQL Developer Data Modeler product.
    You might search for solution in general questions forum.

  • How can I see website data from itouch 4th generation?  My 8 yr old may have been on inappropriate sites and I need to see the data from website data stored on the itouch.

    How can I see website data from itouch 4th generation?  My 8 yr old may have been on inappropriate sites and I need to see the data from website data stored on the itouch.

    There is no way to see where he has been.
    Go into Settings > General > Restrictions > Safari and turn it off. Then add the MacGruff browser from the app store. After that go back to Restrictions and turn off the ability to add apps.

  • Code for how to read an integer array from the command prompt...

    hello,
    Could anyone give me the code for how to read an integer array from the command prompt...its very urgent!..

    If you are using a recent version of Java (5 or later) you can use Scanner:
    http://java.sun.com/javase/6/docs/api/java/util/Scanner.html
    That page has some example code on it, too.

  • How to Read a CAB File from JAVA?

    Hi,
    Anyone knows how to read a CAB File from java. I need to read a property file of txt file that is packaged in CAB file & then based on that, I have to do processing. Is there anyway to do it.
    I had tried using java.util.zip.ZipFile Class, but it does work for JAR, but not for CAB.
    siva.

    Perhaps there's something in the Cabinet SDK that will help:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncabsdk/html/cabdl.asp

  • How to view "date from" and "date to"

    Hi,
    I have loaded EMP data. In the mapping "date from" and "date to" are visible. But these fields are not seen when I display the EMP data.Can someone please tell me how to view these fields?
    Thanks,
    Williams

    I got your question . Please find my understandings .
    In the transformation Please check weather routine or formula is written which is stopping the dats
    to be updated to the target .
    I mean data is there in the source but if its not updating to target it seems some rules have been set up in the transformation . Please check .
    Assign marks is the best way to appreciate help

  • How can delete my iphone5 data from the date its restored?

    how can delete my iphone5 data from the date its restored?

    it's unclear what you mean
    if you wish to remove your iphone5 data you connect it to iTunes on the computer and click the restore button and choose restore to factory defect

  • On my mac, photoshop cc "save as" removes capture date from exif data. How do I prevent this?

    On my mac, photoshop cc "save as" removes capture date from exif data. How do I prevent this?

    You had to reinstall CS6 after cancelling the CC as both were from the same Adobe ID. You can always use & keep both CC & CS6 together.
    Please refer to the blog:
    Can I install both CS6 and CC apps on my computer? « Caveat Lector
    Other references are :
    Creative Cloud Help | Install, update, or uninstall apps
    What is the difference CS6 & CC Versions?
    Regards
    Rajshree

  • How to read line number text from PDF using plugin?

    Hi, I would like to know how to read line number text from PDF using plugin?
    Thanks in advance.

    Ok, some background reading of the PDF Reference will help you understand why this is so difficult. PDF files are not organised into lines. It is best to think of each word or character on the page as being a graphic with its own position. The human eye sees lines where a series of graphics (words) are roughly in the same horizontal region.
    In the general case it is difficult or even impossible to answer this. You may have columns with different spacing (but the PDF stores no information on what is a column). You may have subscripts and superscripts. You may have text in graphics coinciding with other text. Commonly, there may be titles, headings or page numbers which are just ordinary text and might count as lines.
    That said, what you need to do is extract the text on the page and its positions. The WordFinder APIs are the way to do that. Now, sort all the words out, using the Y coordinates and size to try and guess what makes a "line". Now you are in a position to find the text (divided into words, not strings) and report the "line number" you have estimated.

  • How to change value date from posting date to net due date

    Hi Gurus,
    My client wants to change value date from posting date to net due date. currently posting date is considered as value date but in future client wants to change value date to net due date of documents.
    1. what configurations need to be maintained to change value date from posting date to net due date.
    2. Will these changes effect automatic payment run.
    Thanks and Regards,
    Suresh

    Hi Suresh,
    In Future
    While posting the documents you can mention the value date as due date of the documents.
    For already posted documents
    You can change the value date to net due date.
    If the value date is display mode i.e. if you are not able to change the value date in FB02 (Document Change Mode), use OB32 transaction and make value date field as eidtable (BSEG-VALUT).
    In OB32 transaction enter all the required fields like Account type, transaction type, company code and finally activate the Field can be changed check box.
    But not sure, whether we can change the value date to previous date or not?
    This would help you..
    Regards,
    Praisty
    Edited by: Praisty on Jul 28, 2009 9:56 AM

  • Import data from a ooo.base to Derby

    Hi,
    I need to import data from a ooo.base to Derby.
    I am not an expert in this kind of work, but:
    - I prepared the data in a spreadsheet, exporting them from the ooo.base.
    - And I read in the documentation that Derby allow to import data with the statement:
    SYSCS_UTIL.SYSCS_IMPORT_DATA(.....);Now I am trying to do things in this way, but I am not able to write correctly the statement above.
    I tried it in some different way and always :
        exmples:
    CALL SYSCS_UTIL.SYSCS_IMPORT_DATA(NULL, 'STAFF', null, '1,3,4', 'data.del', null, null, null,0);
    CALL(" SYSCS_UTIL.SYSCS_IMPORT_DATA(NULL, 'STAFF', null, '1,3,4', 'data.del', null, null, null,0)");but the NetBeans IDE evidence shows that this statement is with error of syntax_.
    I spent much time to understand how to write this SQL procedure, so I would like some help to be able to do it.
    Thank you in advance
    Regards
    Angelo Moreschini

    Hi jshell,
    it is nice to hear from you again.
    After I read your suggestion I looked better on the manuals of Derby.
    Derby has such tools that you supposed they have; they are named ij, but they work from the command line and they are not easy to use.
    The procedure to import/export data of Derby can be used from the ij utility or inside a Java program.
    The procedure to import and export data of Derby are in the file derbytools.jar, and this file have to be in the classpath if you want to use them.
    Putting derbytools.jar in the classpath I could execute the code that I post down (to benefit of others that can be interested) without errors:
                PreparedStatement ps = connection.prepareStatement("CALL SYSCS_UTIL.SYSCS_EXPORT_TABLE (?,?,?,?,?,?)");
                ps.setString(1, null);
                ps.setString(2, "STAFF");
                ps.setString(3, "staff.dat");
                ps.setString(4, "%");
                ps.setString(5, null);
                ps.setString(6, null);
                ps.execute();Thank you for the advice
    regards
    Angelo.

  • What is the purpose  of Date From and Date To In Oracle HRMS ?

    hi
    I have doubt on
    What is the purpose of Date From and Date To In Oracle HRMS?
    Thanks

    Where do you see these fields? Please give full details (eg, the navigation path).
    If you're referring to Effective Start Date and Effective End Date (effective_start_date, effective_end_date) these are two fields that appear on many HRMS entities. They're used to store dated history over time. For example:
    14-Jan-2009 to 19-Apr-2009 - Pam Stephens
    20-Apr-2009 to date - Pam Erickson
    In this example Pam got married on the 20th April 2009 and changed her surname from Stephens to Erickson. Here the history of changes are kept so that if we date-track to any time prior to the 20th April 2009 we'll see Pam Stephens and if we date-track on or after the 20th April 2009 we'll see Pam Erickson.
    Check out the following Oracle Support article for more information:
    How Date Track Works [ID 177733.1]

  • Exception thrown while trying to acquire data from Profile Data Control

    I created a new WebCenter Portal Application (with JDeveloper 11.1.1.4).
    Then tried to acquire data from Profile Data Control through getProfile().WCUserProfile to create a read-only form with profile data.
    After deploying (to internal WLS) and running I got a popup saying:
    *Exception [EclipseLink-7060] (Eclipse Persistence Services - 2.1.2.v20101104-r8475): org.eclipse.persistence.exceptions.ValidationException Exception*
    Description: Cannot acquire data source [java:comp/env/jdbc/WebCenterDS].
    Internal Exception: javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: While trying to lookup 'jdbc.webcenter.CustomPortalDS' didn't find subcontext 'webcenter'. Resolved 'jdbc'; remaining name 'webcenter/CustomPortalDS']; Link Remaining Name: 'jdbc/webcenter/CustomPortalDS'
    The question is how can I create such a data source to acquire data needed?

    Hi, there's two ways, in both ways you need use the user <PRE>_WEBCENTER that RCU create.
    1 - You can go in your console and create de dataSource, as Yannick sad. You can use your production database if you want get some more real tests, or you can get some develope database and run RCU. You can copy the configuration from you WLS server that are installed webcenter to make this easy.
    2 - In develop mode you can just create a database connection name "WebCenter", just like sad here:
    http://download.oracle.com/docs/cd/E17904_01/webcenter.1111/e10148/jpsdg_people.htm#BABICGCH

  • Retrieve data from LONG data types

    Hi,
    I am trying to retrieve data from LONG data types with following query.
    select * from all_views where upper(text) like '%TABLE_NAME%';
    In above query text column has long datatype. This query works for varchar, but it returns an error for long.
    How can I modify the query so that it returns data from text column.
    Thanks in advance,
    Aditya

    You can't use any expressions against LONG. One solution is to use PL/SQL:
    BEGIN
        FOR v_rec IN (SELECT * FROM ALL_VIEWS) LOOP
          IF UPPER(v_rec.text) LIKE '%TABLE_NAME%'
            THEN
              DBMS_OUTPUT.PUT_LINE(v_rec.text);
          END IF;
        END LOOP;
    END;
    /SY.

  • Powerpivot Error on Refresh -- "We couldn't get data from the data model..."

    I'm using Excel 2013 and Windows 8.1.  I have a spreadsheet I've been using for over a year, and I've just started getting this error message when I try to refresh the data.
    "We couldn't get data from the Data Model.  Here's the error message we got:
    The 'attributeRelationship' with 'AttributeID' - 'PuttDistCat9' doesn't exist in the collection"
    Any idea how I can fix this problem?  I haven't changed anything related to that particular attribute.  All the data is contained in separate sheets in the workbook, so there are no external sources of data.
    Thanks.
    Jean

    Thanks for all the suggestions.
    I found a slightly older version of the spreadsheet that still refreshes properly, so I don't think I have any issues with the version of Excel or Power Query.  (I've had this same error before, and I believe I applied the hotfix at that time.)
    I think this problem started after I updated a number of the date filters in the pivot tables.  I haven't made any changes to the data model, and the only updates I've made were to add data (which I do all the time), and to change the date filters on
    the pivot tables.
    As suggested, I added a new pivot table querying one table (the table with the attribute that shows up in the error message), and it worked fine.  I can also refresh this pivot table.
    Then I tried adding a pivot table which went against several tables in the data model (including the table in question).  The pivot table seemed to return that data properly.  However, when I tried to refresh it, I got the same error message ("we
    couldn't get data from the data model..."). 
    Dany also suggested running the queries one at a time to see which one is in error.  Without checking all the pivot tables, it appears that any which use the table "HolePlayedStrokes" generate the error (this is the table with the attribute
    mentioned in the error message).  Pivot Tables without that particular table seem to refresh OK.  Unfortunately, that is the main table in my data model, so most of the pivot tables use it.
    Any other suggestions?  I'd be happy to send a copy of the spreadsheet.
    Thanks for all the help.
    Jean

Maybe you are looking for

  • PDF portfolio works in what versions?

    How do I know what versions or Acrobat or Reader my PDF portfolio will work in? Will it work in reader?

  • I've lost the specific page url's when browsing a site

    When I move from page to page on my website (www.Self-to-self.com) the address bar no longer shows the specific page path so I can't copy & paste for any specific page/article now. This information came back for no apparent reason for awhile, and now

  • ESS/MSS Multiclient Szenario

    Hello, The scenario we want to build is: - Have one portal - Have one J2EE Engine - Have one backend with TWO clients (e.g. 100 and 200) - Have ESS/MSS running and connect to both clients (multiclient szenario) What has been done so far: 1) Copied fo

  • Converting iPhone Movies to a Windows Viewable Format?

    I have a couple of videos that I recorded on my iPhone 4S (iOS 6.0.1) that I would like to share with family members who are Windows users (7 or XP).  The iPhone created them in ".mov" format.  What is the best way to convert these to a format that w

  • Autosave temporary file security--Where do they go once a doc is formally saved?

    Hello! I recently replaced my failed PowerMac G5 with a new iMac, and upgraded from Tiger to Snow Leopard in the process. File security is very important to me. I noticed that Snow Leopard will automatically save a temporary file until the original f