Problem creating db function via cfquery tag

I am trying to create a database UDF using the coldfusion
cfquery tag. My query is pasted below. The error I get is:
"Incorrect syntax near 'go'.. "
Is there a way of running multiple sql commands in a cfquery
tag?
<cfquery name="createUDFcheckPermissions"
datasource="#arguments.extranetBuilderDSN#">
use bungi;
go
CREATE FUNCTION dbo.checkPermissions(@ItemPermissionsList
varchar(8000),@UserPermissionsList varchar(8000))
RETURNS bit
AS
BEGIN
declare @Return bit
declare @Value varchar(8000)
set @Return = 1
set @ItemPermissionsList = @ItemPermissionsList + ','
While (Charindex(',',@ItemPermissionsList)>0)
Begin
Set @Value =
ltrim(rtrim(Substring(@ItemPermissionsList,0,Charindex(',',@ItemPermissionsList))))
if (@Value!=null AND @Value!='')
begin
set @return = case WHEN
Charindex(@Value,@UserPermissionsList) > 0 THEN @return ELSE 0
END
END
Set @ItemPermissionsList =
Substring(@ItemPermissionsList,Charindex(',',@ItemPermissionsList)+1,len(@ItemPermissions List))
End
Return @Return
END
go
GRANT EXECUTE ON [dbo].[checkPermissions] TO [sqlaccount]
GRANT EXECUTE ON [dbo].[checkPermissions] TO [sqlbungi]
</cfquery>

> <cfquery name="createUDFcheckPermissions"
> datasource="#arguments.extranetBuilderDSN#">
> use bungi;
Is this necessary? Does the DB user you're using for the DSN
have
permissions to any more than one DB?
Usually even if the user does, you'd specify the specific DB
when
name-spacing the object you're referencing, via some
variation of
[db][user][object name] or something like that, wouldn't you?
> go
I think you'll find this is is a client directive, not a DB
server
directive. It tells the DB client that you copy and pasted
this from to
execute the SQL. It shouldn't be in SQL you're sending to the
DB server
via CF.
> GRANT EXECUTE ON [dbo].[checkPermissions] TO
[sqlaccount]
> GRANT EXECUTE ON [dbo].[checkPermissions] TO [sqlbungi]
Put these two in separate, subsequent <cfquery> calls.
Adam

Similar Messages

  • Problem creating a function based index

    Hi,
    Database: 8.0.6
    OS: win 2000 server
    I want to create a function based index as shown below:
    sql> create index new_index on A_INP_PATIENTS_ADMT(bus_unit, admit_status_flag, nvl(clinical_discharge_yn,'N'), ward_code)
    When i press return its showing error,
    "ORA-00907: missing right parenthesis"
    Please show me how to rewrite this query to build function based index.
    Best Regards,
    Edited by: ateeqrahman on Jun 6, 2010 2:34 PM

    Your sql is fine:
    SQL> CREATE TABLE A_INP_PATIENTS_ADMT(
      2                                   bus_unit number,
      3                                   admit_status_flag varchar2(1),
      4                                   clinical_discharge_yn varchar2(1),
      5                                   ward_code varchar2(10)
      6                                  )
      7  /
    Table created.
    SQL> create index new_index on A_INP_PATIENTS_ADMT(bus_unit, admit_status_flag, nvl(clinical_discharge_yn,'N'), ward_code)
      2  /
    Index created.
    SQL> You did not post Oracle version. Most likely, you are on some older version that does not support FBI. Otherwise, post your version and table description and create index statement execution showing all errors you are getting.
    SY.

  • Problem using different plugins via OBJECT tag

    Hi all,
    before installing JRE 1.5.0_06 everything was well. I had 3 different JREs (1.3.1_02, 1.3.1_08, 1.4.2_06) installed on one Windows system which could be invoked in Internet Explorer 6 for an applet as described in http://java.sun.com/j2se/1.5.0/docs/guide/plugin/developer_guide/version.html
    example:
    <HTML>
    <HEAD>
    <TITLE>Java Plugin 1.3.1_08</TITLE>
    </HEAD>
    <BODY>
    Java Plugin 1.3.1_08:�
    <OBJECT classid="clsid:CAFEEFAC-0013-0001-0008-ABCDEFFEDCBA" width="150" height="25">
    Plugin missing
    <PARAM name="code" value="HelloWorld.class">
    </OBJECT>
    </BODY>
    </HTML>
    (Note: The output of my HelloWorld class is the VM's version number.)
    After installing 1.5.0_06 it doesn't work anymore. The new 1.5.0_6 is always used. Does anybody have a clue?
    Thanks in advance
    Peter

    I've seen a similar problem that didn't seem to exist with JRE 1.5.0_05 but does with 1.5.0_06. On the JRE 1.5.0_06 workstation the Windows registry contains CAFEEFAC-... entries for what looks to be all 1.3/1.4/1.5 JREs and points them all to the 1.5.0_06 JRE plugin dll, even though there is still a 1.4 JRE on the workstation. So even when you specify an OBJECT tag with a classid such as classid="clsid:CAFEEFAC-0014-0001-0010-ABCDEFFEDCBA" that should load the 1.4 plugin by design, the 1.5 plugin is loaded. This seems to defeat the multi-version JRE support. The JRE 1.5.0_05 workstation on the other hand didn't overwrite CAFEEFAC-... Windows registry entries for previous JREs, and properly loads a specfic JRE's plugin when specified by a CAFEEFAC-... classid in the OBJECT tag.

  • Problem creating JMS Error Destination via Ant in WLS 8.1

    We've got several JMS queues in our application. We create the server via Ant (using the wlconfig task).
    All is well, the queues have been working fine, until we try to add an error destination queue (after several attempts to handle the message, it'll be sent to the error queue for later troubleshooting).
    Here's an example of what we've got now:
    <create type="JMSQueue" name="batchQueue" property="jmsqueue">
        <set attribute="JNDIName" value="net.nike.cdm.batchQueue"/>
        <set attribute="RedeliveryLimit" value="5"/>
    </create>We create another queue to handle the errors, and then add an attribute to the first to point to the second:
    <create type="JMSQueue" name="batchErrorQueue" property="batchErrorQueue">
        <set attribute="JNDIName" value="net.nike.cdm.batchErrorQueue"/>
        <set attribute="RedeliveryLimit" value="5"/>
    </create>
    <create type="JMSQueue" name="batchQueue" property="jmsqueue">
        <set attribute="JNDIName" value="net.nike.cdm.batchQueue"/>
        <set attribute="RedeliveryLimit" value="5"/>
        <set attribute="ErrorDestination" value="${batchErrorQueue}"/>
    </create>This seems logical, because if we do this same exact operation via the console, the config.xml goes from this:
    <JMSQueue JNDIName="net.nike.cdm.batchQueue"
                Name="batchQueue" RedeliveryLimit="5"/>to this:
    <JMSQueue ErrorDestination="batchErrorQueue"
                JNDIName="net.nike.cdm.batchQueue"
                Name="batchQueue" RedeliveryLimit="5"/>
    <JMSQueue JNDIName="net.nike.cdm.batchErrorQueue" Name="batchErrorQueue"/>The error we get when trying to do this via Ant is:
    [wlconfig] A destination and its ErrorDestination must both be on the same JMS server. (The problematic destination is "batchQueue" on JMS server "cdmdomain"). Also, an ErrorDestination can not be null if the ExpirationPolicy for a destination is "redirect" and a destination can not specify itself as its ErrorDestination.Flipping on -verbose in Ant, the actual exception is:
    [wlconfig] SET -mbean cdmdomain:Name=batchQueue,Type=JMSQueue -property ErrorDestination cdmdomain:Name=batchErrorQueue,Type=JMSQue
    [wlconfig] A destination and its ErrorDestination must both be on the same JMS server. (The problematic destination is "batchQueue"
    s its ErrorDestination.
          [if] Error in class net.sf.antcontrib.logic.IfTask
    BUILD FAILED
    file:C:/viewstore/CDM_R6.5_Development/B2B_CDM/dev/build.xml:1399: Error invoking MBean command: java.lang.NullPointerException
           at weblogic.ant.taskdefs.management.WLConfig.handleException(WLConfig.java:567)
           at weblogic.ant.taskdefs.management.WLConfig.invokeCommand(WLConfig.java:381)
           at weblogic.ant.taskdefs.management.WLConfig.invokeSetCommand(WLConfig.java:235)
           at weblogic.ant.taskdefs.management.WLConfig.invokeCreateCommand(WLConfig.java:163)
           at weblogic.ant.taskdefs.management.WLConfig.executeCommands(WLConfig.java:106)
           at weblogic.ant.taskdefs.management.WLConfig.invokeCreateCommand(WLConfig.java:167)
           at weblogic.ant.taskdefs.management.WLConfig.executeCommands(WLConfig.java:106)
           at weblogic.ant.taskdefs.management.WLConfig.execute(WLConfig.java:89)
           at org.apache.tools.ant.Task.perform(Task.java:341)
           at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:117)
           at org.apache.tools.ant.Task.perform(Task.java:341)
           at net.sf.antcontrib.logic.IfTask.execute(Unknown Source)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:324)
           at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:147)
           at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)
           at org.apache.tools.ant.Task.perform(Task.java:341)
           at org.apache.tools.ant.Target.execute(Target.java:309)
           at org.apache.tools.ant.Target.performTasks(Target.java:336)
           at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
           at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
           at org.apache.tools.ant.Main.runBuild(Main.java:609)
           at org.apache.tools.ant.Main.start(Main.java:196)
           at org.apache.tools.ant.Main.main(Main.java:235)So, my question is, what are we doing wrong? What IS the syntax to set an error destination for a JMS queue via Ant for WLS 8.1?
    Any help would be greatly appreciated
    Thanks,
    Douglas Bullard

    I get exactly the same problem - was a resolution to this issue found?
    Thanks,
    Richard Marriott
    [email protected]

  • I have a problem creating a pdf from within Firefox using the print to function.

    I have a problem creating a PDF from within Firefox. I get an error message stating that Adobe PDF creation cannot continue because Acrobat is not activated. Acrobat Pro then opens. If it try to create the PDF again, the same problem. I have FF ver 3.6.10 and Acrobat Pro 8 (from Acrobat CS3).

    This is an Apple user forum, no-one from Apple is here.

  • Problem when creating a Function

    It was my first time to create a function.First I want to export a internal table into
    the function ,but I was stopped when I define the parameter in 'TABLE' tab of Function
    Development Interface.The error message is 'Table Parameters are obsolete'.
    I can't understand it——Since it is obsole, why the original functions using Table para.
    can still run well?  (Just compared with statement 'occurs n' in internal table definition)
    Who can tell me what's wrong?
    Thank you very much!

    hi
    the table parameters are obselete know but still you can create function modules with tables. it will only give you the warning, just press enter and you will be able to create.
    secondly you can pass table using table types.
    1. goto se11
    2. select data type radio button
    3 enter some name and press create.
    4 a popup window will appear select table type from it.
    5 inside enter text for table type and pass the name of the sturucture for which type u want to pass the table.
    6 activate it.
    now u can pass this table of this table type in changing parameters.
    regards
    vijay
    reward points if helpfull

  • Problem when creating a SU via LT07

    Hi, guys,
    I got the error message 'No destination storage bin to be found in storage type xxx' when I was going to create a SU via t-code LT07, but if I input the preset data for TO creation (storage type/section/bin), I got the an another error message 'No bin sectioning defined for storage bin xxxxxx'.
    I've put a 'P' for the 'putaway strategy', as well as checked the 'SU mgmt active' & 'SUT check active' for the storage type xxx via OMM4, I also maintained the defaulf 'Storage Type Indicator' for 'stock placement' in 'WH mgmt view 1' (Material Master) and activated the storage type search so it could locate the right storage type xxx correctly, what I can't understand that if the 'putaway strategy' is P, how can the system can find the right storage bin? Thanks

    Can anyone help me out on it? Thanks a lot...

  • Problem creating custom tags for site that has no outside internet connecti

    I've created a set of custom tags that work fine until we install our app at the customer site. The customer site has no outside Internet access, and so the DOCTYPE is failing since it references the web-jsptaglibrary_1_1.dtd located on Sun's site.
    I tried copying the dtd locally and got it to work, but the solution sucks because this web-jsptaglibrary_1_1.dtd file is referenced in both my taglib.tld file AND the web-jsptaglibrary_1_1.dtd itself. Soooo....I can put in a URL that references it on the local machine, e.g.,
    In the taglib.tld file:
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.// DTD JSP Tag Library 1.1//EN"
    "http://ClientAAA/web-jsptaglibrary_1_1.dtd">
    In the web-jsptaglibrary_1_1.dtd file:
    <!ATTLIST taglib id ID #IMPLIED
    xmlns CDATA #FIXED
    "http://ClientAAA/AdProduction/web-jsptaglibrary_1_1.dtd"
    >
    but that means for every client that uses this app (and we have several) I have to change that URL inside both these files.
    I tried simply changing it to the relative "web-jsptaglibrary_1_1.dtd", e.g.,
    taglib.tld:
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.// DTD JSP Tag Library 1.1//EN"
    "web-jsptaglibrary_1_1.dtd">
    web-jsptaglibrary_1_1.dtd:
    <!ATTLIST taglib id ID #IMPLIED
    xmlns CDATA #FIXED
    "web-jsptaglibrary_1_1.dtd"
    >
    but then it is requiring me to put the dtd in both my web app root directory AND my jakarta/bin directory. I get the following error:
    XML parsing error on file ../vtaglib.tld: java.io.FileNotFoundException: D:\jakarta\jakarta-tomcat-4.1.29\bin\web-jsptaglibrary_1_1.dtd (The system cannot find the file specified)
    It seems like I must be missing something here. This shouldn't be this hard. And it seems funny that to use custom tags, you have to have Internet access in the first place.
    Help!!! :)
    Thanks.

    Yeah, I think it's a bit ridiculous that in order to make all the tag library examples and instructions work, you have to have access to the Internet. I haven't seen a single example on how to make it work if there is no Internet access. That's very limiting. And I've tried all sorts of other ways of doing it, such as
    <!DOCTYPE taglib SYSTEM "web-jsptaglibrary_1_1.dtd">
    but even then it won't work because I get an error message saying:
    XML parsing error on file /assets/../vtaglib.tld: java.io.FileNotFoundException: D:\jakarta\jakarta-tomcat-4.1.29\bin\web-jsptaglibrary_1_1.dtd (The system cannot find the file specified)
    I just don't think I should have to place this file in the bin directory. There has to be another way. Do I need to modify the dtd somehow? Cuz the dtd has the following line...is this messing it up??
    <!ATTLIST taglib id ID #IMPLIED xmlns CDATA #FIXED "web-jsptaglibrary_1_1.dtd">
    I sure could use some help.

  • Create Purchase Order via Upload.

    Hi,
    Our company have lost 4 months data due to some hardware problem. After hardware issue resolved we have to post all lost data. Therefore in MM module can it is possible that I can create PO order via BAPI program? We have four type of PO (Inventory, Assets, Changed off and IO). I got a BAPI function "BAPI_PO_CREATE1" can any body tell me how can I you this BAPI to create PO or Upload it?
    Thanks
    Syed Tayab Shah

    Hi
    [Sample Code|Re: BAPI-PO;
    [Explanation About BAPI|http://abap.wikiprog.com/wiki/BAPI_PO_CREATE1]
    Re: BAPI_PO_CREATE1-Runtime error
    BAPI_PO_CREATE1
    Regards
    Pavan

  • Problem with setFocus function

    I create a function setFocus on a page with this code in the HTML Header area.
    <script language="JavaScript" type="text/javascript">
    <!--
    function setFocus(PageItem){
    document.getElementById(PageItem).focus();
    //-->
    On the HTML Body Attribute the code is
    onLoad="javascript:setFocus('P3_MY_ITEM');"
    When I execute the page whit this attributes it displays as blank.
    When I delete the code in the two areas, the page displays ok.
    What is possible that happend?

    Hello Ikefur,
    I suspect one problem is you are missing a closing } in your function. Another is it doesn't appear you're closing your script tag.
    Also, once you know your code is correct, be sure to set Cursor Focus for the page to "Do not focus cursor".
    Hope this helps,
    John

  • How to create PBR functionality using WDS deployment

    Dear sir/madam,
    We are a Dutch OEM currently working on deployment and DIS. I have a question about deployment I’m hoping you can help us with.
    We were tought to deploy images via USB using the following script:
    dism /Apply-Image /ImageFile:%1 /Index:1 /ApplyDir:W:\
    md T:\Recovery\WindowsRE
    attrib -h -a -s W:\windows\system32\recovery\winre.wim
    copy W:\windows\system32\recovery\winre.wim T:\Recovery\WindowsRE\winre.wim
    W:\Windows\System32\bcdboot W:\Windows /s S:
    W:\Windows\System32\reagentc /setreimage /path T:\Recovery\WindowsRE /target W:\Windows
    Mkdir R:\RecoveryImage
    Copy %2 R:\RecoveryImage\
    W:\Windows\System32\reagentc /setosimage /path R:\RecoveryImage /target W:\Windows /index 1
    This works perfectly for single systems. However, since we’re planning on building a lot of units we want to automate installation over network. We’re building a solution to deploy custom images on tablets, laptops and desktops based on
    WDS. We currently have a working MS Server 2012 WDS server and several working custom images. The question we have is regarding the system recovery functions (PBR). I’ve managed to automate login to WDS, language choice and disk partitioning using WDSunattend
    (see below). WinRE and Recovery Image partitions are created. We can manually select the image we want to deploy and it will successfully install to the Windows partition.
    <?xml version="1.0" ?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="windowsPE">
    <component name="Microsoft-Windows-Setup" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="x86">
    <WindowsDeploymentServices>
    <Login>
    <WillShowUI>OnError</WillShowUI>
    <Credentials>
    <Username>Administrator</Username>
    <Domain>WDS.assemblage.com</Domain>
    <Password>xxx</Password>
    </Credentials>
    </Login>
    <ImageSelection>
    <WillShowUI>OnError</WillShowUI>
    <InstallTo>
    <DiskID>0</DiskID>
    <PartitionID>4</PartitionID>
    </InstallTo>
    </ImageSelection>
    </WindowsDeploymentServices>          
    <DiskConfiguration>
    <Disk>
    <DiskID>0</DiskID>
    <WillWipeDisk>false</WillWipeDisk>
    <CreatePartitions>
    <CreatePartition>
    <Order>1</Order>
    <Size>540</Size>
    <Type>Primary</Type>
    </CreatePartition>
    <CreatePartition>
    <Order>2</Order>
    <Size>260</Size>
    <Type>EFI</Type>
    </CreatePartition>
    <CreatePartition>
    <Order>3</Order>
    <Size>128</Size>
    <Type>MSR</Type>
    </CreatePartition>
    <CreatePartition>
     <Order>4</Order>
    <Size>20000</Size>
    <Type>Primary</Type>
    </CreatePartition>
    <CreatePartition>
    <Order>5</Order>
    <Extend>true</Extend>
    <Type>Primary</Type>
    </CreatePartition>
    </CreatePartitions>
    <ModifyPartitions>
    <ModifyPartition>
    <Order>1</Order>
    <Format>NTFS</Format>
    <Label>WinRE</Label>
    <PartitionID>1</PartitionID>
    <TypeID>de94bba4-06d1-4d40-a16a-bfd50179d6ac</TypeID>
    </ModifyPartition>
    <ModifyPartition>
    <Order>2</Order>
    <PartitionID>2</PartitionID>
    <Label>System</Label>
    <Format>FAT32</Format>
    </ModifyPartition>
    <ModifyPartition>
    <Order>3</Order>
    <PartitionID>3</PartitionID>
    </ModifyPartition>
    <ModifyPartition>
    <Order>4</Order>
    <PartitionID>4</PartitionID>
    <Letter>C</Letter>
    <Label>Windows</Label>
     <Format>NTFS</Format>
    </ModifyPartition>
    <ModifyPartition>
    <Order>5</Order>
    <PartitionID>5</PartitionID>
    <Label>Recovery</Label>
    <Format>NTFS</Format>
    <TypeID>de94bba4-06d1-4d40-a16a-bfd50179d6ac</TypeID>
    </ModifyPartition>
    </ModifyPartitions>
    </Disk>
    </DiskConfiguration>
    </component>
    <component name="Microsoft-Windows-International-Core-WinPE" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="x86">
    <SetupUILanguage>
    <WillShowUI>OnError</WillShowUI>
    <UILanguage>en-GB</UILanguage>
    </SetupUILanguage>
    <UILanguage>en-GB</UILanguage>
    </component>
    </settings>
    </unattend>
    Here’s the problem: I can’t find any information on creating PBR functionality using unattend anywhere. Is this possible? If it is, can you help us find a solution?
    Since I can’t find any info on creating PBR using unattend I’m assuming that we have to add PBR functionality using scripts after Windows setup is completed. How do we get this done using WDS?
    With kind regards,
    Frank Wessels.

    Hi,
    We could use deploymenr scripts to configure the recovery partitions:
    Samples: Applying Windows, System, and Recovery Partitions by using a Deployment Script
    More information regarding Capture and Apply Windows, System, and Recovery Partitions, please check:
    http://technet.microsoft.com/en-us/library/hh825041.aspx
    Hope this may help
    Best regards
    Michael Shao
    TechNet Community Support

  • Creation of triggers using CFQUERY tag is giving error

    Hi,
    I am creating triggers and stored procedure on ORACLE data
    base using <CFQUERY>.
    <CFQUERY DATASOURCE="CRM">
    create or replace trigger AWC_ACCOUNTINGPERIODSID_TRI
    before insert on AWC_ACCOUNTINGPERIODS
    for each row
    begin
    select AWC_ACCOUNTINGPERIODSID_SEQ.nextval into :new.AP_ID
    from dual;
    end;
    </CFQUERY>
    But the created trigger is not compiled, it is giving the
    following error
    "Line # = 1 Column # = 6 Error Text = PLS-00103: Encountered the
    symbol "" when expecting one of the following: begin case declare
    exit for goto if loop mod null pragma raise return select update
    while with <an identifier> << close current delete
    fetch lock insert open rollback savepoint set sql execute commit
    forall merge pipe The symbol "" was ignored."
    If I edit that trigger in enterprise manager console by
    pressing space and compile that, it is working fine with out any
    error. If i run the above statement in sql *plus, It is working
    fine with out any error. Can you please tell me why this is
    happening if i run it using cfquery tag and also the possible
    solutions.
    Thanks in advance,
    Vinod

    I can't tell you why your particular trigger is failing, but
    here is some "typical" reasons from Oracle's metalink.
    Common reasons for PLS-00103
    Error Summary
    PLS-00103 Encountered the symbol "%s" when expecting one of
    the following (Oerr
    LS.103)
    Error Details
    ~~~~~~~~~~~~~
    Error: PLS-00103
    Text: Encountered the symbol "%s" when expecting one of the
    following:
    Cause: This error message is from the parser. It found a
    token
    (language element) that is inappropriate in this context.
    Action: Check previous tokens as well as the one given in the
    error message. The line and column numbers given in the
    error
    message refer to the end of the faulty language construct.
    PLS-00103 errors can often be difficult to localize what the
    error is so here are some
    common reasons for PLS-00103 errors..
    A very common reason for PLS-00103 is when a reserved word is
    used, with a reserved word
    means words that names an oracle object or a built in
    procedure, for example MOD, ABS,
    TABLE, VIEW etc..
    When trying to use SQL*PLUS commands in PL/SQL procedures,
    like SPOOL, SET and other
    commands that belongs to SQL*PLUS can result in this error.
    Using parameter declaration at the IN/OUT clause in a
    procedure, this works in versions
    prior to 8.0.4, but it just ignored the declaration.
    Using DDL commands in PL/SQL will fail in PLS-00103, the way
    to use DDL commands is
    to build a procedure in dynamic sql.
    When creating package specification and a package body, a
    PLS-00103 error will occur
    if there is no slash, '/', after the package specification.
    Phil

  • Problem Create ANE,ArgumentError: Error #3500: The extension context does not have a method with the name

    I little confuse about build ANE, I already follow all the direction, but the error always #3500 when I try to call the ANE.
    I create ANE using java android.
    The tools I use : Flash Builder running on Win-64 win.7. I think I must straight to the point, here what i made it first step by step;
    1. I create the JAVA application first, with package senigo.extension.android then I create 3 file, Sample.java, SampleContext.java, PassTextFunction.java
    Sample.Java Source Code
    package senigo.extension.android;
    import android.util.Log;
    import com.adobe.fre.FREContext;
    import com.adobe.fre.FREExtension;
    public class Sample implements FREExtension {
      @Override
      public FREContext createContext(String arg0) {
      // TODO Auto-generated method stub
      Log.i("Sample", "createContext");
      return new SampleContext();
      @Override
      public void dispose() {
      // TODO Auto-generated method stub
      Log.i("Sample", "Dispose");
      @Override
      public void initialize() {
      // TODO Auto-generated method stub
      Log.i("Sample", "Initialize");
    SampleContext.Java Source Code
    package senigo.extension.android;
    import java.util.HashMap;
    import java.util.Map;
    import android.util.Log;
    import com.adobe.fre.FREContext;
    import com.adobe.fre.FREFunction;
    public class SampleContext extends FREContext {
      public SampleContext()
      Log.i("SampleContext", "constructor");
      @Override
      public void dispose() {
      // TODO Auto-generated method stub
      Log.i("SampleContext", "dispose");
      @Override
      public Map<String, FREFunction> getFunctions() {
      // TODO Auto-generated method stub
      Log.i("SampleContext", "getFunctions");
      Map<String, FREFunction> functionMap = new HashMap<String, FREFunction>();
      functionMap.put("passText", new PassTextFunction());
      return functionMap;
    PassTextFunction.Java Source Code
    package senigo.extension.android;
    import com.adobe.fre.FREContext;
    import com.adobe.fre.FREExtension;
    import com.adobe.fre.FREFunction;
    import com.adobe.fre.FREObject;
    public class PassTextFunction implements FREFunction {
      @Override
      public FREObject call(FREContext arg0, FREObject[] arg1) {
      // TODO Auto-generated method stub
      FREObject result = null;
      try{
      result =  FREObject.newObject("Hello World");
      }catch(Exception e)
      return result;
    after all the file I create the jar file using click right on the tree view >> Export >> Jar File >> Sample.Jar (i already create jar file that just contain the src folder and after i frustrated, i create .jar file contain all the whole project folder but still didn't work out).
    Ok, After that I create project Flex Library Project, That's contain the actionscript to call the native and the extension.xml, here the code.
    Test.as Source Code, FYI : i already create public function and the static function the error still same #3500.
    package senigo.extension.android
      import flash.external.ExtensionContext;
      public class test
      private static var extContext:ExtensionContext = null;
      public function test()
      trace ("Test Constructor");
      if (!extContext)
      initExtension();
      public static function get passText():String
      trace ("Test Pass Text");
      if (!extContext)
      initExtension();
      return extContext.call("passText") as String;
      private static function initExtension():void
      trace ("Vibration Constructor: Create an extension context");
      extContext = ExtensionContext.createExtensionContext("senigo.extension.android", null);
    extension.xml source code
    FYI: in Flex when i put the Native Extension, they said must have Windows-x86 so I already create 3 ANE, that just contain Android-ARM , Contain Android-ARM and Default, Contain Android-ARM,Default and Windows-x86 but the error still same. I didn't got it where is the error.
    <extension xmlns="http://ns.adobe.com/air/extension/3.1">
      <id>senigo.extension.android</id>
      <versionNumber>1.0.0</versionNumber>
      <platforms>
      <platform name="Android-ARM">
      <applicationDeployment>
      <nativeLibrary>Sample.jar</nativeLibrary>
      <initializer>senigo.extension.android.Sample</initializer>
      <finalizer>senigo.extension.android.Sample</finalizer>
      </applicationDeployment>
      </platform>
      <!-- <platform name="Windows-x86">
      <applicationDeployment>
      <nativeLibrary>sample.jar</nativeLibrary>
      <initializer>senigo.extension.android.Sample</initializer>
      <finalizer>senigo.extension.android.Sample</finalizer>
      </applicationDeployment>
      </platform>
      -->
       <platform name="default">
    <applicationDeployment/>
    </platform>
      </platforms>
    </extension>
    After I create it, I copy the .swc file and extension file sample with the Sample.jar file.
    I extract the .swc file, copy the library.swf to folder Android-ARM,Default,Windows-86 and I create build.bat that contain the command like this
    adt -package  -storetype PKCS12 -keystore senigo.p12 -storepass l10nk1ng -target ane senigo.extension.android.ane extension.xml -swc AndroidLib.swc -platform Android-ARM -C ./Android-ARM/ . -platform default -C ./default/ .
    the I put the ane to Flex mobile project that I created:
    I run it but got error #3500, I really confuse?? what's wrong with my code? is there something I wrong or I Miss it?
    Please any one help me.. and when is already ane file can I debug it in Flex Mobile Project? I wanna looks the log.i code that i wrote but i confuse how to looking up in flash builder.
    at the end, I wanna said Sorry if my english not very goods, and thanks, because wanna see my problem and thank you very much if You can gave me a solution's

    Alex Rekish wrote:
    Why you comment Windows-x86 in your extension.xml ?
    I think that is a problem. You launch your application on Windows but ANE haven't got Windows-x86 implementation (also you don't include it while packaging). So your application use default implementation. But default implementation don't use any native code and cannot use ExtensionContext. And you got error.
    If you don't need Windows-x86 native implementation than you need implement default implementation that different than Android-ARM. You don't need to use ExtensionContext in default implementation.
    Thanks for you answer Alex Rekish, Sorry I didn't screen shoot all about the extension.xml. I comment it because the latest ANE that I build is contain Android-ARM and default. so I commented. but I already try it using just ANE that's just contain Android-ARM, with Android-ARM and windows-x86,and Android-ARM, and default, and Android-ARM,default,Windows-x86 the error still the same.
    here the screen shoot, I embeded the ane that's i contain Windows-x86
    in action script test.as I didn't change it anythings, I just play it on extension.xml to build the ane. is there any mistake over there? I interact with your answer that "If you don't need Windows-x86 native implementation than you need implement default implementation that different than Android-ARM. You don't need to use ExtensionContext in default implementation." I didn't need to user ExtensionContext? is means? in the actionscript? or in extension.xml? can you explained

  • How can I create a function of sound volue from time using AudioQueueBufferRef??

    I have a question how can I analyze class AudioQueueBufferRef, for creating a function of sound volue from time?? Here is what I get . there is AudioQueueBufferRef fillBuf = audioQueueBuffer[fillBufferIndex]; volume height is 2000 elements from SInt16* coreAudioBuffer = (SInt16*)fillBuf->mAudioData. so function looks like H(t*i)=coreAudioBuffer[i] where t = 1/sampleRate = 1/22050 but here is a problem. my program gets sound and uses a class AudioStreamer for this. AudioStreamer has 3000 lines when I play music from Free Internet Radio - SHOUTcast Radio - Thousands of Free Online Radio Stations. internet radio - my problem is as follows either I dont know where 85 % of sound information is or I dont know how I can analyze class AudioQueueBufferRef
    Here is the code where I analyze Buffer.
    {@synchronized(self)
    if ([self isFinishing] || stream == 0)
    return;
    inuse[fillBufferIndex] = true; // set in use flag
    buffersUsed++;
    // enqueue buffer
    AudioQueueBufferRef fillBuf = audioQueueBuffer[fillBufferIndex];
    fillBuf->mAudioDataByteSize = bytesFilled;
    // ======>in this place I analyze Buffer
    if (packetsFilled)
    err = AudioQueueEnqueueBuffer(audioQueue, fillBuf, packetsFilled, packetDescs);
    else
    err = AudioQueueEnqueueBuffer(audioQueue, fillBuf, 0, NULL);
    when bitRate = 24 buffer has the following options int size=(fillBuf->mAudioDataByteSize) == 2000 double sampleRate=asbd.mSampleRate == 22050 numberOfChannels = asbd.mChannelsPerFrame == 1 it turns out that duration of play buffer float bufferTime =(size/numberOfChannels)/sampleRate == 0.1 number of buffers per second float numBuffersInOneSeconds == 1,5 duration of play all buffers per one second numBuffersInOneSeconds * time == 0.15 so it is 15 % of all information
    as a result If buffer comes at 0.0 seconds he lasts up to 0.1 seconds.farther in my function there is no volume. second buffer comes in 0.7 seconds and lasts up to 0.8 seconds. but in reality the sound doesnt breaks. Maybe I'm doing something wrong .please tell me.
    just for comparison
    when bitRate = 32 buffer has the following options int size=(fillBuf->mAudioDataByteSize) == 2000 double sampleRate=asbd.mSampleRate == 22050 numberOfChannels = asbd.mChannelsPerFrame == 1 it turns out that duration of play buffer float bufferTime =(size/numberOfChannels)/sampleRate == 0.1 number of buffers per second float numBuffersInOneSeconds == 2 duration of play all buffers per one second numBuffersInOneSeconds * time == 0.2 so it is 20 % of all information
    when bitRate = 32 buffer has the following options int size=(fillBuf->mAudioDataByteSize) == 1660 double sampleRate=asbd.mSampleRate == 44100 numberOfChannels = asbd.mChannelsPerFrame == 2 it turns out that duration of play buffer float bufferTime =(size/numberOfChannels)/sampleRate == 0.02 number of buffers per second float numBuffersInOneSeconds == 10 duration of play all buffers per one second numBuffersInOneSeconds * time == 0.2 so it is 20 % of all information

    You cannot write custom commands for expressions.
    That being said, there are a couple of options:
    Create a subsequence with a single step. Use a parameter of the sequence as "function parameter".
    Create a custom step type including a substep module which implements the function. Add an edit substep to enable the user of the steptype to gracefully change the parameter.
    Store the variable parameter in a local/file global variable and modify the value in each step. This will, at least, keep the "function" the same for every step.
    Norbert

  • Problem in creation function interface in JCO program

    I am using BLOB /people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection for making connection SAP & JAVA it is working properly and giving the same O/P as maintained in example. Now my requirement is that i want to use another JAVA program for outbound processing with SAP i mean....
    I have a program by the name FetchMailUsage which is fetching mail from a perticular id. I m using this program in JCO program and when i m creating a function interface through bellow code , import export working well but when i m creating a table interface for that function it is giving short dump  in ABAP program jco.server could not find server function.
    the code for function interface is
    JCO.MetaData fmeta = new JCO.MetaData("CONNECTION");
       fmeta.addInfo("REQUTEXT", JCO.TYPE_CHAR, 255,   0,  0, JCO.IMPORT_PARAMETER, null);
       fmeta.addInfo("ECHOTEXT", JCO.TYPE_CHAR, 255,   0,  0, JCO.EXPORT_PARAMETER, null);
        fmeta.addInfo("RESPTEXT", JCO.TYPE_CHAR, 255,   0,  0, JCO.EXPORT_PARAMETER, null);
         fmeta.addInfo("RFCTABLE", JCO.TYPE_TABLE, 150, 0, 0, 0, "ZMTAB");
        repository.addFunctionInterfaceToCache(fmeta);
    connection:- object of class FetchMailUsage
    ZMTAB :- Table type placed in SAP have one field.
    Anyone please tell me procedure which i m using is correct if not tell me the process by which i create table for function interface.

    Hi Gregor ,
    Thanks for your reply, it is solving my problem partially.By defining structure i am able to implement function interface with table but i want to pass some data through this table to ABAP.How i will pass data through table structure . is there any requirement to set value like this
    ZIT_TAB.setValue(value,field name);
    Actually when i am exicuting FM from ABAP it is not fatching data in table which i m passing.
    I m sending my test code please correct where it is wrong.
    <b>Function Interface with table structure:-</b>
    JCO.MetaData fmeta = new JCO.MetaData("CONNECTION");
       fmeta.addInfo("REQUTEXT", JCO.TYPE_CHAR, 255,   0,  0, JCO.IMPORT_PARAMETER, null);
       fmeta.addInfo("ECHOTEXT", JCO.TYPE_CHAR, 255,   0,  0, JCO.EXPORT_PARAMETER, null);
        fmeta.addInfo("RESPTEXT", JCO.TYPE_CHAR, 255,   0,  0, JCO.EXPORT_PARAMETER, null);
         fmeta.addInfo("RFCTABLE", JCO.TYPE_TABLE, 150, 0, 0, 0, "ZIT_TAB");
        repository.addFunctionInterfaceToCache(fmeta);
    JCO.MetaData smeta  = new JCO.MetaData("ZIT_TAB");
         smeta.addInfo("FIELD",   JCO.TYPE_BYTE,   3, 24, 0);
         repository.addStructureDefinitionToCache(smeta);
    <b>code bywhich i m passing data through table</b>
    FetchMailUsage CONNECTION = new FetchMailUsage();
    CONNECTION.readMail();
    output.setValue(CONNECTION.mimeType,"RFCTABLE");
    <b>CONNECTION is object of my class FetchMailUsage</b>
    <b>Function using in ABAP is :-</b>
    CALL FUNCTION 'CONNECTION' DESTINATION 'JCO'
      EXPORTING
        requtext = requtext
      IMPORTING
        echotext = echotext
        resptext = resptext
      TABLES
        RFCTABLE = RFCTABLE  .

Maybe you are looking for