How to set container type in PHP

Hello, I wanna to set the type of container to be XmlContainer::WholedocContainer. However it did not work, the php warnning "Fatal error: Undefined class constant 'WholedocContainer'". The book named The Definitive Guide to Berkeley DB XML told that the delimiter in php was replaced by underscore. But this guide leads php completely fall. How could I do to correctly set up the parameter? Thanks
Edited by: user10993398 on Dec 14, 2009 5:36 PM

Hi,
Here is an example for dbxml-2.5.13:
<?   
function initDbXmlSystem()   
    global $_REQUEST;   
    $envName  = "./tmp";   
    $contName = "result.dbxml";   
    $env      = new Db4Env();   
    $env->open($envName);   
    $mgr = new XmlManager($env, DBXML_ALLOW_EXTERNAL_ACCESS);   
    $config = new XmlContainerConfig();   
    $config->setTransactional(true);   
    $config->setContainerType(XmlContainer_WholedocContainer);   
    $mgr->setDefaultContainerConfig($config);   
    $cont = $mgr->createContainer($contName);   
initDbXmlSystem();   
echo "DONE";   
?> 

Similar Messages

  • How to set field type choice using csom (c#)

    I have a field type: Choice (menu to choose from) which is not multichoice. How do I set a value?
    I have found code for multiple choice but it doesn't seem to work for single choice.

    Hi,
    The following code snippet for your reference:
    newListItem["ChoiceFieldName"] = "ChoiceValue";
    newListItem.Update();
    clientContext.Load(newListItem);
    clientContext.ExecuteQuery();
    If you are assigning a Value which is not in the Choice Column, You need to create a choice value then assign it to the item.
    More information is here:
    http://sharepoint.stackexchange.com/questions/124999/how-to-set-field-type-choice-using-csom-c
    Best Regards
    Dennis Guo
    TechNet Community Support

  • I download itext  for convert jsp to PDF. How to set content type for PDF.

    I download itext for convert jsp to PDF. How to set content type for PDF. I try
    <%@ page contentType = "application/pdf;charset=TIS-620" %>
    , but the page does not PDF.
    Thank.

    PDF files are usually binary files, JSPs are not well-suited for binary content.
    (If you download the result of your JSP you'll see that it is not a valid PDF file; it will have probably a lot of whitespace and linefeeds, that will choke your PDF reader.). The first few characters must be
    "%PDF-" without whitespace.
    You can try using PDF files encoded as text - check if you can use text-encoded PDFs in iText.
    Try using a Servlet instead.

  • How to set Screen type "Selection Screen" in Dialog program

    Hi Experts,
    I have copied a screen 400 from a program into my program. In that screen in source program, the screen type was defined as 'Selection Screen'. After i copied that screen into my program, the screen type Selection Screen option is disabled. How to set the screen type of a screen to Selection Screen.
    I am currently getting the following error
    "Error when generating the selection screen "0400" of   "Ztest_screen                 ".
    I tried running the generation program RSDBGENA. There the diagnosis was given as follows:
    When generating the report Ztest_screen and its selection screen, an existing screen 1000 (not a selection screen) was overwritten.
    The selection screen was defined as follows:
    SELECTION-SCREEN BEGIN OF SCREEN 400 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK blck1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: s_matnr FOR mara-matnr.
    PARAMETERS:     p_werks TYPE werks_d OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK blck1.
    SELECTION-SCREEN END OF SCREEN 400 .
    I am calling the screen 400 with selection screen declarations in PBO of screen 0100.
    CALL SUBSCREEN sub_scr INCLUDING 'Ztest_Screen'  '400'.
    Where am i going wrong? Your inputs are needed.
    Thanks

    Thanks Przemysław and Nabheet for your suggestions.
    I had copied the generated screen 400 also from the source program into my program. This was the error. I deleted that and the report got activated now.
    Both the source and destination programs are not module pool. They are executable programs.
    Thanks

  • How to set content-type for outbound mail in BCS

    Hey everybody,
    can anybody please give me a hint how to set the content-type for outbound email in ABAP using BCS to send mail.
    By default the content tyoe is set to text/html. I need other.
    Best regards
    Roman

    //add related mutip-part to combine parts
    MimeMultipart multipart = new MimeMultipart("related");
    //attach a pdf
    messageBodyPart = new MimeBodyPart();
    fds = new FileDataSource("h:/something.pdf");
    messageBodyPart.setDataHandler(new DataHandler(fds));
    messageBodyPart.setFileName(fds.getName());
    multipart.addBodyPart(messageBodyPart);
    //add multipart to the message
    message.setContent(multipart);
    //send message
    Transport.send(message);

  • How to set task type of a task in MS Project using excel vba code.

    Hello Gurus,
    I am generating MS Project files(.mpp) files form excel data. An excel macro in the excel file will read the excel data and will generate the .mpp file. It is working fine. now i want to set the task type of all the tasks to "Fixed work" from excel
    vba code.
    How to use the property PjTaskFixedType in setting the task type??
    refer below links
    http://msdn.microsoft.com/en-us/library/office/ff861713.aspx
    http://msdn.microsoft.com/en-us/library/office/ff864157.aspx
    Can someone help me in setting task type property from excel vba.
    I have attached my sample code used to generate the mpp file. It is not the complete code but you will get an idea from it.
    Set pjApp = CreateObject("MSProject.Application")
    pjApp.FileNew
    Set newproj = pjApp.ActiveProject
    newproj.Tasks.Add (task_name)
    newproj.Tasks(mpp_row_number).Start = task_start_date
    newproj.Tasks(mpp_row_number).Finish = task_end_date
    newproj.Tasks(mpp_row_number).ResourceNames = resource_name
    pjApp.FileSaveAs mpp_file_save_path & mpp_file_name & ".mpp"
    pjApp.FileClose
    pjApp.Quit
    Any help is appreciated.

    Hi Syamku,
    A simple example that sets the task type:
    ActiveProject.Tasks(2).Type = pjFixedDuration
    ActiveProject.Tasks(3).Type = pjFixedUnits
    ActiveProject.Tasks(4).Type = pjFixedWork
    http://msdn.microsoft.com/en-us/library/office/ff860469(v=office.15).aspx
    Hope this helps

  • How to set MIME type for JNLP in Windows2000 IIS

    Hi!
    I try to set up my windows 2000 IIS's MIME type for JNLP to test java web start, but I have no idea how to set
    the MIME type. Can anybody help me???
    Best wishes

    In IIS v4 which comes with the Windows NT4 option pack, you right click the web page you are working with, select properties, then go to the HTTP Headers tab. At the bottom there's a button labelled File Types in the MIME Map section.
    After you've clicked that, you can add the two mime types you need;
    Associated Extension MIME Type
    .jar application/x-java-jar-file
    .jnlp application/x-java-jnlp-file
    I'm assuming that it is the same in W2k/IIS5.

  • How to set security type for lenovo working with hotspot?

    How to set wireless security type for lenovo laptop working with hotspot?
    Since I can connect with the other laptops except this brand.

    //add related mutip-part to combine parts
    MimeMultipart multipart = new MimeMultipart("related");
    //attach a pdf
    messageBodyPart = new MimeBodyPart();
    fds = new FileDataSource("h:/something.pdf");
    messageBodyPart.setDataHandler(new DataHandler(fds));
    messageBodyPart.setFileName(fds.getName());
    multipart.addBodyPart(messageBodyPart);
    //add multipart to the message
    message.setContent(multipart);
    //send message
    Transport.send(message);

  • How does set metric-type internal (bgp) work?

    i can't realise how the command "set metric-type internal " to work.
    bgp announce to ebgp use the igp next-hop metric as the med.
    the igp means only isis?
    does ospf use it ?
    will you tell me how to use it ? give me an example . thinks

    Hi,
    This command can be used into two different contexts:
    1- Redistribution into ISIS
    When you are redistributing routes into ISIS, you have the choice to set the metric-type as internal (between 0 and 64) or external (between 65 and 128)
    Internal metric are always prefer over external metric
    2- Set the MED to reflect IGP cost to the NH on eBGP updates
    You are receiving an iBGP update and before sending it to your eBGP peers, you want the MED for that prefix set to your IGP cost to the iBGP peer announcing this prefix.
    In this case the IGP can be anything.
    This command is not necessary if you are redistributing the route into BGP directly instead of receiving them from iBGP. In such case, the MED reflects by default the IGP cost of the redistributed prefix.
    HTH
    Laurent.

  • Problem setting XmlValue type throug PHP api

    When i try to add metadata to a document and set its value to DATE_TIME i get an error:
    Warning: xmlvalue::xmlvalue() expects exactly 1 parameter, 2 given in ...Code:
    $v = new XmlValue(XmlValue_DATE_TIME, "2006-01-01T01:01:01");
    Can i set specific metadata types through php?
    Thank you.

    Apply this patch to dbxml/src/php/php_dbxml_value.cpp and it will work.
    Index: php_dbxml_value.cpp
    ===================================================================
    RCS file: /a/CVSROOT/xml/src/php/php_dbxml_value.cpp,v
    retrieving revision 1.16
    diff -r1.16 php_dbxml_value.cpp
    35c35,38
    <
    long type;
    char *value;
    int valueLen;
    40,41c43
    <   }
    <   else if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z!", &val)) {
    } else if (SUCCESS == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "z!", &val)) {43a46,48
    } else if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ls", &type, &value, &valueLen)) {
    This = XmlValue((XmlValue::Type)type, value);
    php_dbxml_set_XmlValue_object_pointer(getThis(), This TSRMLS_CC);

  • ALV Graphs: How to set line type graph as default graph

    Hi All,
    I need to develop a line graph. The fields on the X-axis will change dynamically. Some times they may be 10 field and some times they may be more than 100 fields. I tried with Function Module GFW_PRES_SHOW_MULT. But I can only display maximum 32 fields. Can anyone tell me exact program which helps me to full fill my requirement. It will be a great help if you could told how do display line type graph as default graph in ALV.  In REUSE_ALV_GRID_DISPLAY there is a Exporting parameter MT_CHART_TYPES but this help you only to enter description for X-axis and Y-axis.
    Many thanks in advance.

    I would call GRAPH_MATRIX_2D with options depending on representation you wish
    look at the program GRBUSG_1 to see how to use it
    there you have some options to display bar chart, but you could use other values (complete list of options is available in documentation of function module GRAPH_MATRIX_2D - click on parameter OPTS in help display to see full explanation)
    exemple:
    P2TYPE = LN to display lines

  • How to set content type while sending an email?

    Hello,
    I want to set content type text/html while send an email using org.apache.commons.httpclient api. I am using MultipartPostMethod method. and i am set using object of multipartpostmethod like post.
    and post.setRequestHeader("Content-Type","text/html").
    but it wont work.
    so please give me a proper solution.
    example::
    MultipartPostMethod post = new MultipartPostMethod("url");
    post.addParameter("msgbody","html message");
    post.setRequestHeader("Content-Type","text/html");
    Regards,
    Bhavesh Kharwa

    Actually, I'm writing a "HashMap" from servlet to applet. I have used your suggested content type "application/octet-stream" and another "appication/x-java-serialized-object" to try it. But in applet side, when I use (HashMap)in.readObject(), it always gives me a exception as:"java.util.HashMap; IllegalAccessException". Why?
    Thankd.

  • How to set integer type property using um:setProperty

    Using WLP 8.1 .
    Can anyone help to set integer type property programmatically.
    i tried <um:setProperty> . but it can send only string or object type
    not Integer.
    tia
    Mahesh

    Thanks
    It worked for me
    Mahesh.
    Gregory Smith <[email protected]> wrote:
    For Numeric properties, I believe you actually need to use a
    java.lang.Long object (which extends java.lang.Object so it should compile):
    <um:setProperty propertySet="..." propertyName="..."
    value="<%=new Long(10)%>" />
    Greg
    Mahesh wrote:
    Using WLP 8.1 .
    Can anyone help to set integer type property programmatically.
    i tried <um:setProperty> . but it can send only string orobject type
    not Integer.
    tia
    Mahesh

  • How to set mime types in AppServer 8

    Couldn't find commands to list mime types or set mime types used by Sun Java Application Server 8

    Hi,
    Please refer to Adding Mime types and let me know if that address to solve your problem.
    Regards
    Ganesh .R
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers/support

  • Urgent: How to set content type on upload depending on target folder?

    Hi,
    i have to set the content type of a file uploaded via SMB depending on the folder the file is placed in. All files placed below a certain root directory have to be of my custom content type. All others should be stored as documents of type "Document". Is there an easy way to accomplish this task? I can't assume any specific file extensions and can therefore not register my custom content type to that extension.
    Any hints are welcome.
    Thanks.

    Hi,
    i have to set the content type of a file uploaded via SMB depending on the folder the file is placed in.All files placed below a certain root directory have to be of my custom content type.
    +++ Use an agent to verify the name and extension using the IfsEvent class and EVENTTYPE_CREATEINSTANCE
    All others should be stored as documents of type "Document". Is there an easy way to accomplish this task?
    +++ Those that aren't your custom content type move to a different folder using the agent.
    I can't assume any specific file extensions and can therefore not register my custom content type to that extension.
    +++I've found that registering content type only really affects things like how a browser knows what kind of file it's downloading/looking at (mime type) or how a renderer knows how to render it.
    Any hints are welcome.
    Thanks.

Maybe you are looking for

  • Javascript is not working in JSP

    Hi everybody, My javascript is not working in JSP.I m not able to fix this problem.Please tell where the problem in code. thx in advance. <%@page import="javax.servlet.http.*" %> <%@page import="java.sql.*" %> <html> <head> <script type="text/javascr

  • Relinking no longer auto-selects the file

    I've noticed something since upgrading to CS 5.5 that has created a minor inconvenience for me, and I was wondering if it was a preference I can change. Previously, if you open an InDesign document that had missing links, you could click "relink", na

  • Script and program name for MM:OUTWARD CHELLAN

    Hi all , can any one give me the script name and program name  for MM:OUTWARD CHELLAN. Regards, Arun.j

  • My fan is on ALL the time. Any ideas?

    Hi Appleheads, My Macbooks fan just keeps on running. I am using Safari, iTunes, Mail and sometimes Firefox. I don't use any big apps so not sure why it's going mental. It has been doing this for the past 2 or 3 weeks. It's doing my nut in. I've alre

  • Adding named constraints from another schema using stored procedures

    I need some help. I am trying to create a constraint like Primary key on a table in schema say 'a' from schema 'b'. in Oracle 10g. Schema b has all permissions of create, alter table, create index and other permissions required. I can create this con