THE API ERROR

Hello.

I run this API and get the error message
----------
ERROR

ORA-06502: PL/SQL: digital or value error: character string buffer too small
ORA-06512: at line 34 level
----------
APPS schema
Oracle apps 11.5.10.2
S/N 10.0.2.0
----------
Purpose of the API

Create itam with model

-------------
steps.
1 create the table


CREATE TABLE XX_INV_ITEMS
(
Segment1 VARCHAR2 (300),
Description VARCHAR2 (300),
The category number,
VARCHAR2 (1) flag.
msg_erreur varchar2 (2500)
) ;
-API script-


declare

p_commit fnd_api.g_FALSE VARCHAR2 (1000) DEFAULT
; DEFAULT NUMBER of p_validation_level fnd_api.g_VALID_LEVEL_FULL
; p_Item_rec INV_ITEM_GRP. Item_rec_type
; x_Item_rec INV_ITEM_GRP. Item_rec_type
; x_return_status VARCHAR2 (1000)
; x_Error_tbl INV_ITEM_GRP. Error_tbl_type
; p_Template_Id NUMBER
; p_Template_Name VARCHAR2 (200)
; x_debug_file VARCHAR2 (100);


CURSOR item_cur IS
SELECT *.
OF XX_INV_ITEMS
where category = 19
and segment1 = "CM-1-O'AHU;
------
Start
fnd_global.apps_initialize (user_id = > 4425,
resp_id = > 23118,
resp_appl_id = > 426);

p_Item_rec: = INV_ITEM_GRP. G_MISS_ITEM_REC;


because me in item_cur
loop

p_item_rec.ORGANIZATION_ID: = 695;
p_item_rec. DESCRIPTION: = description;
p_item_rec. SEGMENT1: = i.SEGMENT1;
p_item_rec. PRIMARY_UOM_CODE: = "all";
p_item_rec. PRIMARY_UNIT_OF_MEASURE: = 'EA ';

Start
INV_ITEM_GRP. CREATE_ITEM
(
p_commit = > p_commit
, p_validation_level = > p_validation_level
, p_Item_rec = > p_Item_rec
, x_Item_rec = > x_Item_rec
, x_return_status = > x_return_status
, x_Error_tbl = > x_Error_tbl
p_Template_Id = > 19
, p_Template_Name = > '@Activity '.
);


Dbms_output.put_line (' status |) ' ' || x_return_status);
dbms_output.put_line (SubStr (FND_MSG_PUB. Get (p_encoded = > FND_API.) G_FALSE), 1, 255));

end;

end loop;

end;


Please help me

Published by: user13384271 on May 15, 2013 01:21

Hello

Can you please check if
p_item_rec. DESCRIPTION: = description; is less than 240 characters and
p_item_rec. SEGMENT1: = i.SEGMENT1; is less than 40 characters?

Thank you
VInod

Tags: Oracle Applications

Similar Questions

  • Cannot Hibernate Qosmio G30 on Win MCE - API error

    Cannot Hibernate Qosmio G30 on Win MCE
    message: not enough system resources... The API error!
    HOW CAN I SOLVE THIS PROBLEM?
    Thanks in advance.

    Hello

    This message appears on the computer that is running Microsoft Windows XP SP2, Windows XP Tablet PC 2005 Edition or Windows XP Media Center Edition 2005 and when the computer uses 1 gigabyte (GB) of RAM or more.
    To resolve this issue, please contact Microsoft Technical Support.
    To obtain the fix, visit the following Microsoft Web site:
    http://support.Microsoft.com/?kbid=909095

    Check this announcement:
    http://forums.computers.Toshiba-Europe.com/forums/thread.jspa?threadID=13120

    Here, you have already posted the question!

    Another useful site:
    http://www.ntwizards.NET/2004/10/13/Hibernate

    This should help

  • Satellite P100-347 does not hibernate - not enough resources to complete the API

    When I close the lid on my P100-347 and she is programmed to Hibernate, it is not, but gives me "insufficient resources to complete the API. very irritating

    Hello

    I found this Toshiba document:
    Computer laptop doesn t Hibernate - "Exist of system resources to complete the API error message occurs.
    http://support.toshiba-tro.de/KB0/FAQ6201CE000SR01.htm

    It seems you must contact Microsoft Support to obtain a fix.

    Maybe this update update will allow:
    http://support.Microsoft.com/kb/909095

    guys good luck

  • the API system configuration error 1097 and freezes

    I used successfully the API system configuration to detect and read information on a PXI chassis.

    But now, when I try to initialize and collated all information using a simple VI, the system returns error 1097 and crashes before the end of the VI.  Based on that the stop button does not work and I have to either soft or hard reboot the machine.

    I have attached a screenshot of it in a frozen state and error, like a report of what is installed on my system.

    The only thing I can think has changed since this last worked has been upgraded my MAX and other pilots from 5.5 to 14.0 and then the latest version as of today.

    It is usually the generic error, which means that some external code access violated the integrity of the system and the memory is likely to have been corrupted in the process. Since it is a NI API system AND it seems to have worked before, I guess it's not a bad disigned call library node, but a form of bribery in external code library itself which implements the API of the System Configuration.

    Reinstalling may solve the problem.

  • Using a GUI API I got on the blackberry site - error: "tried of BlackBerry to access the api secure."

    Hello
    This is so the API, I downloaded and imported into my project->
    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800608/...

    When I run it, I get "Error trying to access the api Module secure"

    It says its taken in charge for OS 4.2 and I think, so execute me on my blackberry 9900 OS 5 should work,
    I've been on these forums before and after the solutions, I ordered the signature of the key codes and signed the project as well.

    This is what appears in the signature box, just code until I run it:

    It compiles without error, but it still does not work.
    What I'm doing wrong exactly? Any help would be appreciated!
    Khalique - Amina

    Hey everybody,
    Anyone else who has this problem with these particular CBC of the advanced downloadable user interface files.
    Make sure the following is in place.

    Your JRE version is important.
    If you test on a device that is older than 7.1

    Change your JRE in a right click on the JRE and selecting the right JRE for your device. [some of you may need to download the right JRE].
    I installed the plugin for eclipse blackberry, so he automatically gave me all the available JRE. I just had to change.
    After that I changed it, I have not the reddest comments when I signed the code.
    AND
    It worked fine, no error message popping up for ' api access blocked attempts to.
    If anyone has questions and is the same problem. Please ask. I've spent hours on it, and I'd be happy to help you if I've been unclear!
    Take care!

  • Get the 500 error trying to create a table using the REST API

    Hello

    I tried to create a table using the REST API for Business Intelligence Cloud, but I got 500 Internal Server Error for a while now.

    Here are the details that I use to create a table.

    Capture.JPG

    and the json to create the schema that I use is

    [{'Nullable': [false], 'defaultValue': 'dataType' [null],: ['VARCHAR'], 'precision': [0], 'length': [18], 'columnName': ["ROWID"]}]

    , {'Nullable': [true], 'defaultValue': 'dataType' [null],: ['VARCHAR'], 'precision': [0], 'length': [18], 'columnName': ['RELATIONID']},

    {'Nullable': [true], 'defaultValue': 'dataType' [null],: ['VARCHAR'], 'precision': [0], 'length': [18], 'columnName': ['ID']}

    , {'Nullable': [true], 'defaultValue': 'dataType' [null],: ['TIMESTAMP'], 'precision': [0], 'length': [0], 'columnName': ['RESPONDEDDATE']},

    {'Nullable': [true], 'defaultValue': 'dataType' [null],: ['VARCHAR'], 'precision': [0], 'length': [255], 'columnName': ['RESPONSE']},

    {'Nullable': [false], 'defaultValue': 'dataType' [null],: ['TIMESTAMP'], 'precision': [0], 'length': [0], 'columnName': ['SYS_CREATEDDATE']},

    {'Nullable': [false], 'defaultValue': 'dataType' [null],: ['VARCHAR'], 'precision': [0], 'length': [18], 'columnName': ['SYS_CREATEDBYID']},

    {'Nullable': [false], 'defaultValue': 'dataType' [null],: ['TIMESTAMP'], 'precision': [0], 'length': [0], 'columnName': ['SYS_LASTMODIFIEDDATE']},

    {'Nullable': [false], 'defaultValue': 'dataType' [null],: ['VARCHAR'], 'precision': [0], 'length': [18], 'columnName': ['SYS_LASTMODIFIEDBYID']},

    {'Nullable': [false], 'defaultValue': 'dataType' [null],: ['TIMESTAMP'], 'precision': [0], 'length': [0], 'columnName': ['SYS_SYSTEMMODSTAMP']},

    {'Nullable': [false], 'defaultValue': 'dataType' [null],: ['VARCHAR'], 'precision': [0], 'length': [10], 'columnName': ['SYS_ISDELETED']},

    [{'Nullable': [true], 'defaultValue': 'dataType' [null],: ['VARCHAR'], 'precision': [0], 'length': [50], 'columnName': ['TYPE']}]

    I tried this using postman and code, but I always get the following response error:

    Error 500 - Internal server error

    Of RFC 2068 Hypertext Transfer Protocol - HTTP/1.1:

    10.5.1 500 internal Server Error

    The server encountered an unexpected condition which prevented him from meeting the demand.

    I am able to 'get' existing table schemas, delete the tables, but I'm not able to make put them and post operations. Can someone help me to identify the problem, if there is no fault in my approach.

    Thank you

    Romaric

    I managed to create a table successfully using the API - the only thing I see in your JSON which is different from mine is that you have square brackets around your values JSON where I have not. Here is my CURL request and extract my JSON file (named createtable.txt in the same directory as my CURL executable):

    curl u [email protected]: password UPDATED h x ' X-ID-TENANT-NAME: tenantname ' h ' Content-Type: application/json '-binary data @createtable.txt https://businessintell-tenantname.analytics.us2.oraclecloud.com/dataload/v1/tables/TABLE_TO_CREATE k

    [

    {

    'columnName': 'ID',

    'dataType': 'DECIMAL ',.

    'Length': 20,.

    "accuracy": 0.

    'Nullable': false

    },

    {

    'columnName': 'NAME',

    'dataType': 'VARCHAR ',.

    'Length': 20,.

    "accuracy": 0.

    'Nullable': true

    },

    {

    "columnName': 'STATUS."

    'dataType': 'VARCHAR ',.

    'Length': 20,.

    "accuracy": 0.

    'Nullable': true

    },

    {

    "columnName': 'CREATED_DATE."

    'dataType': 'TIMESTAMP '.

    'Length': 20,.

    "accuracy": 0.

    'Nullable': true

    },

    {

    'columnName': 'UPDATED_DATE ',.

    'dataType': 'TIMESTAMP '.

    'Length': 20,.

    "accuracy": 0.

    'Nullable': true

    }

    ]

  • the API call error: error: the user has sufficient privileges to perform this API call.

    Hello

    I'm exploring cloudClient 3.4.1 but I'm trying to run a "vra catalog list" command or other similar commands I get the error "error: the user has sufficient privileges to perform this API call."

    I don't know what are the permissions of system requirements before I can make the API call because the account which I use to make these calls already have privileges to Administrator local on box of IAAS & is admin Admin/tenant IAAS. In short, the user is a full administrator of the tool.

    Please help me because I found there is a documentation for the usability of the cloudclient.

    Thank you

    MG

    Is the account of your help to make the law of all items in the catalog API call? We have users from the normal group of activities that use the API does not have system or administrator access.

  • The 193 Win32 API error. Cannot call the C function: private_load_AgCoreTest

    Hi guys,.

    When I try to run Lightroom, I get the following error messages:

    • Win 32 API error 193 ("(erreur inconnue)" ") when you call: load the getCFunction library
    • Cannot call the C function: private_load_AgCoreTest

    So I can't access my library or to make a new library by importing files.

    I run it on a laptop with Windows 10 64-bit, Nvidia GeForce 850 m GTX and a processor Intel Core i7 with 12 GB of RAM and a 500 GB SSD (Samsung 840 EVO). All with the latest drivers.

    I tried already to unninstall and reinstall the program, all my packages of Visual C++ and the dll. I also already checked my permissions for the folder from catalog and granted full access. I also tried to run Lightroom as administrator.

    None of these solved the problem.

    What should I do?

    According to the notes, they followed the instructions here to fix the problem: error: "unable to start correctly (0Xc000007b)"

  • WCF error when using the API of VSM

    VSM 9.1.4

    Oracle 10g R2

    I am attemtping to use the "MessageSendMessage" command in the VSM API to send back the client permissions and I get the following error message when running it from the VSM server.

    ERROR: The operation 'ContractUnlinkCIAsync' cannot be loaded because it has a parameter or type System.ServiceModel.Channels.Message or a type that has the MessageContractAttribute and other parameters of different types of return. When using System.ServiceModel.Channels.Message or types with MessageContractAttribute, the method should not use other types of settings.

    It's an odd error because I do not use the "ContractUnlinkCI" command which tells me that there is a problem with the generation of the class file.

    I ran the following command to generate my config file and the class in the directory "C:\Program Files (x 86) \Microsoft 4.0 Tools":

    Svcutil t:code /MessageContract. [URL ServiceManager.svc] / out: ISMAPI.cs /config:ISMAPI.config

    The class files and generated config ok. Then I copied the game config to the Web site's web.config file:

    < system.serviceModel >

    < links >

    < basicHttpBinding >

    < connection name = "BasicHttpBinding_IServiceManager" / >

    < / basicHttpBinding >

    < / links >

    < customer >

    < endpoint address = "[ServiceManager.svc URL]" binding = "basicHttpBinding" bindingConfiguration = contract "BasicHttpBinding_IServiceManager" = "IServiceManager" name = "BasicHttpBinding_IServiceManager" / >

    < / customer >

    < system.serviceModel >

    I put the ISMAPI.cs file in the App_Code to my site folder:

    DirectoryStructure.JPG

    My code works fine when I run locally and include the correct querystring values, but it returns the error above, when I run the code from the VSM server. The query string I used: default.aspx? ajaxfunction = 2 & tasknumber = 425134 & agent = 2370 & recvofficer = 2370

    using System;
    using System.Collections.Generic;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Data;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    using System.Runtime.Serialization;
    using System.ServiceModel;

    partial class _Default: System.Web.UI.Page
    {
    Protected Sub Page_Load (object sender, EventArgs e)
    {
    Response.Expires = - 1;
    Response.ContentType = "text/plain";
    If (Request.QueryString ["ajaxfunction"]! = null)
    {
    Try
    {
    Int16 intFunction = Int16.Parse (Request.QueryString ["ajaxfunction"]. (ToString());
    Switch (intFunction)
    {
    case 1:
    If (Request.QueryString ["tasknumber"]! = null)
    {
    Int64 intTaskNumber = Int64.Parse (Request.QueryString ["tasknumber"]. (ToString());
    Response.Write (getTaskApprovalComments (intTaskNumber.ToString ()));
    }
    break;
    case 2:
    If (Request.QueryString ["tasknumber"]! = null & & Request.QueryString ["officer"]! = null & & Request.QueryString ["recvofficer"]! = null)
    {
    MessageRequest load = new MessageRequest();
    inStruct.sLoginUserID = System.Configuration.ConfigurationManager.AppSettings ["apiLogin"];
    inStruct.sLoginPassword = System.Configuration.ConfigurationManager.AppSettings ["apiPassword"];
    inStruct.sDatabase = System.Configuration.ConfigurationManager.AppSettings ["apiDatabase"];
    inStruct.eEntityType = CRTEntityForEmail.Task;
    inStruct.nEntityRef = Int32.Parse (Request.QueryString ["tasknumber"]);
    inStruct.ePriority = MailPriority.Normal;
    inStruct.eMMAMessageType = MessageMMAType.Approval;
    inStruct.nMessageType = 130;
    inStruct.lRecipientRef = ' ~ ' + Request.QueryString ["recvofficer"];
    inStruct.eRecipientType = MessageRecipientType.Person;
    inStruct.bEmail = true;
    MessageResponse outStruct = new MessageResponse();
    SMC ServiceManagerClient = new ServiceManagerClient();
    outStruct = SCM. MessageSendMessage (inStruct);
    Response.Write (outStruct.sMessage);
    }
    break;
    by default:
    Response.Write ("ERROR: invalid function!");
    break;
    }
    }
    catch (System.Exception Exception)
    {
    Response.Write ("ERROR:" + exception.) (Message);
    }
    }
    Response.End ();
    }

    I hope one of the other directors VSM has met this problem and knows a solution. I tried Googling this issue but with my knowledge of WCF, I don't know what I'm looking at. I also tried commenting on the problem area in the ISMAPI.cs file but it gives me an other errors so I obviously don't know what I'm doing.

    Thank you.

    If locally it works fine I guess you should compare the versions of .net framework assigned to your web applications (application pool), and all the parameters specified in the web.config file.

  • Error in passing in the RECORD type in the API

    Gurus,

    Get the following error when I try and change from one type of RECORD in an API. I am in passage correctly?

    Any help is appreciated.

    Thank you
    -Scott



    Here is my error:

    fnd_descr_flex_col_usage_pkg.load_row
    *
    ERROR at line 21:
    ORA-06550: line 21, column 4:
    PLS-00306: wrong number or types of arguments in the call to 'LOAD_ROW '.
    ORA-06550: line 21, column 4:
    PL/SQL: Statement ignored



    Here is my anon block:

    declare
    Who_type RECORD TYPE IS
    (
    created_by NUMBER,
    CREATION_DATE DATE,
    last_updated_by NUMBER,
    last_update_date DATE,
    last_update_login NUMBER
    );
    v_who_type who_type;
    date of v_sysdate;
    Start
    Select sysdate
    in v_sysdate
    Double;
    v_who_type.created_by: = 0;
    v_who_type. CREATION_DATE: = v_sysdate;
    v_who_type.last_updated_by: = 0;
    v_who_type.last_update_date: = v_sysdate;
    v_who_type.last_update_login: = 0;
    fnd_descr_flex_col_usage_pkg.load_row
    (x_application_short_name = > 'SPL',)
    x_descriptive_flexfield_name = > 'HR_LOCATIONS ',.
    x_descriptive_flex_context_cod = > '441',.
    x_application_column_name = > 'ATTRIBUTE5 ',.
    x_who = > v_who_type,
    x_end_user_column_name = > "District."
    x_column_seq_num = > 10,
    x_enabled_flag = > 'Y ',.
    x_required_flag = > 'n',.
    x_security_enabled_flag = > 'n',.
    x_display_flag = > 'Y ',.
    x_display_size = > 50,
    x_maximum_description_len = > 50,
    x_concatenation_description_le = > 25,
    x_flex_value_set_name = > 50 characters,
    x_range_code = > ",
    x_default_type = > ",
    x_default_value = > ",
    x_runtime_property_function = > ",
    x_srw_param = > ",
    x_form_left_prompt = > "District."
    x_form_above_prompt = > "District."
    x_description = > ");

    ...

    sreese wrote:
    Tubby,

    Im not asking for your help with this error. I want to define my own FILE type that mimics the call package so I can spend in my own variables.

    Pretty sure I've described previously, there was a specific question with the answer that you do not understand?

    >

    The problem with this type of recording is that it contains all the 'who' columns that the application requires. When it is called from a package within the schema, the package has no difficulty arising from these data. When you call the package from an anon block, I have to pull my own values.

    You did before declaring a LOCAL record type, then you need to reference to the PACKAGE of type folder, as I showed you... it makes you EF values even as you were in your first post.

    I want to define the RECORD type of the manner in which it has been set to 'fnd_flex_loader_apis.who_type', but using my own variable and passing in the parameter. Make sense?

    Thank you
    Scott

    Hope that helps.

  • Unable to print - Thunking the API of the spooler from 32 to 64 years has stopped working; software fix downloaded; Get error 40

    Have I not the right fix?  How to decompress if she does not have the password sent to me by Microsoft?  See below.

    I have VISTA, 64-bit processor.  This problem of thunking has just begun.  Must be able to print and can not.

    Package:

    -----------------------------------------------------------

    -----------------------------------------------------------

    The KB Article number: 941962

    Language: All (Global)

    Platform: x 64

    Location: (http://hotfixv4.microsoft.com/Windows%20Vista/sp1/Fix204300/6000/free/324284_intl_x64_zip.exe)

    Password: 918YTE #mW

    Password the: 06/02/2010

    Password: 1vZth %D

    I have found the answer.  The default on my printer changed to a pdf converter that was part of the installation of QuickBooks to my insue.  At that time I started, it became the thunking error.

    I went into the Control Panel Printers and restore the default value for my regular printer.  This has worked for Word 2007, but not for Outlook.  So I went in QuickBooks and configure the default printer it for my printer.  Then all the others program default printer pointing to the correct printer.

    Not sure if it will work for someone else.  I never got the hotfix password to work, nor nobody responded to my request again.

    I wanted to share this with everyone.  This might work for you too.

  • The 193 Win32 API error ("(erreur inconnue)" ") when you call: load getCfunction librabry

    I get this error when I try to open the ambient light.

    I am able to use photoshop, but not the ambient light.

    According to the notes, they followed the instructions here to fix the problem: error: "unable to start correctly (0Xc000007b)"

    It worked

  • The perl API error

    Sorry if this is the wrong forum, I couldn't find a more appropriate forum. I'm trying to create a script that automatically resignatures cloned a store of data in Perl. I wrote in PowerCLI and I work but I get an error when you try to use Perl. Here is the PowerShell

    Connect-CIServer-Server vcenter

    Get-VMHost VM - test-VM | Get-VMHostStorage - RescanAllHba

    $hostView = get-vmhost - VM VM-test | Get-opinion

    $dsView = get-view $hostView.ConfigManager.DatastoreSystem

    $unBound = $dsView.QueryUnresolvedVmfsVolumes)

    $extPaths = @)

    $Extents = $dstore. To what extent

    {foreach ($ex in $Extents)

    $extPaths = $extPaths + $e.g. DevicePath

    }

    $res = new-Object VMware.Vim.HostUnresolvedVmfsResignatureSpec

    $res. ExtentDevicePath = $extPaths

    $return = $dsView.ResignatureUnresolvedVmfsVolume ($res)

    Here's the Perl:

    Util::Connect();

    My $vm_views = Vim::find_entity_views)

    view_type = > 'HostSystem. "

    filter = > {}

    'name' = > qr/esx-host /.

    }

    );

    print 'a new analysis of all host bus adapters to find new LUNs\n ";

    $host foreach (@$vm_views) {}

    My $storageSystem = Vim::get_view (mo_ref = > $host-> configManager-> storage system);

    $storageSystem-> RescanAllHba();

    }

    $host = ${$vm_views} [0];

    # Search the snap-snap LUNS and will it

    Print "mark for unresolved VMFS volumes\n;

    My $datastoreSystem = Vim::get_view (mo_ref = > $host-> configManager-> datastoreSystem);

    My @unbound = $datastoreSystem-> QueryUnresolvedVmfsVolumes();

    foreach my {$dstore (@unbound)

    My $volume = ${$dstore} [0];

    If ($volume-> {'vmfsLabel'} not $vmfsLabel) {}

    print 'Unresolved VMFS Volume'. $volume-> {'vmfsLabel'}. ' found but does not correspond to. $vmfsLabel. » \n » ;

    following;

    }

    My @extpaths;

    My $extents is $volume-> {'measure'};.

    foreach my {$ex (@$extents)}

    push @extpaths, $ex-> devicePath;

    }

    My $res = bless ({}

    'extentDevicePath' = > [@extpaths]

    (}, "HostUnresolvedVmfsResignatureSpec");

    print Dumper $res;

    $datastoreSystem-> ResignatureUnresolvedVmfsVolume (resolutionSpec = > $res);

    }

    Util::Disconnect();

    This displays the following text:

    A new analysis of all host bus adapters to find new LUNS

    An unresolved application VMFS volumes

    $VAR1 = bless ({}

    'extentDevicePath' = >]

    ' / vmfs/devices/disks/naa.6006016083d226001cf20fdc0d27e311:1'

    ]

    (}, "HostUnresolvedVmfsResignatureSpec");

    Subroutine undefined & HostUnresolvedVmfsResignatureSpec::serialize called at (eval 29) line 111

    I also tried with ResolveMultipleUnresolvedVmfsVolumes but I get the same error.

    I fixed that using the following to create the resolutionSpec object:

    My $res = HostUnresolvedVmfsResignatureSpec-> () new

    extentDevicePath-online \@extpaths

    );

    . For unknown reason using "bless" does not work even if print Dumper provides the exact same output regardless of the method:

    $VAR1 = bless ({}

    "extentDevicePath"-online]

    ' / vmfs/devices/disks/naa.6006016083d226001cf20fdc0d27e311:1'

    ]

    (}, "HostUnresolvedVmfsResignatureSpec");

  • questionable behavior of the API SQLErrorEvent.ERROR

    I get an error when I SELECT a value that is not present in the database (planned). But it is not to be taken by the errorHandler function.

    I would like to note that my selectStmt (function readFromDatabase()) is identical to the one on Adobe livedocs, so I am confident that the code is correct.

    Let's say, for simplicity, that my database table has authors.fName and authors.lName columns.

    If I get a letter in my txtIn.text (which is copied to a string variable which is part of the SELECT statement) and the SELECT function cannot find an exact match in the table, I'm getting a TypeError: Error #1009. I understand why. But the SQLErrorEvent.Error isn't the event capture.

    Apparently, does not find a value in the table is not a SQLErrorEvent?

    What is the value of the present: var numResults:int = result.data.length; If there is no data? Null value? Followed by a null value does not seem to work.

    The errorHandler works very well if the application fails to establish a connection. Just not if she is unable to find the data.

    I can't use the code to handle this exception because I can't capture it.

    And another question; and it really gets my goat...

    Why are there no tutorials... Anywhere... on how to handle errors? Tons of tutorials on how to connect to a database, instructions select, seizure data, etc, etc, etc. But NOTHING about the error handling?

    Here is my code:

    import flash.data.SQLConnection;

    import flash.data.SQLMode;

    import flash.data.SQLResult;

    import flash.events.SQLEvent;

    import flash.filesystem.File;

    Import fl.data.DataProvider;

    Import fl.controls.List;

    import flash.events.KeyboardEvent;

    import flash.events.Event;

    import flash.events.MouseEvent;

    import flash.net.URLRequest;

    import flash.display.Loader;

    import flash.display.NativeWindow;

    import flash.system.Capabilities;

    import flash.text.TextField;

    import flash.errors.SQLError;

    import flash.events.SQLErrorEvent;

    var appWindow:NativeWindow = this.stage.nativeWindow;

    appWindow.x = (Capabilities.screenResolutionX - appWindow.width) / 2;

    appWindow.y = (Capabilities.screenResolutionY - appWindow.height) / 2;

    var conn: SQLConnection = new SqlConnection ();

    conn.addEventListener (SQLEvent.OPEN, readFromDatabase);

    conn.addEventListener (SQLErrorEvent.ERROR, errorHandler);

    var dbFile:File = File.desktopDirectory.resolvePath ("bookLibrary.db");

    conn.openAsync (dbFile, SQLMode.UPDATE);

    txtIn.addEventListener (Event.CHANGE, changeHandler);

    var txtIn:TextField;

    txtIn.stage.focus = txtIn;

    var txtOut:String = "a";

    function readFromDatabase(event:Event):void

    {

    var selectStmt:SQLStatement = new SQLStatement();

    selectStmt.sqlConnection = conn;

    register listeners for the result and failure (status) events

    selectStmt.addEventListener (SQLEvent.RESULT, readResultHandler);

    selectStmt.addEventListener (SQLErrorEvent.ERROR, errorHandler);

    set the SQL text.

    selectStmt.text = "SELECT * FROM authors WHERE lName LIKE '" + txtOut + "%'";

    Execute the statement

    selectStmt.execute ();

    }

    function readResultHandler(event:SQLEvent):void

    {

    var result: SQLResult = event.target.getResult ();

    var numResults:int = result.data.length;

    get blocks on var numResults:int = result.data.length, because it contains no records.

    for (var i: int = 0; i < numResults; i ++)

    {

    Object: var line = result.data [i];

    var dataOut:String;

    dataOut = row.lName + ', ' + row.fName;

    myList.addItem({label:dataOut});)

    addChild (myList);

    authorName.text = row.lName;

    }

    }

    function changeHandler(e:Event):void

    {

    If (0 < txtIn.text.length)

    {

    myList.removeAll ();

    txtOut = txtIn.text;

    readFromDatabase (e);

    }

    on the other

    {

    myList.removeAll ();

    }

    }

    function errorHandler(event:SQLErrorEvent):void

    {

    trace ("error message:", event.error.message);

    trace ("details:", event.error.details);

    }

    Response

    Hi Kristin,

    This is normal behavior for a select statement to return 0 rows of data.  This isn't a SQL error, that is why there is no SQLError to catch.

    If you take a look at the documentation for the SQLResult.data property

    The last line of the docs States:

    This property is null if a statement returns no data. This is the case if the statement is not a SELECT statement, or if it is a SELECT statement that returns 0 rows.

    Thus, in order to validate if data has been returned before trying to access real data, you should just check if .data is null.

    in your code:

    var result:SQLResult = event.target.getResult();
    var numResults:int = result.data.length;
    
    //crashes on var numResults:int = result.data.length since it contains no record.
    

    You might want to change to be something like:

    var result:SQLResult = event.target.getResult();
    var numResults:int;
    if (result.data != null)
    {
        numResults = result.data.length;
    }
    else
    {
        numResults = 0;
    }
    
    Thank you
    Chris
  • Put into hibernation - insufficient system resources exist to complete the API (Tecra M4)

    I just thought I'd pass on my experience with this problem.

    I recently updated my Tecra M4 2 GB of RAM memory. Everything was fine except everyonce in a while he would not hibernate. However, it would suspend to RAM (standby). It seemed to happen after the antivirus software has managed to (which I had changed at the same time). I studied this way, but it also happened if I had a lot of programs running. So, a quick google search revealed why almost all laptops come with only 512 MB of RAM.

    There is a problem with Windows, freeing the memory in a way that allows it to be written to the hard disk, preventing the hibernation and to create the very vague error message "insufficient system resources exist to complete the API".

    The solution is to contact Microsoft by phone and ask them for the fix for the #909095 of the Knowledge Base article. The fix is free but the MS site makes it seem as if you have to pay £200 to contact Ms support

    This seems to have solved my problem!
    Hooray!

    This is the Knowledge Base article:
    http://support.Microsoft.com/?kbid=909095

    Here's the Blog I found the solution on:
    http://www.ntwizards.NET/2004/10/13/Hibernate
    Of course, the only problem with contacting MS support is that I received a LOT of phone calls asking me what I thought of their support... it was very good, so I don't really mind, but I find it funny that I continue to have called and asked the same questions!

    Hi Kelly

    Thanks for this useful information.
    It of very nice that you posted this tip. I think that it s very useful for users of the forum who might have the same problems on laptops.

    Concerning

Maybe you are looking for