QR Code readers

Does anyone know of a QR Code reader app that you can choose to use the front facing camera on iPad?

Since you have to be able to see what you are scanning, line the code up in a box-I am going to say no.
I do not think anyone wants that as a feature.
Good luck.

Similar Messages

  • Bar code readers

    can any one help me explain how a software can read information from a bar code or provide any library or so

    Hi Gareth,
    Thanks for your response.
    The requirement is that when we receive the items we bring the item on the Weighment scale on a Trolley. The bar code is scanned to get the Item information. The weight from the weiging scale is populated in the GROSS Weight field. Then we have to unload the items from the Trolley and weigh the empty trolley to calculate the net weight (Gross wt - Empty Trolley wt = Net Weight). This net weight is then considered as the Quantity received.
    Hope this makes clear to you.
    Regards.

  • QR Code reader issues

    I've been getting more and more business cards with qr codes on them. I bought a couple of different qr code reader apps, but none of them seem to work. In order to get the code large enough for the code reader to recognize it, I have to hold it so close to the phone that the image gets too blurry to read. If I hold it further away it is clear, but too small for the reader to se the code. Is anyone else having this problem? Is this just an inherent problem with the the whole idea of qr code readers on the phone? Any help or comments will be appreciated.

    I'm using the "Barcodes v 1.0" from ZXing, which seems to work rather well. This application is available from the iTunes App Store:
    http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=292197557&mt=8
    Good luck!
    Lance A. Schart
    http://tiny.cc/LanceASchart
    Financial Development
    Media Relations
    Project Management and Research
    Musicology

  • MPN Bar code scanning

    Hi All,
    We do bar code scanning at the time of GR. We are planning to use HERS material type but the problem is HERS material type is not having EAN number field, please guide how to do this.
    Thanks and Regards
    Pavan

    Most bar code readers have either an RS232 interface or are so-called 'wedge' devices which means they sit between a PC keyboard and the PC and insert characters from the barcode as if they had been typed. In both cases the decoding is done by the reader and all the user sees are ASCII strings.
    If you need to extract the codes from video images, I suggest a good book on image processing nd the ISO spec. for the barcode in question.

  • Air QR code generator/reader

    Anyone have any current recommendations for Air QR code generator and reader (ANE, lib)?
    I need a solution that will:
    1) Generate a text/string QR code in Air desktop
    2) Generate a text/string QR code in Air cross-platform mobile app (android or iOS).  Same code base as #1.
    3) Scan the QR code on cross-platform mobile device (android, iOS) from within my Air app.
    I see a lot of search results for various ways, but so far nothing cross-platform.
    Thanks!
    Don

    Hi Sbhave.
    Thanks for your response.
    I still need to read the post but it certainly looks interesting.
    I think it explains how I can make a QR Code having contact details.
    I got your AS3 Qr Code reader to work and it reads a QR Code BEAUTIFULLY, even a VCard. Now your code simply reads the QR Code and outputs the read to a window. Your code doesnt tell the mobile device what to do with the output. Now it is easy enough to add some code which, if the data is a web address, will go to that webaddress. However if I have used your QR Reader (in AS3) to read a vcard how do I code the Reader so that it knows that it must add the contact info to my mobile devices contacts list  and can actually do this ? I have some commercial QR Code readers which use the Zing Library and recognise that its a Vcard and give the choice to save to the contacts list.
    Thanks
    Paul

  • Are QR Code Reader Apps compatible with 3rd Generation IPod Touch?, Are QR Code Reader Apps compatible with 3rd Generation IPod Touch?

    Looking to use in my classroom purely for QR Code Readers. Hoping 3rd Generation are compatible for expense reasons, thank you!

    Thank you. I am looking at the apps I want to use... some say only gen 4 and 5, some just say IPod Touch with no generation listed. A better question might be, is there a QR Code Reader app available that is compatible with 3rd Gen. IPod Touch?

  • G4 no longer booting under 10.4.7

    When using the startup disk or normal booting and holding command-v, this is what i get,
    Stand true slicing quantity is 10000 us
    VM_page
    Mig_table
    Color video console
    IO Kit component version 6.0
    Roon (rc builder)
    IO device tree support done
    Recroding startup extensions
    Copyright info
    Using 1966 Buffer headers and 1966 cluster IO buffer headers (last line-freezes here)
    That is it. all white text on a black screen and if i let it sit for three days,it will sit there with the same screen. any ideas from you code readers out there ?

    All I can add to this is that based on my years of experience with oder Mac and OS 9.1 I found that when it would not load past the smiling face that you either had an extension issue, or a hardware issue. When you boot from the 9.1 CD and hold down the space bar it should boot up into the extension manager. Once it does that you might try disabling an extension that is not needed. If you had some old PCI cards installed that are now not there then there may be an extension that it trying to load to run the card and because the card is not there the extension cannot do what it needs to and may be preventing the boot process from completing. If you can get it to boot try running disk first aid and see what happens.
    What were you doing when this problem started? Had you just loaded any new applications? Did you have power failure?
    One other thing, make sure you remove all peripheral devices except the keyboard, mouse and monitor when troubleshooting. Disconnect the printer and any external drives.
    If you can't get it to boot from a CD or any other drive then it could be a hardware problem that may require a trip to a service facility.

  • More Unresolved kernel trap(s) - Hoping you can Help?

    Hi All --
    Hoping someone can translate some of these numbers to help me resolve this ----
    I have run all disk utilities from install disk (repaired perms, verify & repair disk), Diskwarrior (found repeating japanese font errors), memtested (all o.k.), booted w/ one RAM then the other, swapped RAM around in slots. Have run Apple Hardware Test (O.K./Passed) and tried the troubleshooting tips @ thexlab.com... I am doing tests with no usb peripherals connected -- but do use bluetooth mouse & keybd in normal operation.... havent had probs in the past using them.
    ....But the freezes/panics continue. (some other crash logs @ http://discussions.apple.com/thread.jspa?threadID=1229276&tstart=0 )
    I am running OS 10.4.10 - on a G4 1.25 Powerbook - 1.5Gig Kingston RAM
    My fear is that the CPU is on its way out -- the RAM is less than three months old and tests o.k. - have swapped around as mentioned -- is it possible a slot isnt connecting properly?
    I recently had a mother/logicboard replaced (lowslot failiure) & installed Logic 8 a few weeks ago.
    Although KPs are usually hardware related, should I try backing-up and re-installing the 10.4.10 update? or run the /sbin/fsck command?
    I am HOPING this is a file conflict... oh please!
    (Below the panic codes is an mDNSResponder: ERROR -- its an online thing and cant quite figure it out - I dont think its related, although I'm getting a different I.P. address each time --- normal?)
    Any help would be greatly appreciated --- many thnx in adv.
    Cheers,
    John.
    =====================
    Unresolved kernel trap(cpu 0): 0x300 - Data access DAR=0x000000000000018F PC=0x0000000000032604
    Latest crash info for cpu 0:
    Exception state (sv=0x3B355500)
    PC=0x00032604; MSR=0x00001030; DAR=0x0000018F; DSISR=0x40000000; LR=0x000325F8; R1=0x21CD3D40; XCP=0x0000000C (0x300 - Data access)
    Backtrace:
    0x00366000 0x00032D00 0x0003C92C 0x000A9514
    Proceeding back via exception chain:
    Exception state (sv=0x3B355500)
    previously dumped as "Latest" state. skipping...
    Exception state (sv=0x31EAFA00)
    PC=0x00000000; MSR=0x0000D030; DAR=0x00000000; DSISR=0x00000000; LR=0x00000000; R1=0x00000000; XCP=0x00000000 (Unknown)
    Kernel version:
    Darwin Kernel Version 8.10.0: Wed May 23 16:50:59 PDT 2007; root:xnu-792.21.3~1/RELEASE_PPC
    panic(cpu 0 caller 0xFFFF0003): 0x300 - Data access
    Latest stack backtrace for cpu 0:
    Backtrace:
    0x000952D8 0x000957F0 0x00026898 0x000A8004 0x000AB980
    Proceeding back via exception chain:
    Exception state (sv=0x3B355500)
    PC=0x00032604; MSR=0x00001030; DAR=0x0000018F; DSISR=0x40000000; LR=0x000325F8; R1=0x21CD3D40; XCP=0x0000000C (0x300 - Data access)
    Backtrace:
    0x00366000 0x00032D00 0x0003C92C 0x000A9514
    Exception state (sv=0x31EAFA00)
    PC=0x00000000; MSR=0x0000D030; DAR=0x00000000; DSISR=0x00000000; LR=0x00000000; R1=0x00000000; XCP=0x00000000 (Unknown)
    Kernel version:
    Darwin Kernel Version 8.10.0: Wed May 23 16:50:59 PDT 2007; root:xnu-792.21.3~1/RELEASE_PPC
    ================
    On Start-up ;
    2007-11-12 13:08:45.015 SystemUIServer[191] lang is:en
    Nov 12 13:08:52 my-name-powerbook-g4-15 mDNSResponder: ERROR: Only name server claiming responsibility for "my name PowerBook G4 15"." is "."!
    Nov 12 13:08:52 my-name-powerbook-g4-15 mDNSResponder: HostnameCallback: Error -65538 for registration of my name PowerBook G4 15". IP XX.XXX.XXX.XXX

    Hey Dale ---
    Thnx loads for the links ---- after i posted, i found your replies to others and the links.... doh - typical.
    ... yeah I wasnt sure if there were any code readers here that could help -- however! i 'think' i may have found a fix for my crashes/freezes/kernel panic (s)....maybe. they were occuring so frequently - i.e. about a minute after each re-start/re-boot - i've been getting hopeful as I havent had my P.B. go down after a day -- fingers crossed.....
    I was worried it was hardware/RAM related as is usually the case with kernel things, but the RAM repeatedly checked fine, even after swapping around, using one then the other, etc...
    I followed KJK555s' advice @ http://discussions.apple.com/thread.jspa?threadID=1037332&start=0&tstart=0 and after some more Diskwarrior-ing, headed to some of the library cache locations.... Here was his suggestion;
    ==================================
    1. First run disk utility or some other good drive utility to make sure your HD is healthy
    (permissions too).
    2. Boot into safe made and clean your caches with a cache cleaner or manually drag
    the following files to the trash:
    com.apple.kernelcaches (a folder in /System/Library/Caches)
    Extensions.kextcache (a file in /System/Library)
    Extensions.mkext (a file in /System/Library/)
    com.apple.ATS (a folder in /Library/Caches/)
    com.apple.loginwindow.plist (a file in /Library/Preferences/)
    Files that start with com.apple.LaunchServices (in /Library/Caches)
    3. If the problem still persists, reinstall the latest 10.4.10 combo update (v 1.1)
    in safe mode and repeat steps 1 and 2. )
    ===========================================
    ...so, many thnx KJK555... so far so good.
    --- should others be having similiar problems with kernel panics or freezes (on 10.4.10) - check out the continuing discussion going on @ the above link (some have had success reverting back to 10.4.9). Its probably best to go through all the RAM checking / Disk Utility procedures (follow Dales' links) before heading to the library caches. ...and although this has currently has stopped my repeated crashes, it may not be a kernel crash fix for everyone.
    Thnx for the reply again Dale, and good luck to all ----
    Cheers,
    J.
    Message was edited by: John Williams24

  • Strange Reassociation behaviour - help on troubleshoot

    Hi there,
    I have a production wlc wich has several ssid's working.
    In a particular ssid, the wifi clients are bar code readers, using a wpa psk encription/authentication.
    My client had bought a new bar code readers, and since then, we are having problems.
    I had capture a debug client <mac> and attached here.
    I cant find a reason for so much reassociation requests... even for the same AP.
    Please give a light in here please.
    My Best Regards,
    Petrónio

    Thank You leolaohoo,
    I'll try it asap.
    Do you detect any strange behaviour on the log ???
    I detect a strange shortcut on the flow ...
    START -> AUTHCHECK -> 8021X_REQD -> L2AUTHCOMPLETE -> RUN
    *apfMsConnTask_0: Sep 23 13:41:06.809: e0:2a:82:68:b3:da 10.120.109.101 RUN (20) Change state to START (0) last state RUN (20)
    *apfMsConnTask_0: Sep 23 13:41:06.809: e0:2a:82:68:b3:da 10.120.109.101 AUTHCHECK (2) Change state to 8021X_REQD (3) last state RUN (20)
    *apfMsConnTask_0: Sep 23 13:41:06.809: e0:2a:82:68:b3:da 10.120.109.101 8021X_REQD (3) Plumbed mobile LWAPP rule on AP ac:a0:16:ca:b8:30 vapId 1 apVapId 1
    *Dot1x_NW_MsgTask_2: Sep 23 13:41:06.878: e0:2a:82:68:b3:da 10.120.109.101 8021X_REQD (3) Change state to L2AUTHCOMPLETE (4) last state RUN (20)
    *Dot1x_NW_MsgTask_2: Sep 23 13:41:06.878: e0:2a:82:68:b3:da 10.120.109.101 L2AUTHCOMPLETE (4) Change state to RUN (20) last state RUN (20)
    From "Policy Enforcement Module (PEM)" Figure, in "http://www.cisco.com/en/US/products/hw/wireless/ps430/products_tech_note09186a008091b08b.shtml" i see it bypass dhcp states.
    But nevertheless, if we have "RUN" states, then we could afirm, that " Client has successfully completed the required L2 and L3 policies and can now transmit traffic to the network" . Im i right ?
    Petrónio

  • ORACLE CC&B BARCODE READING ERROR

    Hello,
    On scanning ACCOUNT ID using barcode reader on account search screen only partial ID is displayed. The result is the same on other search screens when their corresponding ID's are scanned. This issue happens especially on the pop up search screens. The same doesnt happen while scanning on the Billing, payment or any regular screens(FULL ID's are displayed).
    For ex. If the Account ID 1234567890 is scanned using bar code reader in the payment event add screen, the scanned text in the payor account ID text box displays numbers in random fashion such as 1234 or 23567 or 789 etc. The text box doesn't display the actual scanned ID. But on regular screen actual ID is displayed
    We have tried different bar code readers, barcode fonts, ports and not able to overcome this bug.
    If anybody have come across this issue please share the info or please give some inputs on why this problem happens and what can be done to solve this.
    Thanks,
    Regards

    This seems to be more of a scanner issue than anything to do with CC&B.
    There is already a bug registered for this which is awaiting additional information from your end.

  • Barcode reader input and JTextField

    Hi Everybody,
    here is my problem: I have to read the input from a Barcode reader into a JTextField;
    I have a Listener attached to the JTextField Document which works fine. The problem is that the listener is invoked as many time as the characters input (e.g 12 times, if the scanned barcode has 12 digits)
    How do I know the input is complete if I don't know the length of the expected input?
    Thanks in advance fon any help or ideas

    What kind of Listener have you attached to the TextField?
    Most bar code readers can be configured to finish the scan with a carriage return in which case if you use an ActionListener then it would solve your problem

  • WebSapConsole Users Guide

    Hi folks,
    I cannot find the WebSapConsole Users Guide and WebSapConsole Installation guide.  I read the SAP Documentation in RFID Mobile Infrastructure and it refers to the:
      1) WebSapConsole Users Guide  and
      2) WebSapConsole Installation Guide
    Can anyone give me a link for these documents or actually mail them to me.
    [email protected]
    Please do not confuse the 'WebSapConsole' with the 'Webconsole'.  We do not use RFID, but bar code readers.
    Thanks,
    Vincent

    Hi Lodo and Enrique,
    First, WebSAPConsole and WebConsole are two different things altogether. I can say this very confidently because I had myself studied WebSAPConsole (though not worked on it) and currently working on WebConsole. I will clarify things just a bit more:
    WebSAPConsole is a web based enhancement of SAPConsole. SAPConsole does not contain any business logic, external databases, or complex functionality. It simply and efficiently translates just about any SAPGUI screen of your ever-growing SAP R/3 system to its character-based equivalent. It is acts as a middleware between RF devices and R/3 Systems.
    On the other hand WebConsole is a part of J2EE Stack on a Mobile Infrastructure (MI) Server which is used to deploy applications to and data to & from the MI Client devices which are PDAs, Laptops, etc.
    Now for the question you asked; please search for ‘Web-Enabled SapConsole’ in service.sap.com and you will find the latest WebSAPConsole Installation Guide and also a WebSAPConsole User Guide under the ‘Documents’ tab.  I think you will have to also apply a patch to get things going. I am sorry for not providing you with the exact link.
    Enrique you can do the same for getting info about WebSAPConsole. However, I advice you to go through the documents related to SAPConsole first which will help making things easier for you.
    Kindly let me know if you require any additional help.
    Regards,
    Rahul

  • I am looking for a POS software for multi-users with mobility via 3G and Wi-Fi

    Our company distributes food products to grocery, convenient and pharmacy stores, etc. We currently have an old cumbersome hard to use PC system that interfaces with driver's handhelds, keeps records of sales and monitors inventories on trucks and several warehouses. All our company uses MAC systems with the exception of this PC system. The closest I've come to find a MAC software is Lightspeed but it lacks mobility. Does any one know a good reliable POS system with Mobility hopefully to utilize either iPhones with bar code readers?

    Pages can export documents in MS Word format. When I last did this (with Pages '09, the Mac version), the result was a .doc file.
    Note that this is a translation, and like most translations, it's not always a perfect one. Some features of Pages are not supported in MS Word, and some Word features are not supported in Pages.
    For a more precise answer wrt Pages for iOS, you should repost your question in the iWork For iOS community. The link will take you there.
    Regards,
    Barry

  • [b]Tutorial:[/b] Simplify Developing OLE Automation Code Using VBA

    INTRODUCTION
    Automating Office applications from Oracle Forms can be a tedious, frustrating, and time-consuming process. Because the OLE2 and CLIENT_OLE2 built-ins do not validate the automation commands that they relay, code that compiles without errors often dies at runtime with a not-so-helpful error code. This tutorial will demonstrate how to simplify the development of automation code using a tool that ships with all Microsoft Office editions -- the Visual Basic for Applications (VBA) IDE.
    The VBA IDE, a core Office component, is a full-fledged development environment featuring code completion, basic syntax highlighting, context-driven help and a runtime debugger. Its Object Browser provides a convenient means of browsing the Word object model, as well as searching by keyword.
    For those who may not interested in following this tutorial in detail, I would like to stress the usefulness of the Object Browser as a tool for inspecting the functions supported by OLE server applications and, perhaps more importantly, valid values for function arguments. Whether/not anyone buys the assertion that starting with VBA prototypes is far more productive than pounding out OLE2 code from the very start, they will find the Object Browser invaluable as a reference -- I rely on it exclusively for this sort of documentation.
    A BRIEF INTRODUCTION TO THE VBA IDE & THE OBJECT BROWSER UTILITY
    Try this:
    1. Open Word
    2. Launch the VBA IDE by pressing <Alt><F11>
    3. Open the Object Browser by pressing <F2>
    The Object Browser allows you to visually navigate Word's class hierarchy. Its user interface is a bit crowded, so controls are unlabeled. Hovering the mouse cursor above a control will display a tooltip explaining that control's purpose. The browser's scope can be narrowed by using the Project/Library combo. Typing a keyword or substring in the Search Text combo and clicking on the Search button will cause all classes/members whose name contains the specified search text to be listed in the Search Results pane. Selecting an item from this list will update the two panes below it, showing the selected class, and its members. Beneath the Classes and Members panes is an untitled pane, gray in color, which displays details for the selected class/member, including hyperlinks to relevant information such as arguments, their types and allowable values. If Visual Basic Help is installed, pressing <F1> will display help on a selected class/member. (This feature can be installed from your Office install CD, if necessary.)
    NOTE: While it is possible to cut-and-paste the code examples that follow, I highly recommend that they be typed in by hand. Doing so will provide a better understanding of how the IDE's code completion behaves. Use code completion most efficiently by not using the mouse or <Enter> key when selecting from completion lists. Instead, just type enough letters to select the desired list element, then continue along as if you had typed the entire element, typing the next operator in your statement. It really is slick!
    HELLO WORLD - VBA-STYLE
    1. Open Word
    2. Launch the VBA IDE by pressing <Alt><F11>
    3. Select Module from the Insert menu.
    4. In the blank area that appears, enter the following code:
      Public Sub HelloWorld()
          Documents.Add
          Selection.TypeText ("Hello, world!")
      End Sub5. Press <F5> to run the code.
    If you switch back to Word by pressing <Alt><F11>, there should appear a newly-created document containing the text Hello, world!.
    A MORE AMBITIOUS EXAMPLE
    In this example, we will launch Word, type some text, and alter its formatting. For the purposes of this tutorial, consider it the process we wish to automate from within Forms.
    1. If Word is running, close it.
    2. Open any Office application except Word, such as Excel, Outlook or PowerPoint
    3. Launch the VBA IDE by pressing <Alt><F11>.
    4. Select References from the Tools menu -- a dialog should pop up.
    5. From within this dialog, locate and select Microsoft Word <version> Object Library, then click OK.
    6. Select Module from the Insert menu.
    7. In the blank area that appears, enter the following code:
    Public Sub LaunchWord()
        Dim app As Word.Application
        Set app = CreateObject("Word.Application")
        app.Visible = True                          '!!! IMPORTANT !!!
        app.Documents.Add
        With app.Selection
            .TypeText "This is paragraph 1."
            .TypeParagraph
            .TypeText "This is paragraph 2."
            .TypeParagraph
            .TypeText "This is paragraph 3."
        End With
        With ActiveDocument
            .Paragraphs(1).Range.Words(3).Bold = True
            .Paragraphs(2).Range.Words(3).Italic = True
            .Paragraphs(3).Range.Words(3).Underline = True
        End With
    End Sub8. Press <F5> to run the code.
    A new Word session should have been launched. Switch to it, to view the results of our handiwork!
    TAILORING VBA CODE INTENDED FOR OLE2 CONVERSION
    Now, things get a bit uglier. The code listed above gives a good idea of how concise VBA code can be, but With blocks and chained object references do not translate readily into OLE2 code. Here's the same process, rewritten in a more OLE2-friendly style. Note the numerous intermediate object references that have been declared.
    Public Sub LaunchWord()
        Dim app As Word.Application
        Dim doc As Word.Document
        Dim docs As Word.Documents
        Dim pars As Word.Paragraphs
        Dim par As Word.Paragraph
        Dim wrds As Word.Words
        Dim sel As Word.Selection
        Dim rng As Word.Range
        Set app = CreateObject("Word.Application")
        app.Visible = True                          '!!! IMPORTANT !!!
        Set doc = app.Documents.Add
        Set sel = app.Selection
        sel.TypeText "This is paragraph 1."
        sel.TypeParagraph
        sel.TypeText "This is paragraph 2."
        sel.TypeParagraph
        sel.TypeText "This is paragraph 3."
        Set pars = doc.Paragraphs
        'select third word of first paragraph and make it bold
        Set par = pars.Item(1)
        Set rng = par.Range
        Set wrds = rng.Words
        Set rng = wrds.Item(3)
        rng.Bold = True
        'select third word of second paragraph and italicize it
        Set par = pars.Item(2)
        Set rng = par.Range
        Set wrds = rng.Words
        Set rng = wrds.Item(3)
        rng.Italic = True
        'select third word of second paragraph and underline it
        Set par = pars.Item(3)
        Set rng = par.Range
        Set wrds = rng.Words
        Set rng = wrds.Item(3)
        rng.Underline = True
    End Sub
    TRANSFORMATION: CONVERTING VBA CODE INTO PL/SQL
    Here is the PL/SQL counterpart to our previous VBA routine. Compare printouts of the two and note their similarities. Notice the need for argument lists -- this causes the code to fluff up quite a bit, and really interferes with readability.
    PROCEDURE LAUNCH_WORD IS
      v_app OLE2.OBJ_TYPE;     -- Application
      v_doc OLE2.OBJ_TYPE;     -- Document
      v_docs OLE2.OBJ_TYPE;    -- Documents collection
      v_pars OLE2.OBJ_TYPE;    -- Paragraphs collection
      v_par OLE2.OBJ_TYPE;     -- Paragraph
      v_wrds OLE2.OBJ_TYPE;    -- Words collection
      v_sel OLE2.OBJ_TYPE;     -- Selection
      v_rng OLE2.OBJ_TYPE;     -- Range
      v_args OLE2.LIST_TYPE;   -- OLE2 argument list
    BEGIN
      /* launch Word and MAKE IT VISIBLE!!! */ 
        v_app := OLE2.CREATE_OBJ('Word.Application');
        OLE2.SET_PROPERTY(v_app, 'Visible', TRUE);
      /* initialize key object references */ 
        v_docs := OLE2.GET_OBJ_PROPERTY(v_app, 'Documents');
        v_doc := OLE2.INVOKE_OBJ(v_docs, 'Add');
        v_sel := OLE2.GET_OBJ_PROPERTY(v_app, 'Selection');
      /* type first paragraph */
        v_args := OLE2.CREATE_ARGLIST;
        OLE2.ADD_ARG(v_args, 'This is paragraph 1.');
        OLE2.INVOKE(v_sel, 'TypeText', v_args);
        OLE2.DESTROY_ARGLIST(v_args);
        OLE2.INVOKE(v_sel, 'TypeParagraph');
      /* type second paragraph */
        v_args := OLE2.CREATE_ARGLIST;
        OLE2.ADD_ARG(v_args, 'This is paragraph 2.');
        OLE2.INVOKE(v_sel, 'TypeText', v_args);
        OLE2.DESTROY_ARGLIST(v_args);
        OLE2.INVOKE(v_sel, 'TypeParagraph');
      /* type third paragraph */
        v_args := OLE2.CREATE_ARGLIST;
        OLE2.ADD_ARG(v_args, 'This is paragraph 3.');
        OLE2.INVOKE(v_sel, 'TypeText', v_args);
        OLE2.DESTROY_ARGLIST(v_args);
      /* set reference to Paragraphs collection */
        v_pars := OLE2.GET_OBJ_PROPERTY(v_doc, 'Paragraphs');
      /* select third word of first paragraph and make it bold */
        v_args := OLE2.CREATE_ARGLIST;
        OLE2.ADD_ARG(v_args, 1);
        v_par := OLE2.INVOKE_OBJ(v_pars, 'Item', v_args);
        OLE2.DESTROY_ARGLIST(v_args);
        v_rng := OLE2.GET_OBJ_PROPERTY(v_par, 'Range');
        v_wrds := OLE2.GET_OBJ_PROPERTY(v_rng, 'Words');
        v_args := OLE2.CREATE_ARGLIST;
        OLE2.ADD_ARG(v_args, 3);
        v_rng := OLE2.INVOKE_OBJ(v_wrds, 'Item', v_args);
        OLE2.SET_PROPERTY(v_rng, 'Bold', TRUE);
      /* select third word of second paragraph and italicize it */
        v_args := OLE2.CREATE_ARGLIST;
        OLE2.ADD_ARG(v_args, 2);
        v_par := OLE2.INVOKE_OBJ(v_pars, 'Item', v_args);
        OLE2.DESTROY_ARGLIST(v_args);
        v_rng := OLE2.GET_OBJ_PROPERTY(v_par, 'Range');
        v_wrds := OLE2.GET_OBJ_PROPERTY(v_rng, 'Words');
        v_args := OLE2.CREATE_ARGLIST;
        OLE2.ADD_ARG(v_args, 3);
        v_rng := OLE2.INVOKE_OBJ(v_wrds, 'Item', v_args);
        OLE2.SET_PROPERTY(v_rng, 'Italic', TRUE);
      /* select third word of second paragraph and underline it */
        v_args := OLE2.CREATE_ARGLIST;
        OLE2.ADD_ARG(v_args, 3);
        v_par := OLE2.INVOKE_OBJ(v_pars, 'Item', v_args);
        OLE2.DESTROY_ARGLIST(v_args);
        v_rng := OLE2.GET_OBJ_PROPERTY(v_par, 'Range');
        v_wrds := OLE2.GET_OBJ_PROPERTY(v_rng, 'Words');
        v_args := OLE2.CREATE_ARGLIST;
        OLE2.ADD_ARG(v_args, 3);
        v_rng := OLE2.INVOKE_OBJ(v_wrds, 'Item', v_args);
        OLE2.SET_PROPERTY(v_rng, 'Underline', TRUE);
    END;
    REFACTORING FOR REUSABILITY AND READABILITY
    While the previous procedure runs without errors, it suffers from poor readability which, in turn, makes it difficult to maintain. Here, we address those issues by moving repetetive low-level operations into separate procedures.
      PROCEDURE LAUNCH_WORD IS
        v_app OLE2.OBJ_TYPE;    -- Application
        v_doc OLE2.OBJ_TYPE;    -- Document
        v_docs OLE2.OBJ_TYPE;   -- Documents collection
        v_sel OLE2.OBJ_TYPE;    -- Selection
        v_args OLE2.LIST_TYPE;  -- OLE2 argument list
      BEGIN
        /* launch Word and MAKE IT VISIBLE!!! */ 
          v_app := OLE2.CREATE_OBJ('Word.Application');
          OLE2.SET_PROPERTY(v_app, 'Visible', TRUE);
        /* create a new Word document */ 
          v_docs := OLE2.GET_OBJ_PROPERTY(v_app, 'Documents');
          v_doc := OLE2.INVOKE_OBJ(v_docs, 'Add');
          v_sel := OLE2.GET_OBJ_PROPERTY(v_app, 'Selection');
        /* add a few paragraphs */
          PRINT_PARAGRAPH(v_sel, 'This is paragraph 1.');
          PRINT_PARAGRAPH(v_sel, 'This is paragraph 2.');
          PRINT_PARAGRAPH(v_sel, 'This is paragraph 3.');
        /* apply formatting */
          APPLY_FORMATTING(v_doc, 1, 3, 'Bold', TRUE);
          APPLY_FORMATTING(v_doc, 2, 3, 'Italic', TRUE);
          APPLY_FORMATTING(v_doc, 3, 3, 'Underline', TRUE);
      END;
      PROCEDURE APPLY_FORMATTING(
        v_doc OLE2.OBJ_TYPE,
        v_paragraph_num NUMBER,
        v_word_num NUMBER,
        v_attribute VARCHAR2,
        v_value BOOLEAN) IS
        v_pars OLE2.OBJ_TYPE;   -- Paragraphs collection
        v_par OLE2.OBJ_TYPE;    -- Paragraph
        v_wrds OLE2.OBJ_TYPE;   -- Words collection
        v_rng OLE2.OBJ_TYPE;    -- Range
        v_args OLE2.LIST_TYPE;  -- OLE2 argument list
      BEGIN
        /* set reference to Paragraphs collection */
          v_pars := OLE2.GET_OBJ_PROPERTY(v_doc, 'Paragraphs');
        /* get specified paragraph */   
          v_args := OLE2.CREATE_ARGLIST;
          OLE2.ADD_ARG(v_args, v_paragraph_num);
          v_par := OLE2.INVOKE_OBJ(v_pars, 'Item', v_args);
          OLE2.DESTROY_ARGLIST(v_args);
        /* get words for specified paragraph */
          v_rng := OLE2.GET_OBJ_PROPERTY(v_par, 'Range');
          v_wrds := OLE2.GET_OBJ_PROPERTY(v_rng, 'Words');
        /* apply formatting to word found at specified index */
          v_args := OLE2.CREATE_ARGLIST;
          OLE2.ADD_ARG(v_args, v_word_num);
          v_rng := OLE2.INVOKE_OBJ(v_wrds, 'Item', v_args);
          OLE2.SET_PROPERTY(v_rng, v_attribute, v_value);
      END;
      PROCEDURE PRINT_PARAGRAPH(v_sel OLE2.OBJ_TYPE, v_text VARCHAR2) IS
        v_args OLE2.LIST_TYPE;
      BEGIN
        v_args := OLE2.CREATE_ARGLIST;
        OLE2.ADD_ARG(v_args, v_text);
        OLE2.INVOKE(v_sel, 'TypeText', v_args);
        OLE2.DESTROY_ARGLIST(v_args);
        OLE2.INVOKE(v_sel, 'TypeParagraph');
      END;
    CONCLUSION
    It is my hope that this tutorial, despite it's introductory nature, has demonstrated the value of the VBA IDE, the ease with which automation processes can be prototyped using VBA, the noticeable similarity between VBA automation routines and their Forms PL/SQL counterparts, and the advantages of testing automation processes within the VBA IDE. Please feel free to follow up with any specific questions or concerns you may have.
    Thanks,
    Eric Adamson
    Lansing, Michigan
    FINAL NOTE: These examples use the OLE2 built-in, and will operate correctly when called from forms running in the Form Builder OC4J. Deploying them to an Oracle Application Server will launch Word on the server itself (if available), which is usually not the developer's intent! Automating Word client-side via web forms requires adding WebUtil support. Adapting the code for WebUtil is trivial -- just replace all instances of OLE2 with CLIENT_OLE2. Adapting forms for WebUtil and configuring OLE support into your Oracle Application Server, however, are beyond the scope of this tutorial.
    REVISION HISTORY
    This promises to be something of a 'living document'. I've snuck changes through without comment in the past, but in the future, I'll try to document significant changes here.
    2006-08-21
      * Prefaced boring subject line with text: 'Tutorial:' to clarify purpose
      * Added emphasis on value of Object Browser as a reference

    Thanks James, for your kind words. I do hope this information will help folks out. I honestly believe that tinkering around in the VBA IDE will prove highly gratifying for automation developers. It can be assured that learning to make Word jump through hoops is much more straight-forward in this environment. I'm not one for mottos, but if I were pressed for a cheesy motto, I would say: First, make it work. Then, make it work in Oracle!
    Once the idea has sunk in, that Visual Basic routines for automating Word are exact analogs to their OLE2 counterparts, we can remove keywords like Oracle and PL/SQL from our Google searches on Word automation which, at least in this context, are the proverbial kiss of death. Suddenly we find ourselves liberated by the possibility of steal-, ahem... borrowing ideas from the Visual Basic* community!
    As for links, my link of choice is invariably http://groups.google.com -- if you don't already use it at least ten times a day, you must try it. This is the venerable USENET archive, including the holdings of now-extinct DejaNews. Another possible site of interest is http://word.mvps.org/FAQs/MacrosVBA, which may serve as a good starting point for those who wish to learn how to do fancy tricks with Word using VBA.
    If these links don't prove immediately helpful, please feel free to give specifics on the sort of operations you are interested in automating, and I'll see if I can post an example that addresses it.
    Regards,
    Eric Adamson
    Lansing, Michigan
    PS: I do hope, as people read my posts, with every other acronym being VBA, that they are not mistakenly hearing a call to learn Visual Basic. I say this, not because I believe learning VB would be a Bad Thing, but because I assume that few of us feel we have the time to learn a new programming language. Despite having come to the Oracle camp already knowing VB/VBA, and having acquired a fair bit of experience with automating Office applications as an Access developer, I remain confident that what I am suggesting people attempt does not rise to the level of learning a language. What I am suggesting is that they learn enough of the language to get by.
    *VB vs. VBA
    Just a quick word on this, as readers may wonder why I seem to use these terms interchangeably. Visual Basic (VB) can refer to either a development platform or a programming language. Visual Basic for Applications (VBA) is a language -- more precisely, it is a subset of the Visual Basic language. One purchases VB, usually quite intentionally. VBA is included with Microsoft Office, as is VBA's development environment, the VBA IDE. The key distinction between VB and VBA is that VBA cannot be used to create self-contained executables. Rather, VBA relies on VBA-enabled applications, such as Microsoft Office applications, to serve as a container for VBA code, and to provide a runtime environment for that code. For the purposes of discussing OLE Automation, VB and VBA are quite interchangeable.

  • Berkeley DB XML crash with multiple readers (dbxml-2.5.16 and db-4.8.26)

    I am using Berkeley DB XML (v. 2.5.16 and the bundled underlying Berkeley DB 4.8.26, which I suppose is now fairly old) to manage an XML database which is read by a large number (order 100) of independent worker processes communicating via MPI. These processes only read from the database; a single master process performs writes.
    Everything works as expected with one or two worker processes. But with three or more, I am experiencing database panics with the error
    pthread lock failed: Invalid argument
    PANIC: Invalid argument
    From searching with Google I can see that issues arising from incorrectly setting up the environment to support concurrency are are fairly common. But I have not been able to find a match for this problem, and as far as I can make out from the documentation I am using the correct combination of flags; I use DB_REGISTER and DB_RECOVER to handle the fact that multiple processes join the environment independently. Each process uses on a single environment handle, and joins using
    DB_ENV* env;
    db_env_create(&env, 0);
    u_int32_t env_flags = DB_INIT_LOG | DB_INIT_MPOOL | DB_REGISTER | DB_RECOVER | DB_INIT_TXN | DB_CREATE;
    env->open(env, path to environment, env_flags, 0);
    Although the environment requests DB_INIT_TXN, I am not currently using transactions. There is an intention to implement this later, but my understanding was that concurrent reads would function correctly without the full transaction infrastructure.
    All workers seem to join the environment correctly, but then fail when an attempt is made to read from the database. They will all try to access the same XML document in the same container (because it gives them instructions about what work to perform). However, the worker processes open each container setting the read-only flag:
    DbXml::XmlContainerConfig models_config;
    models_config.setReadOnly(true);
    DbXml::XmlContainer models = this->mgr->openContainer(path to container, models_config);
    Following the database panic, the stack trace is
    [lcd-ds283:27730] [ 0] 2   libsystem_platform.dylib            0x00007fff8eed35aa _sigtramp + 26
    [lcd-ds283:27730] [ 1] 3   ???                                 0x0000000000000000 0x0 + 0
    [lcd-ds283:27730] [ 2] 4   libsystem_c.dylib                   0x00007fff87890bba abort + 125
    [lcd-ds283:27730] [ 3] 5   libc++abi.dylib                     0x00007fff83aff141 __cxa_bad_cast + 0
    [lcd-ds283:27730] [ 4] 6   libc++abi.dylib                     0x00007fff83b24aa4 _ZL25default_terminate_handlerv + 240
    [lcd-ds283:27730] [ 5] 7   libobjc.A.dylib                     0x00007fff89ac0322 _ZL15_objc_terminatev + 124
    [lcd-ds283:27730] [ 6] 8   libc++abi.dylib                     0x00007fff83b223e1 _ZSt11__terminatePFvvE + 8
    [lcd-ds283:27730] [ 7] 9   libc++abi.dylib                     0x00007fff83b21e6b _ZN10__cxxabiv1L22exception_cleanup_funcE19_Unwind_Reason_CodeP17_Unwind_Exception + 0
    [lcd-ds283:27730] [ 8] 10  libdbxml-2.5.dylib                  0x000000010f30e4de _ZN5DbXml18DictionaryDatabaseC2EP8__db_envPNS_11TransactionERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEERKNS_15ContainerConfigEb + 1038
    [lcd-ds283:27730] [ 9] 11  libdbxml-2.5.dylib                  0x000000010f2f348c _ZN5DbXml9Container12openInternalEPNS_11TransactionERKNS_15ContainerConfigEb + 1068
    [lcd-ds283:27730] [10] 12  libdbxml-2.5.dylib                  0x000000010f2f2dec _ZN5DbXml9ContainerC2ERNS_7ManagerERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPNS_11TransactionERKNS_15ContainerConfigEb + 492
    [lcd-ds283:27730] [11] 13  libdbxml-2.5.dylib                  0x000000010f32a0af _ZN5DbXml7Manager14ContainerStore13findContainerERS0_RKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPNS_11TransactionERKNS_15ContainerConfigEb + 175
    [lcd-ds283:27730] [12] 14  libdbxml-2.5.dylib                  0x000000010f329f75 _ZN5DbXml7Manager13openContainerERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPNS_11TransactionERKNS_15ContainerConfigEb + 101
    [lcd-ds283:27730] [13] 15  libdbxml-2.5.dylib                  0x000000010f34cd46 _ZN5DbXml10XmlManager13openContainerERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS_18XmlContainerConfigE + 102
    Can I ask if it's clear to anyone what I am doing wrong?

    Is it possible that the root problem to this is in the MPI code or usage?  Because if the writer process crashes while holding an active transaction or open database handles, it could leave the environment in an inconsistent state that would result in the readers throwing a PANIC error when they notice the inconsistent environment.
    Thanks for looking into this.
    It looks like there was a small typo in the code I quoted, and I think it was this which caused the segmentation fault or memory corruption. Although I checked a few times that the code snippet produced expected results before posting it, I must have been unlucky that it just happened not to cause a segfault on those attempts.
    This is a corrected version:
    #include <iostream>
    #include <vector>
    #include "dbxml/db.h"
    #include "dbxml/dbxml/DbXml.hpp"
    #include "boost/mpi.hpp"
    static std::string envname = std::string("test");
    static std::string pkgname = std::string("packages.dbxml");
    static std::string intname = std::string("integrations.dbxml");
    int main(int argc, char *argv[])
        boost::mpi::environment  mpi_env;
        boost::mpi::communicator mpi_world;
        if(mpi_world.rank() == 0)
            std::cerr << "-- Writer creating environment" << std::endl;
            DB_ENV *env;
            int dberr = ::db_env_create(&env, 0);
            std::cerr << "**   creation response = " << dberr << std::endl;
            if(dberr > 0) std::cerr << "**   " << ::db_strerror(dberr) << std::endl;
            std::cerr << "-- Writer opening environment" << std::endl;
            u_int32_t env_flags = DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL | DB_REGISTER | DB_RECOVER | DB_INIT_TXN | DB_CREATE;
            dberr = env->open(env, envname.c_str(), env_flags, 0);
            std::cerr << "**   opening response = " << dberr << std::endl;
            if(dberr > 0) std::cerr << "**   " << ::db_strerror(dberr) << std::endl;
            // set up XmlManager object
            DbXml::XmlManager *mgr = new DbXml::XmlManager(env, DbXml::DBXML_ADOPT_DBENV | DbXml::DBXML_ALLOW_EXTERNAL_ACCESS);
            // create containers - these will be used by the workers
            DbXml::XmlContainerConfig pkg_config;
            DbXml::XmlContainerConfig int_config;
            pkg_config.setTransactional(true);
            int_config.setTransactional(true);
            std::cerr << "-- Writer creating containers" << std::endl;
            DbXml::XmlContainer packages       = mgr->createContainer(pkgname.c_str(), pkg_config);
            DbXml::XmlContainer integrations   = mgr->createContainer(intname.c_str(), int_config);
            std::cerr << "-- Writer instructing workers" << std::endl;
            std::vector<boost::mpi::request> reqs(mpi_world.size() - 1);
            for(unsigned int                 i = 1; i < mpi_world.size(); i++)
                reqs[i - 1] = mpi_world.isend(i, 0); // instruct workers to open the environment
            // wait for all messages to be received
            boost::mpi::wait_all(reqs.begin(), reqs.end());
            std::cerr << "-- Writer waiting for termination responses" << std::endl;
            // wait for workers to advise successful termination
            unsigned int outstanding_workers = mpi_world.size() - 1;
            while(outstanding_workers > 0)
                boost::mpi::status stat = mpi_world.probe();
                switch(stat.tag())
                    case 1:
                        mpi_world.recv(stat.source(), 1);
                        outstanding_workers--;
                        break;
            delete mgr; // exit, closing database and environment
        else
            mpi_world.recv(0, 0);
            std::cerr << "++ Reader " << mpi_world.rank() << " beginning work" << std::endl;
            DB_ENV *env;
            ::db_env_create(&env, 0);
            u_int32_t env_flags = DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL | DB_REGISTER | DB_RECOVER | DB_INIT_TXN | DB_CREATE;
            env->open(env, envname.c_str(), env_flags, 0);
            // set up XmlManager object
            DbXml::XmlManager *mgr = new DbXml::XmlManager(env, DbXml::DBXML_ADOPT_DBENV | DbXml::DBXML_ALLOW_EXTERNAL_ACCESS);
            // open containers which were set up by the master
            DbXml::XmlContainerConfig pkg_config;
            DbXml::XmlContainerConfig int_config;
            pkg_config.setTransactional(true);
            pkg_config.setReadOnly(true);
            int_config.setTransactional(true);
            int_config.setReadOnly(true);
            DbXml::XmlContainer packages     = mgr->openContainer(pkgname.c_str(), pkg_config);
            DbXml::XmlContainer integrations = mgr->openContainer(intname.c_str(), int_config);
            mpi_world.isend(0, 1);
            delete mgr; // exit, closing database and environment
        return (EXIT_SUCCESS);
    This repeatably causes the crash on OS X Mavericks 10.9.1. Also, I have checked that it repeatably causes the crash on a virtualized OS X Mountain Lion 10.8.5. But I do not see any crashes on a virtualized Ubuntu 13.10. My full code likewise works as expected with a large number of readers under the virtualized Ubuntu. I am compiling with clang and libc++ on OS X, and gcc 4.8.1 and libstdc++ on Ubuntu, but using openmpi in both cases. Edit: I have also compiled with clang and libc++ on Ubuntu, and it works equally well.
    Because the virtualized OS X experiences the crash, I hope the fact that it works on Ubuntu is not just an artefact of virtualization. (Unfortunately I don't currently have a physical Linux machine with which to check.) In that case the implication would seem to be that it's an OS X-specific problem. 2nd edit (14 Feb 2014): I have now managed to test on a physical Linux cluster, and it appears to work as expected. Therefore it does appear to be an OS X-specific issue.
    In either OS X 10.8 or 10.9, the crash produces this result:
    -- Writer creating environment
    **   creation response = 0
    -- Writer opening environment
    **   opening response = 0
    -- Writer creating containers
    ++ Reader 7 beginning work
    -- Writer instructing workers
    -- Writer waiting for termination responses
    ++ Reader 1 beginning work
    ++ Reader 2 beginning work
    ++ Reader 3 beginning work
    ++ Reader 4 beginning work
    ++ Reader 5 beginning work
    ++ Reader 6 beginning work
    pthread lock failed: Invalid argument
    PANIC: Invalid argument
    PANIC: fatal region error detected; run recovery
    PANIC: fatal region error detected; run recovery
    PANIC: fatal region error detected; run recovery
    PANIC: fatal region error detected; run recovery
    PANIC: fatal region error detected; run recovery
    PANIC: fatal region error detected; run recovery
    PANIC: fatal region error detected; run recovery
    libc++abi.dylib: terminate called throwing an exception
    [mountainlion-test-rig:00319] *** Process received signal ***
    [mountainlion-test-rig:00319] Signal: Abort trap: 6 (6)
    [mountainlion-test-rig:00319] Signal code:  (0)
    David
    Message was edited by: ds283

Maybe you are looking for