Help! Howto use the join function in a query with select distinct ?

Hi!
I have 2 tables. I want to select only 1 painting of each artists.
select distinct idartist
from tbl_artworks
where blah blah blah
order by rand()
how does the "join" function work for add: name, lastname, title, image and much more... i try... but i fail...
tbl_artists
idartist
name
lastname
1
Paul
Gaugain
2
Vincent
Van Gogh
3
Pablo
Picasso
tbl_artworks
idartwork
idartist
title
image
1
1
days of gods
image1.jpg
2
2
sunflower
image2.jpg
3
3
Dora maar au chat
image3.jpg
4
2
Sky
image4.jpg
5
3
La vie
image5.jpg

Getting a single random image for each probably requires a combination of sql and cf.  It would take someone smarter than me to do it with sql alone.  I would probably try something like this:
1.  Run a database query that gets all the images from all the artists.
2.  Run a Q of Q that gets a distinct list of artist ids.
3.  Loop through that list and run a Q of Q to get all the images for that artist.
4.  Still in that loop, use randrange (1 to the recordcount) to select a random record from your Q of Q

Similar Messages

  • How do I use the TRIM function in my Query?

    I have a field that has called AP.service_user_defined_1 that houses a Code the code is like Alpha Num ie "AA01" then it has about 30 to 40 whites spaces and then the description of what the code means. I need to have the description to show in my report I don't necessarily need the code but I do need the description I tried putting the TRIM Function in as below and it will not work what do I need to do to correct this?? I need help ASAP this is due today! Thanks for any help!
    SELECT DISTINCT
              A1.AUTH_NUMBER,
    PM.LAST_NAME,
              A1.AUTH_TYPE,
              A1.PLACE_OF_SERVICE,
              A1.OVERALL_STATUS,
              A1.CLOSED_REASON,
              A1.DENIED_REASON,
    Case
    when A1.DENIED_REASON in ('HS001','HS002') then 'MED NECESS'
    when A1.DENIED_REASON in ('HS004','HS005','HS006','HS007','HS008','HS013','HS014','HS016','HS017','HS019','HS020') then 'Admin Denial'
    when A1.DENIED_REASON is NUll and ap.advisor_decision = 'AAPPR' then 'Approved'
    else 'Unknown'
    end DENIED,
    A1.admit_primary_date,
    A1.service_admit_type AS "IP ADMIT TYPE",
    A1.service_user_defined_1 AS "OP Serv Type",
    Trim (leading ('AA01                 ',)from dual,
    ap.contact_date,
    AP.decision_date,
    AP.ADVISOR_DECISION,
    PM.PROVIDER_ID,
         A1.INSERT_DATETIME,
    TO_CHAR (A1.insert_datetime,'MONTH-YY')AS "Month",
    A1.admit_primary_date,
              A1.ACTIVE_PHYSICIAN_ADVISOR,
              MV.LINE_OF_BUSINESS
    FROM Windsoradm.auth_master a1
    INNER JOIN Windsoradm.auth_phys_advisor ap
    ON a1.auth_number=ap.auth_number
    INNER JOIN windsoradm.prov_master pm
    ON ap.seq_prov_id=pm.seq_prov_id
    LEFT JOIN windsoradm.note_master nm
    ON nm.seq_memb_id=a1.seq_memb_id
    INNER JOIN windsoradm.member_mv mv
    ON mv.seq_memb_id=a1.seq_memb_id
    Where mv.Line_of_Business <>'SFS'
    /*AND A1.PLACE_OF_SERVICE IN ('11','21','22','24')*/
    /*AND a1.active_physician_advisor = 'Y'*/
    /*AND (a1.closed_reason ='A06' OR a1.closed_reason is Null)*/
    AND a1.insert_datetime Between To_Date ('04/01/2012', 'MM/DD/YYYY') and To_Date ('04/30/2012','MM/DD/YYYY')
    ORDER BY 1

    I don't know how to use this within my query I put it in as you suggest and get an error: I'm new to these functions can you show me how within my query I should code it? The field Name is A1.service_user_defined_1 There are about 50 Different Codes in a Drop down list within the application that have a different Code and Different Description it appears that the Codes are all 4 character alpha numeric then about 25 to 45 spaces and then the description. Please show me in my code how to get this I wish there was a table I could link to that housed both code and description but who ever created this did not make life easy. Thanks (I also tried the TRIM but could not get it to work ) I know it is because I do not know how to put it within my code to make it work.
    SELECT DISTINCT
              A1.AUTH_NUMBER,
    PM.LAST_NAME,
              A1.AUTH_TYPE,
              A1.PLACE_OF_SERVICE,
              A1.OVERALL_STATUS,
              A1.CLOSED_REASON,
              A1.DENIED_REASON,
    Case
    when A1.DENIED_REASON in ('HS001','HS002') then 'MED NECESS'
    when A1.DENIED_REASON in ('HS004','HS005','HS006','HS007','HS008','HS013','HS014','HS016','HS017','HS019','HS020') then 'Admin Denial'
    when A1.DENIED_REASON is NUll and ap.advisor_decision = 'AAPPR' then 'Approved'
    else 'Unknown'
    end DENIED,
    A1.admit_primary_date,
    A1.service_admit_type AS "IP ADMIT TYPE",
    A1.service_user_defined_1 AS "OP Serv Type",
    regexp_replace('AA01 Behavioral/Mental Health Service', '^[^ ]+ +')from dual,
    ap.contact_date,
         AP.decision_date,
         AP.ADVISOR_DECISION,
              PM.PROVIDER_ID,
         A1.INSERT_DATETIME,
    TO_CHAR (A1.insert_datetime,'MONTH-YY')AS "Month",
    A1.admit_primary_date,
              A1.ACTIVE_PHYSICIAN_ADVISOR,
              MV.LINE_OF_BUSINESS
    FROM Windsoradm.auth_master a1
    INNER JOIN Windsoradm.auth_phys_advisor ap
    ON a1.auth_number=ap.auth_number
    INNER JOIN windsoradm.prov_master pm
    ON ap.seq_prov_id=pm.seq_prov_id
    LEFT JOIN windsoradm.note_master nm
    ON nm.seq_memb_id=a1.seq_memb_id
    INNER JOIN windsoradm.member_mv mv
    ON mv.seq_memb_id=a1.seq_memb_id
    Where mv.Line_of_Business <>'SFS'
    /*AND A1.PLACE_OF_SERVICE IN ('11','21','22','24')*/
    /*AND a1.active_physician_advisor = 'Y'*/
    /*AND (a1.closed_reason ='A06' OR a1.closed_reason is Null)*/
    AND a1.insert_datetime Between To_Date ('04/01/2012', 'MM/DD/YYYY') and To_Date ('04/30/2012','MM/DD/YYYY')
    ORDER BY 1

  • How can I use the join condition for this query?

    Hi, i am using a query which has a sun query in it, wen i am running tat query it is giving 9332 records, I changed the sub query logic and given an inner join, but it is giving only 4476 records. So, I changed it to left join but it is giving more records
    than usual now, say 10033 records.
    This is the code which is giving records 9332, which is correct
    select      distinct 
          b.SRC_PROV_ID
          ,COALESCE(a.SYSTEM_NAME, a.CTRCT_GRP_NAME, a.PROV_SMG_NAME) AS SYSTEM_NAME
    INTO  TINtoSystem
    from 
          RARE.dbo.EDW_MASTER a 
          Inner Join RARE.dbo.EDW_PROD_ID_XREF b 
                on a.SMG_ID = b.SMG_ID 
      where SRC_PLATFORM_CD = 'TX' 
          and a.SMG_ID in 
                select distinct 
                SMG_ID 
                from RARE.dbo.EDW_PROD_ID_XREF 
                where SRC_PLATFORM_CD = 'TX' 
                and SRC_PROV_ID in (select q.PROV_TAX_ID from PACT.dbo.SQS_EDW_Source q) 
    I have changed this code by giving inner join as, but its not giving the exact records of 9332, 
    select distinct
    b.SRC_PROV_ID
    ,COALESCE(a.SYSTEM_NAME, a.CTRCT_GRP_NAME, a.PROV_SMG_NAME) AS SYSTEM_NAME
    INTO TINtoSystem
    from
    RARE.dbo.EDW_MASTER a
    Inner Join RARE.dbo.EDW_PROD_ID_XREF b
    on a.SMG_ID = b.SMG_ID
    Inner Join Pact.dbo.SQS_EDW_Source q
    on b.SRC_PROV_ID = q.PROV_TAX_ID
    where b.SRC_PLATFORM_CD = 'TX'
    Can anyone tell, where it is missing, I used left join also but its giving more records then, need help

    Hi, If you insist inner joins then please try
    SELECT DISTINCT
    b.SRC_PROV_ID
    ,COALESCE(a.SYSTEM_NAME, a.CTRCT_GRP_NAME, a.PROV_SMG_NAME) AS SYSTEM_NAME
    INTO TINtoSystem
    FROM
    RARE.dbo.EDW_MASTER a
    Inner Join RARE.dbo.EDW_PROD_ID_XREF b
    on a.SMG_ID = b.SMG_ID
    inner join
    select distinct
    c.SMG_ID
    from RARE.dbo.EDW_PROD_ID_XREF as c
    where SRC_PLATFORM_CD = 'TX'
    and exists (select * from PACT.dbo.SQS_EDW_Source q where c.SRC_PROV_ID=q.PROV_TAX_ID)
    ) as d on a.SMG_ID = d.SMG_ID
    where b.SRC_PLATFORM_CD = 'TX'

  • HOWTO: Use the Spring data access methods together with the WebRowSet class

    With the WebRowSet class I can easily iterate over a ResultSet and produce some XML using the code below.
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection connection
    = DriverManager.getConnection("");
    Statement statement = connection.createStatement();
    ResultSet resultSet = statement.executeQuery("SELECT SYSDATE FROM DUAL");
    WebRowSet webRowSet = new WebRowSetImpl();
    webRowSet.populate(resultSet);
    statement.close();
    connection.close();
    webRowSet.writeXml(new FileOutputStream("C:\\SYSDATE.xml"));
    So, how would I use the simplified Spring methods to do the same thing? The WebRowSet.populate method only supports a ResultSet object. The Spring framework only returns an SqlRowSet object that is not easily cast to the ResultSet, etc.
    Thanks for your help.
    Edited by: mrmeth0d on Jan 3, 2008 2:02 PM

    So, how would I use the simplified Spring methods to do the same thing? The WebRowSet.populate method only supports a ResultSet object. The Spring framework only returns an SqlRowSet object that is not easily cast to the ResultSet, etc.
    Cast Spring's SqlRowSet to ResultSet? Impossible. It's an interface that does not extend java.sql.ResultSet.
    javax.sql.WebRowSet is an interface that extends java.sql.ResultSet.
    Spring does have a concrete class ResultSetWrappingSqlRowSet whose constructor can take a java.sql.ResultSet.
    So I think your solution is to instantiate a new ResultSetWrappingSqlRowSet, passing it your javax.sql.rowset.WebRowSet, and return that wherever Spring wants to return a SqlRowSet.
    %

  • How to use the scan function on a 4215i all in one printer

    How do I use the scan function on this printer with windows 8. I did the installation but the scan function does not seem to wwork 
    This question was solved.
    View Solution.

    Do you have the Officejet 4215 series All-in-One printer?
    If so, then there is no full feature driver for the printer.  The printer is installed using the Windows Update menu of the print drivers.  For information about using the Windows Update driver click here.
    Do you have this printer connected via USB?  If so, then there are workaround methods to get the printer to scan, as the old software package is not available on Windows 8.  In the document linked above, scroll down to the section on how to scan with the Update driver to find information on how to perform these types of scans.  Hope this helps.
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------
    I am not an HP employee.

  • How do I remove an old username from the app store when using the update function

    How do I remove an old username from the app store when using the update function.
    I purchased my Mac used.  The former owners username prepopulates when I try to perform the updated function on the app store.  It does not allow me to use a different user name.    I have created my own username and password.  I have even been able to purchase items from the app store, it's just when I use the update function it does populate with my username.  Any help is appreciated.

    The first thing to do with a second-hand computer is to erase the internal drive and install a clean copy of OS X. You — not the previous owner — must do that. How you do it depends on the model, and on whether you already own another Mac. If you're not sure of the model, enter the serial number on this page. Then find the model on this page to see what OS version was originally installed.
    1. You don't own another Mac.
    If the machine shipped with OS X 10.4 or 10.5, you need a boxed and shrink-wrapped retail Snow Leopard (OS X 10.6) installation disc from the Apple Store or a reputable reseller — not from eBay or anything of the kind. If the machine has less than 1 GB of memory, you'll need to add more in order to install 10.6. Preferably, install as much memory as it can take, according to the technical specifications.
    If the machine shipped with OS X 10.6, you need the installation media that came with it: gray installation discs, or a USB flash drive for some MacBook Air models. For early MBA models, you may need a USB optical drive or Remote Disc. You should have received the media from the previous owner, but if you didn't, order replacements from Apple. A retail disc, or the gray discs from another model, will not work.
    To boot from an optical disc or a flash drive, insert it, then reboot and hold down the C key at the startup chime. Release the key when you see the gray Apple logo on the screen.
    If the machine shipped with OS X 10.7 or later, you don't need media. It should boot into Internet Recovery mode when you hold down the key combination option-command-R at the startup chime. Release the keys when you see a spinning globe.
    2. You do own another Mac.
    If you already own another Mac that was upgraded in the App Store to the version of OS X that you want to install, and if the new Mac is compatible with it, then you can install it. Use Recovery Disk Assistant to create a bootable USB device and boot the new Mac from it by holding down the C key at the startup chime. Alternatively, if you have a Time Machine backup of OS X 10.7.3 or later on an external hard drive (not a Time Capsule or other network device), you can boot from that by holding down the option key and selecting it from the row of icons that appears. Note that if your other Mac was never upgraded in the App Store, you can't use this method.
    Once booted in Recovery, launch Disk Utility and select the icon of the internal drive — not any of the volume icons nested beneath it. In the Partition tab, select the default options: a GUID partition table with one data volume in Mac OS Extended (Journaled) format. This operation will permanently remove all existing data on the drive.
    After partitioning, quit Disk Utility and run the OS X Installer. You will need the Apple ID and password that you used to upgrade. When the installation is done, the system will automatically reboot into the Setup Assistant, which will prompt you to transfer the data from another Mac, its backups, or from a Windows computer. If you have any data to transfer, this is usually the best time to do it.
    Then run Software Update and install all available system updates from Apple. To upgrade to a major version of OS X newer than 10.6, get it from the Mac App Store. Note that you can't keep an upgraded version that was installed by the previous owner. He or she can't legally transfer it to you, and without the Apple ID you won't be able to update it in Software Update or reinstall, if that becomes necessary. The same goes for any App Store products that the previous owner installed — you have to repurchase them.
    If the previous owner "accepted" the bundled iLife applications (iPhoto, iMovie, and Garage Band) in the App Store so that he or she could update them, then they're linked to that Apple ID and you won't be able to download them without buying them. Reportedly, Apple customer service has sometimes issued redemption codes for these apps to second owners who asked.
    If the previous owner didn't deauthorize the computer in the iTunes Store under his Apple ID, you wont be able to  authorize it immediately under your ID. In that case, you'll either have to wait up to 90 days or contact iTunes Support.

  • Just installed a HP Color Laserjet CM2320nf MFP printer, at the same time I upgraded to Lion. It prints fine, but I cannot use the scan functions.  I downloaded the most recent driver! Any help would be appreciated.

    Just installed a HP Color Laserjet CM2320nf MFP printer, at the same time I upgraded to Lion. It prints fine, but I cannot use the scan functions.  I downloaded the most recent driver! Any help would be appreciated.

    HP says that the drivers for your all in one print/scanner are downloadable from apple. For the scanner to use preview. image capture or the scan icon from the print driver queue.  I don't know how old your HP is, but I know that the newer Os from apple don't support a lot of older printers. You might be able find a third party driver that could work.

  • I don't know how to use the canlendars function and the notes are kind of messy code,anyone help me

    i don't know how to use the canlendars function and the notes are kind of messy code,anyone help me

    Step by step:
    1. On your main vi Front Panel, create your boolean indicator.
    2. On the block diagram, right click the new boolean indicator and select Create - Reference.
    3. On sub-vi front panel, create boolean indicator (or use one that is already created).
    4. On sub-vi front panel, create a reference (Controls Palette - Refnum - Control Refnum).
    5. Right click on the newly created Refnum and select Select Vi Server Class - Generic - GObject - Control - Boolean. The refnum label changes to BoolRefnum.
    6. On sub-vi block diagram, create Property Node (Functions - Application Control - Property Node). Find the BoolRefnum and move it close to the new Property Node.
    7. Wire the BoolRefnum to the reference input of the property node.
    8.
    Right click on the property node and select Change to All Write.
    9. Move mouse to point to Visible inside property node box, left click and select Value.
    10. Wire the boolean indicator from step 3 to the Value input of the property node.
    11. On sub-vi front panel, right click on icon and select Show Connector.
    12. Click on empty connector spot then click on the new BoolRefnum. Save your sub-vi.
    13. On main vi block diagram, connect refernece created in step 2 to the new connector terminal of sub-vi.
    14. Save and run.
    Here are the modified vi's.
    - tbob
    Inventor of the WORM Global
    Attachments:
    Pass_a_Reference.vi ‏20 KB
    GL_Flicker_mod.vi ‏83 KB

  • Need help using the "skatter" function with brushes.

    I'm using Photoshop 7 right now. I want to use the scatter function with one of the standard brushes to make a star trail, but the problem is that the stars are too thick, there's too many of them. How do I tell it to draw less instances of the brush when I'm in scatter mode? So that it's only dropping 5 at a time or so?

    I have a control bar for "Master Diameter" but I can't find anything that says "spacing."

  • How do I use the print function to output a numeric variable with a fixed amount of leading zeroes

    I need to create an output from a T-SQL query that picks a numeric variable and uses the print function to output with leading zeroes if it is less than three characters long when converted to string.  For example if the variable is 12 the output should
    be 012 and if the variable is 3 the output should be 003.
    Presently the syntax I am using is PRINT STR(@CLUSTER,3) .  But if @CLUSTER which is numeric is less than three characters I get spaces in front.
    Please help!

    >> I need to create an output from a T-SQL query .. <<
    NO! NO! In RDBMS, we have a presentation layer that handles displays. We do not ever do it in the database. This is fundamental. But more than that, the purpose of PRINT is for debugging in T-SQL and never for output.
    You are still writing 1960's COBOL or BASIC, but you want to to it in SQL.  You probably picked the wrong data type (a numeric that should be a string) and are trying to repair your design error.  
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • TS1398 I have an iPad mini, because of my work network firewalls I am not able to use the airprint function to print. I was told you can direct connect to a printer. I am not sure how as I have not seen any cables for a lightning connection to a printer c

    I have an iPad mini, I am connected to my work wireless connection. My printer also is on the same wireless network, however I am not able to print to my airprint enabled printer through this wireless connection. Is there a way to direct connect to the printer via a cable ?
    I am missing something here on the connection. I am thinking possibly a firewall here at work will not allow me to use the airprint function. Help ?

    There is no support for wired printing.
    It is probably a firewall issue, possibly where all inbound communications are blocked. Since you're at work, I'd call your work IT department and find out from them what you can/can't do.

  • Does anyone know how to use the bcc functionality for apple mail while accessing it on the cloud from my PC?

    I am currently away from my MAC and want to send an email through apple mail with the bcc functionality.  I am using the cloud to get to my mail, however, I can't figure out how to use the BCC functionality, please help.  Thanks!

    Open your mail,
    lower left corner click on settings,
    go to composing and check BCC, save and your done

  • How to Use the language function for assignment and validation

    Hi All,
    If anyone can explain me in details with example ,how to use the language function for assignments and validations?
    Thanks
    Arnab

    Hi Arnab,
    The expression is checked only for the current MDM session.
    If u login with the ABC language it will always show the ABC language no matter how many times u execute it.
    Try connecting to the DM with the XYZ language.
    It should go to the if part rather than else.
    Hope it helps.
    Thanks,
    Minaz

  • How to use the CMS functionality in Sun Portal Server 7.2

    Hi All,
    How to use the CMS functionality using the ccd.war(Portlet) which is available in the library as i could add it to my channel but not able to show the functionality as it is showing the error msg "You are currently not logged in. Please login." should I create userid and there respective roles inorder to use the CMS functionality.
    Has any one used this as I could this in glass fish server.
    Any Input is appreciated.
    Thanks & regards
    Srikanth

    Have a look at the "*Roles*" section of the portal server 7.2 content management system guide
    http://docs.sun.com/source/820-4275/index.html . You can also look at [project mirage|https://mirage.dev.java.net] for some screencasts
    Alternatively,
    1. ccd.war has 3 portlets in it:
    (a) custom content definition portlet
    (b) custom content portlet
    (c) workflow portlet
    2. Inorder to work with these portlets, user needs to be in anyone of the below roles:
    (a)Consumer (b) Editor (c) Approver (d) Administrator (e) Submitter (f) Contributor (g) Publisher
    3. By default ccd.war gets deployed using a default roles file (/var/opt/SUNWportal/tmp/ccd.roles.properties)
    Note: In windows, you may not find this file
    4. Access the portlets as a user in any of the role mentioned in the ccd.roles.properties
    (OR)
    you can use a new roles file which has mapping to your custom roles. For this , undeploy existing ccd.war and deploy again with a new roles.properties file
    Hope this helps!

  • How to use the pps function from JCOP?

    Hi
    I'm trying to use the pps function from JCTerminal (JCOP API: [url http://www.cs.ru.nl/~woj/jcopapi/com/ibm/jc/JCTerminal.html#pps(int, int)]pps function ) to connect my client to a virtual card with a specific protocol (T=0).
    But I always got the error: "Protocol and parameter selection not supported by this terminal!"
    I've tried to make an ATR that support both protocol : [url http://smartcard-atr.appspot.com/parse?ATR=3b909580811fc7dc]3B 90 95 80 81 1F C7 DC.
    I really don't know what value to put in the second parameter (baud rate), I've tried with 150000, which is in the range of the ATR but I'm not sure this is correct. And I could't find any example of it.
    I'm also not sure where to put the pps command, the specification say directly after a reset, so I tried this implementation:
    System.out.print("Start");
              readers = TerminalFactory.getDefault().terminals().list(State.CARD_PRESENT);
              //If no readers has a card it ends the process
              if(readers.isEmpty()){
                   System.out.println("\nNo card in the reader...");
                   return;
              System.out.println("\nReader Type: "+readers.get(0).toString());
              term = (PCSCJCTerminal)JCTerminal.getInstance("PCSC", readers.get(0).toString().substring(15));
              term.open();
              System.out.println("\nTerminal opened");
              //Getting the ATR
              atr = new ATR(term.waitForCard(2000));
              try {
                   term.pps(JCTerminal.PROTOCOL_T0, (int)150000);
              } catch (Exception e) {
                   e.printStackTrace();
              System.out.println("ATR: "+toHex(atr.getBytes()));
              //sending a data 11223344
              System.out.println("\nsending data: 11223344");
              byte[] responsesend = term.send(0,cmdsend,0,cmdsend.length);
              System.out.println("Response data is:" + toHex(responsesend));
              //close terminal
              term.close();
              System.out.println("\nTerminal closed");I've got this output on the console:
    <font size="2">StartReader Type: PC/SC terminal Virtual CAD Reader 0
    Terminal opened
    ATR: 3b 90 95 90 00 81 1f c7 cc
    sending data: 11223344
    <font color="red">Protocol and parameter selection not supported by this terminal!</font>
         at com.ibm.jc.JCTerminal.pps(Unknown Source)
         at com.test.essai.main(essai.java:46)
    </font>>
    And If I take a look at the data exchanged with the card:
    <font size="2">Running in Virtual Card mode...
    ATR: 3B909580811FC7DC
    Waiting for event (power: off, protocol: unknown/undefined)...
    Waiting for event (power: off, protocol: unknown/undefined)...
    Raw event data: 01
    Event: VCAD_EC_POWER_ON (0x01)
    Reply: VCAD_SC_OK (0x00) (in reply to VCAD_EC_POWER_ON) ATR: 3b909580811fc7dc
    Raw reply data: 003b909580811fc7dc
    Sending reply...
    Waiting for event (power: on, protocol: unknown/undefined)...
    Waiting for event (power: on, protocol: unknown/undefined)...
    Raw event data: 06ff11957b
    Event: VCAD_EC_EXCHANGE_TPDU (0x06) C-TPDU: ff11957b
    Accepting any PPS request parameters: Protocol: t=1; FI=9, DI=5
    Reply: VCAD_SC_OK (0x00) (in reply to VCAD_EC_EXCHANGE_TPDU) R-TPDU: ff11957b
    Raw reply data: 00ff11957b
    Sending reply...
    </font>>
    This (above) is the PPS command but not from the PPS function, it is always sent with protocol T=1
    <font size="2">Waiting for event (power: on, protocol: t=1)...
    Raw event data: 0501
    Event: VCAD_EC_SET_PROTOCOL (0x05) Protocol: t=1
    Reply: VCAD_SC_OK (0x00) (in reply to VCAD_EC_SET_PROTOCOL)
    Raw reply data: 00
    Sending reply...
    Waiting for event (power: on, protocol: t=1)...
    Raw event data: 0600c10120e0
    Event: VCAD_EC_EXCHANGE_TPDU (0x06) C-TPDU: 00c10120e0
    Handling protocol-specific command...
    Protocol block:
    NAD: 0x00
    PCB: 0xc1 (T1_S_BLOCK); S-Block type: T1_SBT_IFS_REQ
    LEN: 1
    INF:
    IFS: 20
    EDC: 0xe0
    Changing IFS(other) from 32 to 32
    Reply: VCAD_SC_OK (0x00) (in reply to VCAD_EC_EXCHANGE_TPDU) R-TPDU: 00e10120c0
    Raw reply data: 0000e10120c0
    Sending reply...
    Waiting for event (power: on, protocol: t=1)...
    Raw event data: 0600001300a404000d54657374436c69656e7441707000f0
    Event: VCAD_EC_EXCHANGE_TPDU (0x06) C-TPDU: 00001300a404000d54657374436c69656e74
    41707000f0
    Processing app. command...
    App. block:
    NAD: 0x00
    PCB: 0x00 (T1_I_BLOCK); Seq. #: 0; More data: 0
    LEN: 13
    INF:
    00a404000d54657374436c69656e7441707000
    EDC: 0xf0
    cmd name: N/A (class #4)
    cmd: 00a40400 0d 54657374436c69656e74417070 70
    Responding with the reversed command data, SW is hardcoded to 90<INS>
    rsp: 707041746e65696c4374736554 90a4
    Reply: VCAD_SC_OK (0x00) (in reply to VCAD_EC_EXCHANGE_TPDU) R-TPDU: 00000f70704
    1746e65696c437473655490a475
    Raw reply data: 0000000f707041746e65696c437473655490a475
    Sending reply...
    Waiting for event (power: on, protocol: t=1)...
    Raw event data: 060040041122334400
    Event: VCAD_EC_EXCHANGE_TPDU (0x06) C-TPDU: 0040041122334400
    Processing app. command...
    App. block:
    NAD: 0x00
    PCB: 0x40 (T1_I_BLOCK); Seq. #: 1; More data: 0
    LEN: 4
    INF:
    11223344
    EDC: 0x00
    cmd name: N/A (class #1)
    cmd: 11223344
    Responding with the reversed command data, SW is hardcoded to 90<INS>
    rsp: 9022
    Reply: VCAD_SC_OK (0x00) (in reply to VCAD_EC_EXCHANGE_TPDU) R-TPDU: 0040029022f
    0
    Raw reply data: 000040029022f0
    Sending reply...
    Waiting for event (power: on, protocol: t=1)...
    Raw event data: 03
    Event: VCAD_EC_POWER_OFF (0x03)
    Reply: VCAD_SC_OK (0x00) (in reply to VCAD_EC_POWER_OFF)
    Raw reply data: 00
    Sending reply...
    Waiting for event (power: off, protocol: unknown/undefined)...
    </font>>
    If someone know how to use this function or have any advice to help me to select a specific protocol with Jcop API, please let me know.
    If you you need any more information don't hesitate to ask.
    Best regards
    Edited by: Cyril on Sep 22, 2011 9:54 AM

    -1
    I'm using a virtual terminal (windows driver), and I don't see how I could turn off the Auto-pps. I've also tried with a real reader and a card and I have the same error.
    -2
    I've tried value in the range of the atr (based on this analysis: [url http://smartcard-atr.appspot.com/parse?ATR=3b909580811fc7dc]http://smartcard-atr.appspot.com/parse?ATR=3b909580811fc7dc ). But I don't know if only I value of baud-rate is possible in the range. Anyway I just would like to change the protocol, not the baud-rate.
    -3
    I've already tried to call pps function before, after the first reset, or with another reset later and I always got the same thing.
              term = (PCSCJCTerminal)JCTerminal.getInstance("PCSC", readers.get(0).toString().substring(15));
              term.open();
              System.out.println("\nTerminal opened");
              //Getting the ATR
              atr = new ATR(term.waitForCard(2000));
              System.out.println("ATR: "+toHex(atr.getBytes()));
              jcard = new JCard(term,atr,0);
              jcard.reset();          
              try {
                   term.pps(JCTerminal.PROTOCOL_T0, (int)312500);
              } catch (Exception e) {
                   e.printStackTrace();
              }The same pps is always send after each reset...

Maybe you are looking for

  • Crystal reports and JSP

    Hi there, I would like to call crystal reports from JSP. How can I do that? My system is: Webserver: iPlanet 4.0 SP4 Crystal reports: 8.5 Developer version Database: Oracle 8i version 8.1.6 S.O.: Solaris. I tried the documentation from Seagate but th

  • Final cut pro millions of colours + bit depth question

    Hello I am working in final cut pro 7 and I wanted to know what is the maximum bit depth I can export using the Prores codec? All I see in compression settings for rendering my timeline when wanting to render with Prores 4444 is the option for 'milli

  • Item 010 Fund Center/Commit Payment Budget Exceeded (FM)

    Hi Expertise, Our user executing FMJ2 transaction to carry forward purchase requisition (PR) / Purchase Order (PO) from 2014 to 2015 (April to March) by that time getting the below error message, but budgets are available for 2015. Item 010 Fund Cent

  • Color changes when moving mouse pointer

    Hi, I have an issue that, when I move the mouse pointer over the controls of the video (when playing quicktime movies in full screen) that it goes darker and looks a lot better! But as soon as I move the cursor away from the controls, the image becom

  • Regarding 56 strategy

    Hi Everybody, In my company we are using strategy 56 ( Characteristics Planning). we are having an issue while doing ATP check in sales order... Material type is FERT ( marked as Configurable in Basic Data 2 view) and assigned 56 strategy to it and w