40357-invalid string in example record query not issued

hello experts,
i am using forms 10g.in query mode i face that error 40357-invalid string in example record query not issued.
i used these code in key-next-item trigger
PROCEDURE KN_FOR_QUERY IS
BEGIN
IF :global.navigation = 'D' AND :global.mode = 'M'
THEN
IF NAME_IN(:SYSTEM.CURSOR_ITEM) IS NOT NULL
THEN
:global.temp_div_code:= :po_m.po_div_code;
:global.temp_po_num := :po_m.po_num;
:global.temp_po_ex_work := :PUR_DELV_D.DELV_EX_WORK;
:global.temp_modi_num:= :po_m.po_modi_num;
IF GET_BLOCK_PROPERTY(:SYSTEM.CURSOR_BLOCK,QUERY_HITS)=0
THEN     
-- message('1---'||:SYSTEM.CURSOR_BLOCK);
-- message('2---'||:SYSTEM.CURSOR_BLOCK);
GO_BLOCK(:SYSTEM.CURSOR_BLOCK);
CLEAR_BLOCK(no_validate);
EXECUTE_QUERY;
-- ELSE
     -- NEXT_ITEM;
END IF;
-- ELSE
-- mess(GET_ITEM_PROPERTY(:SYSTEM.CURSOR_ITEM,PROMPT_TEXT)||' Must Be Entered For Query...');
END IF;
ELSIF :global.navigation = 'D' and :global.mode = 'Q'
THEN
IF NAME_IN(:SYSTEM.CURSOR_ITEM) IS NOT NULL
THEN
MESS('Press Execute query button');
go_item('tools.execute_query');
ELSE
mess(GET_ITEM_PROPERTY(:SYSTEM.CURSOR_ITEM,PROMPT_TEXT)||' Must Be Entered For Query...');
END IF;
ELSIF :global.navigation = 'D' and :global.mode = 'A'
THEN
IF NAME_IN(:SYSTEM.CURSOR_ITEM) IS NOT NULL
THEN
NEXT_ITEM;
ELSE
mess(GET_ITEM_PROPERTY(:SYSTEM.CURSOR_ITEM,PROMPT_TEXT)||' Must Be Entered...');
END IF;
END IF;
END;
Thanks
Ravi

Hi Ravi
u may need to debug to find out where and when the error exist pls note the following
Error Message: FRM-40357: Invalid string in example record. Query not issued.Error Cause:In query mode, you entered an invalid ALPHA or CHAR value in the example record.
Action:Correct the entry and retry the query. Level: >25
Type: Errorpls verifying that u r entering 1 char for global variable to be assigned so any number between 2single coat is considered a character not s number .
Amatu Allah

Similar Messages

  • Invalid string in example record. Query not issued.

    I've tried to google this but didn't come up with anything and tried searching this forum but was not returning exact string.
    Does anyone know what this means?
    The form is based on a master (which is a view) and detail records (which is a table)
    Forms [32 Bit] Version 10.1.2.3.0 (Production)
    Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production
    With the Partitioning and Data Mining options

    if you call the enter_query build-in and type a value in one of the database items,
    in the subsequent execute_query forms searches for that value in the assosiated database-column.
    This entered value/s forms call a example record
    in hope, your block don't have too much items, try the following code in your trigger that call the execute_query: execute_query;
    if
      form_failure
    then
      message ( get_block_property ( :system.trigger_block, last_query ) );
      message ( ' ');
    end if;

  • Record count not matching when using HS while querying.

    Hello,
    We are using 10gr2.
    I created a Database link connecting to lotus notes using HETROGENEOUS SERVICES and ODBC.
    When we query the table in Lotus Notes using database link oracle is showing less records.
    For example.
    Lotus Notes database have a table which contains 873 records.
    When we query this table from oracle we are getting the count of 722 records.
    Any ideas why this is happening.
    Thank you for the help.
    Regards
    Seshadri Thope

    Oracle Corporation --- THURSDAY JAN 29 2009 10:34:23.786
    Heterogeneous Agent Release
    10.2.0.4.0
    (0) hoagprd (2): ; hoagprd Entered.
    (0) HOACONN.C (270): ; [Generic Connectivity Using ODBC] version: 10.2.0.0.0080
    (0) HOACONN.C (323): ; Class version: 300
    (0) hoagprd (2): ; hoagprd Exited with retcode = 0.
    (0) hoainit (3): ; hoainit Entered.
    (0) (0): ; connect string is: defTdpName=DATABASEA;SYNTAX=(ORACLE8_HOA, BASED_ON=ORACLE8, IDENTIFIER_QUOTE_CHAR="", CASE_SENSITIVE=CASE_SENSITIVE_QUOTE);BINDING=<navobj><binding><datasources><datasource name='DATABASEA' type='ODBC' connect='socrates'><driverProperties disableExtendedFetch='true'/></datasource></datasources><remoteMachines/><environment><optimizer noFlattener='true'/><misc year2000Policy='-1' consumerApi='1' codepage='WE8ISO8859P15' sessionBehavior='4'/><queryProcessor parserDepth='2000' tokenSize='1000' noInsertParameterization='true'
    noThreadedReadAhead='true' noCommandReuse='true'/><debug generalTrace='true'/></environment></binding></navobj>
    (0) ORACLE GENERIC GATEWAY Log File Started at 2009-01-29T10:34:24
    (0)
    (0) hoainit (3): ; hoainit Exited with retcode = 0.
    (0) hoalgon (7): ; hoalgon Entered. name = .
    (0) Created new ODBC connection (32056720)
    (0) hoalgon (7): ; hoalgon Exited with retcode = 0.
    (0) hoaulcp (4): ; hoaulcp Entered.
    (0) hoaulcp (4): ; hoaulcp Exited with retcode = 0.
    (0) hoauldt (5): ; hoauldt Entered.
    (0) hoauldt (5): ; hoauldt Exited with retcode = 0.
    (0) hoabegn (9): ; hoabegn Entered. formatID = 306206, hoagttln = 38, hoagttid = DATABASEA.e53cf895.2.35.27286, hoagtbln = 10, hoagtbid = , tflag = 0, initial = 1
    (0) hoabegn (9): ; hoabegn Exited with retcode = 0.
    (0) hoadtab (26): ; hoadtab Entered. count = 1
    (0) hoadtab (26): ; schema_name = , table_name = TABLEA
    (0) odbc_rec: select * from "TABLEA"
    (0) nvOUT (D:\Work_Builds\connect_5010\src\qp\QP_SQTXT.C 89): select NON_UNIQUE, INDEX_NAME, TYPE, SEQ_IN_INDEX, COLLATION, CARDINALITY, COLUMN_NAME from NAV_PROC:SP_STATISTICS('DATABASEA', '%', 'TABLEA', 1, 0, 0) order by 3, 1, 2, 4
    (0) nvRETURN (D:\Work_Builds\connect_5010\src\qp\qpsynon.c 1171): -1
    (0) <<<<<<<<<<<<<<<<<<< Execution Strategy Begin <<<<<<<<<<<<<<<<<<<<<<<<<<<<
    (0) Original SQL:
    (0) select NON_UNIQUE , INDEX_NAME , TYPE , SEQ_IN_INDEX , COLLATION , CARDINALITY , COLUMN_NAME from NAV_PROC : SP_STATISTICS ( 'DATABASEA' , '%' , 'TABLEA' , 1 , 0 , 0 ) order by 3 , 1 , 2 , 4
    (0)
    (0)
    (0) Accessing saved query spec SP_STATISTICS()
    (0) from NAV_PROC DB
    (0)
    Execution Strategy End >>>>>>>>>>>>>>>>>>>>>>>>>>>>(0) HOAUTIL.C (1284): ; ------ hoadtab (hoat) -------:
    (0) HOAUTIL.C (1287): ; hoatnam: TABLEA, hoatnml: 20, hoatnrw: 711, hoatarl: 110000
    (0) HOAUTIL.C (1298): ; ------ hoadtab (hoai) -------:
    (0) HOAUTIL.C (1299): ; n_index_stat: 0
    (0) HOAUTIL.C (1249): ; -------- hoadtab for table TABLEA---------:
    (0) HOAUTIL.C (1250): ; hoadamsz: 22, hoadasiz: 22, hoadambr: 1, hoadabrc: 0, hoadawht: 5
    (0) HOAUTIL.C (1253): ; row 0 - hoadambl: 4000, hoadadty: 108, hoadaprc: 0, hoadacst: 0
    (0) HOAUTIL.C (1257): ; row 0 - hoadascl: 0, hoadanul: 1, hoadanml: 7, hoadanam: Subject, hoadabfl: 4000, hoadamod: 0
    (0) HOAUTIL.C (1253): ; row 1 - hoadambl: 4000, hoadadty: 108, hoadaprc: 0, hoadacst: 0
    (0) HOAUTIL.C (1257): ; row 1 - hoadascl: 0, hoadanul: 1, hoadanml: 11, hoadanam: DateCreated, hoadabfl: 4000, hoadamod: 0
    (0) HOAUTIL.C (1253): ; row 2 - hoadambl: 4000, hoadadty: 108, hoadaprc: 0, hoadacst: 0
    (0) HOAUTIL.C (1257): ; row 2 - hoadascl: 0, hoadanul: 1, hoadanml: 18, hoadanam: CustomerFacingUnit, hoadabfl: 4000, hoadamod: 0
    (0) HOAUTIL.C (1253): ; row 3 - hoadambl: 4000, hoadadty: 108, hoadaprc: 0, hoadacst: 0
    (0) HOAUTIL.C (1257): ; row 3 - hoadascl: 0, hoadanul: 1, hoadanml: 12, hoadanam: OFFERNUMBERS, hoadabfl: 4000, hoadamod: 0
    (0) HOAUTIL.C (1253): ; row 4 - hoadambl: 4000, hoadadty: 108, hoadaprc: 0, hoadacst: 0
    (0) HOAUTIL.C (1257): ; row 4 - hoadascl: 0, hoadanul: 1, hoadanml: 13, hoadanam: textedPricing, hoadabfl: 4000, hoadamod: 0
    (0) HOAUTIL.C (1253): ; row 5 - hoadambl: 4000, hoadadty: 108, hoadaprc: 0, hoadacst: 0
    (0) HOAUTIL.C (1257): ; row 5 - hoadascl: 0, hoadanul: 1, hoadanml: 22, hoadanam: textedShortDescription, hoadabfl: 4000, hoadamod: 0
    (0) HOAUTIL.C (1253): ; row 6 - hoadambl: 4000, hoadadty: 108, hoadaprc: 0, hoadacst: 0
    (0) HOAUTIL.C (1257): ; row 6 - hoadascl: 0, hoadanul: 1, hoadanml: 21, hoadanam: textedLongDescription, hoadabfl: 4000, hoadamod: 0
    (0) HOAUTIL.C (1253): ; row 7 - hoadambl: 4000, hoadadty: 108, hoadaprc: 0, hoadacst: 0
    (0) HOAUTIL.C (1257): ; row 7 - hoadascl: 0, hoadanul: 1, hoadanml: 14, hoadanam: textedBenefits, hoadabfl: 4000, hoadamod: 0
    (0) HOAUTIL.C (1253): ; row 8 - hoadambl: 4000, hoadadty: 108, hoadaprc: 0, hoadacst: 0
    (0) HOAUTIL.C (1257): ; row 8 - hoadascl: 0, hoadanul: 1, hoadanml: 18, hoadanam: textedAboutAuthors, hoadabfl: 4000, hoadamod: 0
    (0) HOAUTIL.C (1253): ; row 9 - hoadambl: 4000, hoadadty: 108, hoadaprc: 0, hoadacst: 0
    (0) HOAUTIL.C (1257): ; row 9 - hoadascl: 0, hoadanul: 1, hoadanml: 13, hoadanam: textedContent, hoadabfl: 4000, hoadamod: 0
    (0) HOAUTIL.C (1253): ; row 10 - hoadambl: 4000, hoadadty: 108, hoadaprc: 0, hoadacst: 0
    (0) HOAUTIL.C (1257): ; row 10 - hoadascl: 0, hoadanul: 1, hoadanml: 23, hoadanam: textedDiffByMedia_Print, hoadabfl: 4000, hoadamod: 0
    (0) HOAUTIL.C (1253): ; row 11 - hoadambl: 4000, hoadadty: 108, hoadaprc: 0, hoadacst: 0
    (0) HOAUTIL.C (1257): ; row 11 - hoadascl: 0, hoadanul: 1, hoadanml: 20, hoadanam: textedDiffByMedia_CD, hoadabfl: 4000, hoadamod: 0
    (0) HOAUTIL.C (1253): ; row 12 - hoadambl: 4000, hoadadty: 108, hoadaprc: 0, hoadacst: 0
    (0) HOAUTIL.C (1257): ; row 12 - hoadascl: 0, hoadanul: 1, hoadanml: 26, hoadanam: textedDiffByMedia_Internet, hoadabfl: 4000, hoadamod: 0
    (0) HOAUTIL.C (1253): ; row 13 - hoadambl: 4000, hoadadty: 108, hoadaprc: 0, hoadacst: 0
    (0) HOAUTIL.C (1257): ; row 13 - hoadascl: 0, hoadanul: 1, hoadanml: 23, hoadanam: textedDiffByMedia_Other, hoadabfl: 4000, hoadamod: 0
    (0) HOAUTIL.C (1253): ; row 14 - hoadambl: 4000, hoadadty: 108, hoadaprc: 0, hoadacst: 0
    (0) HOAUTIL.C (1257): ; row 14 - hoadascl: 0, hoadanul: 1, hoadanml: 10, hoadanam: BookStatus, hoadabfl: 4000, hoadamod: 0
    (0) HOAUTIL.C (1253): ; row 15 - hoadambl: 4000, hoadadty: 108, hoadaprc: 0, hoadacst: 0
    (0) HOAUTIL.C (1257): ; row 15 - hoadascl: 0, hoadanul: 1, hoadanml: 9, hoadanam: Published, hoadabfl: 4000, hoadamod: 0
    (0) HOAUTIL.C (1253): ; row 16 - hoadambl: 4000, hoadadty: 108, hoadaprc: 0, hoadacst: 0
    (0) HOAUTIL.C (1257): ; row 16 - hoadascl: 0, hoadanul: 1, hoadanml: 4, hoadanam: ISBN, hoadabfl: 4000, hoadamod: 0
    (0) HOAUTIL.C (1253): ; row 17 - hoadambl: 4000, hoadadty: 108, hoadaprc: 0, hoadacst: 0
    (0) HOAUTIL.C (1257): ; row 17 - hoadascl: 0, hoadanul: 1, hoadanml: 5, hoadanam: Pages, hoadabfl: 4000, hoadamod: 0
    (0) HOAUTIL.C (1253): ; row 18 - hoadambl: 4000, hoadadty: 108, hoadaprc: 0, hoadacst: 0
    (0) HOAUTIL.C (1257): ; row 18 - hoadascl: 0, hoadanul: 1, hoadanml: 7, hoadanam: Binding, hoadabfl: 4000, hoadamod: 0
    (0) HOAUTIL.C (1253): ; row 19 - hoadambl: 4000, hoadadty: 108, hoadaprc: 0, hoadacst: 0
    (0) HOAUTIL.C (1257): ; row 19 - hoadascl: 0, hoadanul: 1, hoadanml: 11, hoadanam: ProductSize, hoadabfl: 4000, hoadamod: 0
    (0) HOAUTIL.C (1253): ; row 20 - hoadambl: 4000, hoadadty: 108, hoadaprc: 0, hoadacst: 0
    (0) HOAUTIL.C (1257): ; row 20 - hoadascl: 0, hoadanul: 1, hoadanml: 12, hoadanam: DateModified, hoadabfl: 4000, hoadamod: 0
    (0) HOAUTIL.C (1253): ; row 21 - hoadambl: 4000, hoadadty: 108, hoadaprc: 0, hoadacst: 0
    (0) HOAUTIL.C (1257): ; row 21 - hoadascl: 0, hoadanul: 1, hoadanml: 15, hoadanam: ProductItemCode, hoadabfl: 4000, hoadamod: 0
    (0) hoadtab (26): ; hoadtab Exited with retcode = 0.
    (0) hoadafr (23): ; hoadafr Entered. id = 0.
    (0) hoadafr (23): ; hoadafr Exited with retcode = 0.
    (0) hoapars (15): ; hoapars Entered. stmtType = 0, id = 1.
    (0) nvOUT (D:\Work_Builds\connect_5010\src\qp\QP_SQTXT.C 89): SELECT COUNT(*) FROM "TABLEA" A1
    (0) nvRETURN (D:\Work_Builds\connect_5010\src\qp\qpsynon.c 1171): -1
    (0) SELECT COUNT(*) AS c000 FROM "TABLEA" "A1"
    (0)
    (0) <<<<<<<<<<<<<<<<<<< Execution Strategy Begin <<<<<<<<<<<<<<<<<<<<<<<<<<<<
    (0) Original SQL:
    (0) SELECT COUNT ( * ) FROM "TABLEA" A1
    (0)
    (0)
    (0) Accessing Database 'DATABASEA' with SQL:
    (0) SELECT COUNT(*) AS c000 FROM "TABLEA" "A1"
    (0)
    (0)
    Execution Strategy End >>>>>>>>>>>>>>>>>>>>>>>>>>>>(0) hoapars (15): ; hoapars Exited with retcode = 0.
    (0) hoaopen (19): ; hoaopen Entered. id = 1.
    (0) hoaopen (19): ; hoaopen Exited with retcode = 0.
    (0) hoadscr (16): ; hoadscr Entered. id = 1.
    (0) hoastmt.c (304): ; Array fetch size is: 1.
    (0) HOAUTIL.C (1249): ; ------ hoadscr() -------:
    (0) HOAUTIL.C (1250): ; hoadamsz: 1, hoadasiz: 1, hoadambr: 1, hoadabrc: 1, hoadawht: 5
    (0) HOAUTIL.C (1253): ; row 0 - hoadambl: 4, hoadadty: 8, hoadaprc: 10, hoadacst: 0
    (0) HOAUTIL.C (1257): ; row 0 - hoadascl: 0, hoadanul: 1, hoadanml: 8, hoadanam: $$CALC_1, hoadabfl: 4, hoadamod: 0
    (0) hoadscr (16): ; hoadscr Exited with retcode = 0.
    (0) hoaftch (21): ; hoaftch Entered. id = 1.
    (0) apiutil.c (0): ; hoaftch()::
    (0) apiutil.c (0): ; Column 0 - pszName: $$CALC_1, size: 4, id: 8, width: 0, scale: 0, flags: 12.
    (0) SELECT COUNT(*) AS c000 FROM "TABLEA" "A1"
    (0)
    (0) hoaftch (21): ; hoaftch Exited with retcode = 0, hoadabrc = 1.
    (0) hoaftch (21): ; hoaftch Entered. id = 1.
    (0) hoaftch (21): ; hoaftch Exited with retcode = 1403, hoadabrc = 0.
    (0) hoaclse (22): ; hoaclse Entered. id = 1.
    (0) hoaclse (22): ; hoaclse Exited with retcode = 0.
    (0) hoadafr (23): ; hoadafr Entered. id = 1.
    (0) hoadafr (23): ; hoadafr Exited with retcode = 0.
    (0) hoacomm (11): ; hoacomm Entered. keepinfo = FALSE, tflag = 1.
    (0) hoacomm (11): ; hoacomm Exited with retcode = 0.
    (0) hoalgof (8): ; hoalgof Entered. tflag = 1.
    (0) hoalgof (8): ; hoalgof Exited with retcode = 0.
    (0) hoaexit (6): ; hoaexit Entered.
    (0) hoaexit (6): ; hoaexit Exited with retcode = 0.
    (0) (0): ; Closing log file at THU JAN 29 10:38:55 2009.

  • Expert Mode ViewObject: default 'query by example' mechanism does not work

    In JDeveloper 11G 1.1.1
    I have created an Expert Mode view object(VO) which I'm trying to filter in an ADF Swing Panel
    The Panel contains a Swing Table created by dropping a VO data control on the panel as an ADF bound Swing Table.
    TEST
    Run the panel.
    Set the Query Mode on (from the Database menu)
    Enter a relevant view criterion
    Execute the Query
    TEST FAILS
    Table is refreshed but it still displays the entire VO collection (non-filtered).
    Repeating the same experiment with a default, entity object generated VO works as expected.
    Question
    Can the default 'query-by-example' mechanism as provided by the JUTestFrame and the JUNavigationBar be used with Expert Mode view Objects?
    If yes are there any tricks to making this work?

    Hello Frank;
    Additional TEST RESULTS
    In JDev11G
    The default 'query by example mechanism' does not work if you create a new View Object using the <Select data source...> option <Read-only access through SQL query>.
    However, IT DOES WORK if you create a new ViewObject selecting <Updatable access through entity objects> and in the Query step you select <Expert Mode>
    Could you please check and confirm.
    Thanks!
    Ioannis
    Edited by: imouts on Dec 5, 2008 1:38 PM

  • Word cannot open this document.  The document might be in use, the document might not be a valid Word document,  or the file name might contain invalid characters (for example,\ /).

    I recently upgraded to a new Macbook Air running Lion, from my 2007 white Macbook running Snow Leopard.  I had Office for Mac 2004 on the 2007, but had to upgrade to Office for Mac 2011 to be compatible with Lion on the Air.  Now when I try to open my documents on the Air that were saved under Office 2004 on the old computer, I get the following message: Word cannot open this document.  The document might be in use, the document might not be a valid Word document,  or the file name might contain invalid characters (for example,\ /).
    Any suggestions?  Thank you.

    Ha,ha,ha.....I figured it out.  But for anyone else who's having this problem, it seems that while Office 2004 allowed dates in this format: 00/00/00, Office 2011 doesn't like it at all.  I just changed the format in the document names to 00-00-00 and all is well.  Documents are opening beautifully! 

  • LPX-00111 invalid string "string" (not a Nmtoken)

    Hi
    I am not Oracle savvy, but I am asking this question on behalf of another group that are having problems using Oracle XML to parse an XML document that my system has generated.
    As part of my DTD, I have the line, which, by the way, is similar to other lines, reads as follows:
    <!ATTLIST eligibleCode rule (E-T | E-NT | NE-T | NE-NT ) #FIXED 'E-T' >
    The XML document and DTD parse fine using Tibco Turbo XML, Xerces Java and C++ Parsers so I think that it is correct XML. However under the Oracle XML implementation, they get the following error which appears to be when parsing the DTD itself:
    LPX-00111 invalid string "string" (not a Nmtoken)
    Cause: Validity Constraint 3.3.1 failed:
    Given thing is not a Nmtoken
    Action: Correct the document.
    Strangle enough, the string "string" does not appear in the DTD or XML document itself.
    Does nyone know how compatible Oracle XML is with things like this and what work around we may need to perform to get Oracle to correctly parse the DTD.
    Many thanks
    Ian

    <!ATTLIST eligibleCode rule (E-T | E-NT | NE-T | NE-NT ) #FIXED 'E-T' >
    ^^^^^^^^^^^^
    Update: We removed the #FIXED 'E-T' from the DTD and replaced it with #REQUIRED and the DTD now loads further but fails in a similar place.
    We are having thoughts that Oracle is not correctly interpreting attributes or attribute definitions that contain a '-' sign.
    Any thoughts
    Thanks
    Ian

  • Looking for Regex library to generate valid/invalid String

    Hi-
    My project use MDA (domain object are specified from an XML file) and we generate the domain, transfer object, DAO, services and controllers, flex controller, flex services and flex .as files.
    Now we want to generate the Unit Test Case. Of course, we can't cover everything. What we can cover is most domain fields validation, such as length, max value, min value and perhaps regex matching.
    So, what I'm looking for is a library that allow me to generate a valid and invalid String based on a given Regex pattern. So far, I have found Google Xeger, which only allow me to generate valid String based on the Regex pattern. I'm also looking for a library that will allow me tpo generate invalid String for a given regex.
    Anyone know of such library. I really don't want to parse the Regex to come up with an invalid String (as I am not strong in Regex).

    T.PD wrote:
    915826 wrote:
    My project use MDA (domain object are specified from an XML file) and we generate the domain, transfer object, DAO, services and controllers, flex controller, flex services and flex .as files.
    Now we want to generate the Unit Test Case. What do you think you're going to check with a <b>generated UnitTest</b>?
    The only thing you can check is the that your Code Generator generates a bunch of Classes (the Tests) the same way like another bunch of Classes (the production code). So unless you wrote the Code Generator: What does a generated Test tell you about the corerectness of your Domain Model?
    IMHO generated tests are nothing more than a placebo...
    bye
    TPDYou are correct, but it probably doesn't matter. Plenty of people create (or in this wacky case: generate) unit tests because it is company policy that unit tests are there, not because you write them to support your development efforts.
    Example: the company I work for has a whole legion of "PL/SQL developers". In other words: people who write endless amounts of SQL procedures. Company policy goes in effect: all code should be covered by unit tests. Result: unit tests that insert a record and then check if the record is inserted. Unit test that updates a record and then checks if the record is updated. I try to explain to such people: you can be pretty sure the database works, you don't need to unit test it. Blank stares.

  • ERROR reports.reportdefinition : com.crystaldecisions.reports.queryengine.driverImpl.m: JDBC Error: [Microsoft][ODBC Driver Manager] Invalid string or buffer length

    I have developed Java web application which uses Crystal Report 2013 , java 1.6 , Windows 32 bit System, All the reports are loading fine in the Following environment
    Development Environment
    Windows7 Professional Service pack 1 -32 bit
    Java - 1.6
    Internet Explorer 11
    Oracle Client 10g 32 bit ODBC driver
    Testing Environment
    Windows Server 2008 R2 Enterprise - 64 bit
    java 1.6
    Internet Explorer 9
    Oracle Client 11g 62 bit ODBC driver
    While loading reports in the 64 bit server the error occurs
    ERROR reports.reportdefinition :  com.crystaldecisions.reports.queryengine.driverImpl.m: JDBC Error: [Microsoft][ODBC Driver Manager] Invalid string or buffer length
    ERROR dataengine.datasource : Failed to read next recurring database record: database row set error.
    com.crystaldecisions.reports.reportdefinition.datainterface.j: JDBC Error: [Microsoft][ODBC Driver Manager] Invalid string or buffer length
        at com.crystaldecisions.reports.reportdefinition.datainterface.q.a(Unknown Source)
        at com.crystaldecisions.reports.dataengine.n.m(Unknown Source)
        at com.crystaldecisions.reports.dataengine.n.l(Unknown Source)
        at com.crystaldecisions.reports.dataengine.n.bn(Unknown Source)
        at com.crystaldecisions.reports.dataengine.n.bp(Unknown Source)
        at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
        at com.crystaldecisions.reports.dataengine.s.a(Unknown Source)
        at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
        at com.crystaldecisions.reports.dataengine.bk.ab(Unknown Source)
        at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
        at com.crystaldecisions.reports.dataengine.bk.if(Unknown Source)
        at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.be.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.be.h(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.i.h(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.be.for(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.bt.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.bf.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.for(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.for(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.b3.for(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.bt.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.ca.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.a9.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.e.m.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.for(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.cd.for(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.b3.for(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.e.m.for(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.objectformatter.bt.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.e.p.l(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.e.p.void(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.e.p.l(Unknown Source)
        at com.crystaldecisions.reports.formatter.formatter.e.p.aE(Unknown Source)
        at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
        at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source)
        at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
        at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
        at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
        at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
        at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
        at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
        at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
        at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
        at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
        at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
        at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)
        at com.erm.controller.ALMReportsController.queryDll(ALMReportsController.java:1681)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:471)
        at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:408)
        at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
        at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.erm.authentication.HttpSecurityFilter.doFilter(HttpSecurityFilter.java:658)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Unknown Source)
    Caused by: com.crystaldecisions.reports.queryengine.driverImpl.m: JDBC Error: [Microsoft][ODBC Driver Manager] Invalid string or buffer length
        at com.crystaldecisions.reports.queryengine.driverImpl.o.if(Unknown Source)
        at com.crystaldecisions.reports.queryengine.ap.if(Unknown Source)
        at com.crystaldecisions.reports.queryengine.l.bN(Unknown Source)
        at com.crystaldecisions.reports.queryengine.ap.eg(Unknown Source)
        at com.crystaldecisions.reports.queryengine.ap.e(Unknown Source)
        at com.crystaldecisions.reports.queryengine.b2.f(Unknown Source)
        at com.crystaldecisions.reports.queryengine.b2.dy(Unknown Source)
        ... 89 more
    Caused by: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid string or buffer length
        at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbc.SQLGetDataString(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbcResultSet.getDataString(Unknown Source)
        at sun.jdbc.odbc.JdbcOdbcResultSet.getBigDecimal(Unknown Source)

    A few things to note:
    1) Crystal Report 2013 doe snot install any SDK. Thus the assumption is that you are using CR from teh following link:
    SAP BusinessObjects - SAP Crystal Reports, Version For Eclipse Download
    2) Since you are using a 64 bit connection (Oracle Client 11g 62 bit ODBC driver) you will have to make sure you are using 64 bit JVM. Otherwise, follow Dell's advice and use a 32 bit ODBC datasource.
    3) On one test you are using Oracle Client 10g 32 bit ODBC driver and the other you are using Oracle Client 11g 64 bit ODBC driver. You might want to see if you can run your app using Client 11g 32 bit ODBC driver.
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada

  • Why is this query not using the index?

    check out this query:-
    SELECT CUST_PO_NUMBER, HEADER_ID, ORDER_TYPE, PO_DATE
    FROM TABLE1
    WHERE STATUS = 'N'
    and here's the explain plan:-
    1     
    2     -------------------------------------------------------------------------------------
    3     | Id | Operation | Name | Rows | Bytes | Cost (%CPU)|
    4     -------------------------------------------------------------------------------------
    5     | 0 | SELECT STATEMENT | | 2735K| 140M| 81036 (2)|
    6     |* 1 | TABLE ACCESS FULL| TABLE1 | 2735K| 140M| 81036 (2)|
    7     -------------------------------------------------------------------------------------
    8     
    9     Predicate Information (identified by operation id):
    10     ---------------------------------------------------
    11     
    12     1 - filter("STATUS"='N')
    There is already an index on this column, as is shown below:-
         INDEX_NAME INDEX_TYPE     UNIQUENESS     TABLE_NAME     COLUMN_NAME     COLUMN_POSITION
    1     TABLE1_IDX2 NORMAL     NONUNIQUE     TABLE1      STATUS     1
    2     TABLE1_IDX NORMAL     NONUNIQUE     TABLE1     HEADER_ID     1
    So why is this query not using the index on the 'STATUS' Column?
    I've already tried using optimizer hints and regathering the stats on the table, but the execution plan still remains the same, i.e. it still uses a FTS.
    I have tried this command also:-
    exec dbms_stats.gather_table_stats('GECS','GEPS_CS_SALES_ORDER_HEADER',method_opt=>'for all indexed columns size auto',cascade=>true,degree=>4);
    inspite of this, the query is still using a full table scan.
    The table has around 55 Lakh records, across 60 columns. And because of the FTS, the query is taking a long time to execute. How do i make it use the index?
    Please help.
    Edited by: user10047779 on Mar 16, 2010 6:55 AM

    If the cardinality is really as skewed as that, you may want to look at putting a histogram on the column (sounds like it would be in order, and that you don't have one).
    create table skewed_a_lot
    as
       select
          case when mod(level, 1000) = 0 then 'N' else 'Y' end as Flag,
          level as col1
       from dual connect by level <= 1000000;
    create index skewed_a_lot_i01 on skewed_a_lot (flag);
    exec dbms_stats.gather_table_stats(user, 'SKEWED_A_LOT', cascade => true, method_opt => 'for all indexed columns size auto');Is an example.

  • Error: "Invalid string or buffer length" when using SQLColumns!

    I am calling SQLColumns through the Oracle ODBC driver to get the column information of a table. The Client version is 9.0.1.0 and the ODBC driver version is 9.0.1.8. If I am querying a table that does not has a long table name, fine; if I am querying a long table name, failed and reporting:
    [Oracle][ODBC]Invalid string or buffer length.
    Tried with MS Oracle driver, no problem. Anybody can help?
    Thanks in advance.

    the name is very long, like 'aaaabbbbccccddddeeeeffffrrrrdddaaa'. Maybe more than 20 charactors. I haven't find the exact number, before which SQLcolumns works, after which SQLColumns stop working.

  • Table record is not displayed correctly..

    In Windows and Linux environment we deployed the same code.
    In Windows environment, I had a application with one jspx page. we had a table and one insert button inside panel collection, when i click on the insert button it gets pop up and gets values for the required field. When i submit it, the row getting displayed immediately inside the table.
    But in Linux environment, when i insert first record its not displayed immediately. When i insert second record, first record is displayed and second record with blank value. When i click on first record or when i click query by example the second record is also getting displayed.
    Can any one help me in this regard?
    Regards,
    Srividya

    You can help us help you by:
    a). Not bumping your thread after 3 minutes
    b). Looking into and providing the information (version numbers, what is different between the 2 environments, etc) that Arunkumar asked for
    c). Explaining more about your environment. Are the windows/linux environments you are talking about running JDev, running WLS, or running as the client (browser)?
    A suggestion: just randomly changing the properties on the table is not the best way to look for a solution
    John

  • Records are not displaying as expected.

    Hi,
    Records are not displaying as expected.
    i designed an query as
    SELECT '1. Emp Detail ' Details from dual
    UNION ALL
    SELECT empno||ename details dfrom emp
    UNION ALL
    SELECT '1. Dept Detail ' Details from dual
    UNION ALL
    SELECT deptno||dname details from dept
    UNION ALL
    SELECT '1. Location Detail ' Details from dual
    SELECT locationcode||locationname details from location
    The above query is displaying the data as follow
    EMP Detail
    Dept Detail
    Location Details
    John
    Kathy
    Prem
    IT
    Customer care
    Boston
    Texas
    but i need to display the data as follows
    EmpDetail
    JOHN
    Kathy
    Prem
    Dept Detail
    IT
    Customer care
    Location Detail
    Boston
    Texas
    Please help me on this.
    Thanks,
    Naz

    Records are not displaying as expected.Well, it certainly displays as I'd expect it to. i.e. in an undetermined order.
    If you want the output of a query to come out in a specific order then you must use an ORDER BY clause in your query, otherwise you are just querying a set of data and there is no order to it. You cannot assume that the order of the data will be the order in which you union your queries together, that's not how SQL works, as SQL is designed to work on sets of data, not on sequential rows.
    So, in your example you would want something along the lines of:
    select Details from (
      SELECT 1 as ord, '1. Emp Detail ' Details from dual UNION ALL
      SELECT 2, empno||ename details dfrom emp UNION ALL
      SELECT 3, '1. Dept Detail ' Details from dual UNION ALL
      SELECT 4, deptno||dname details from dept UNION ALL
      SELECT 5, '1. Location Detail ' Details from dual UNION ALL
      SELECT 6, locationcode||locationname details from location
    order by ord, details

  • Select query not working

    Hello Experts,
    i am using select query like
    SELECT SHKZG SUM( DMBTR ) AS DMBTR
      FROM BSIK INTO CORRESPONDING FIELDS OF TABLE ITAB_BSIK
      WHERE BUKRS = W_BUKRS
      AND LIFNR = WA_BSEG-LIFNR
      AND ( BLDAT BETWEEN W_DATe_low AND W_DATe_high )
      GROUP BY SHKZG.
    I checked with table by giving the values same as here.
    In table m getting data , but dont know y after executing this query m not getting results.
    value of sy-subrc equals to 4.
    Can any body tel me what might be the problem??
    Thanks & Regards,
    Manisha
    Edited by: Rob Burbank on Aug 3, 2010 11:12 AM

    Hello ,
    SUM and AVG commands runs on your database system and calculations with type floating numbers.
    It can cause a low performance and sometimes wrong results.
    In your example ,
    if you are using Packed numbers in your internal table for DMBTR ( like bseg-dmbtr )
    and sum of the related records does not fit into this fields than select can not run.
    I can recommend u this code :
    DATA :
    begin of w_bsik,
      shkzg LIKE bsik-shkzg,
      dmbtr LIKE bsik-dmbtr,
    END OF w_bsik,
    t_bsik LIKE STANDARD TABLE OF w_bsik.
    SELECT shkzg dmbtr FROM bsik INTO w_bsik
    WHERE ...
       COLLECT w_bsik INTO t_bsik.  <--- Collect command does sum operation based on SHKZG
    ENDSELECT.
    I hope it helps.

  • Database migration query not executing in database

    We moved over our SQL database to another server. We have a few .cfm template files that have queries to get 'content' from our database. These queries in the .cfm template files work fine and execute properly. However, for some reason, since we moved over our database, the queries in the actual database don't execute/run anymore. In the old server we didn't have this problem. Our queries in the database would run properly then. The data would display correctly on the webpages.
    Is there some kind of properties setup that was overlooked when migrating over our database?
    The output we now see when viewing our pages is the actual query code.
    Example:
    SELECT lname
    FROM table
    This is actually displayed on the website and therefore the query is not executing/running. Our code was never changed. So why is it not outputting the same?
    Thanks for any help provided.

    Sorry for the confusion.
    The coldfusion templates and database queries both worked fine on the previous old server.
    Now since the migration onto the new server, only the coldfusion templates work fine, but not the queries in the database.
    So for example, a query in the coldfusion template will run fine, and execute the intial pull of data. But once the content is pulled from the database, the queries inside the database (including stored procedures) don't execute.
    We do get the expected results when we run our stored procedure in Management Studio and if we put the stored procedure on a standalone web page we do see the records. 
    We only see the sql code when we have the stored procedure inside of our w_content table of our database, and its being called by the first query in the template.  For some odd reason the stored procedure does not execute if it is inside the database.  
    Hopefully that clarifies our problem.
    Thank you for helping!

  • Drag and relate from User query not working as expected

    Hi All,
    Could anyone shed some light on why using drag and relate from a user query is not working for me?
    Drag and relate works well from all system generated queries, but not from my user queries.
    For example:
    - System query/report - running a system stock report and dragging the 'Item number' field result to a D&R Sales Order generates a report of all Sales Orders for the selected Item Number. As expected - success.
    - User Query - running a item lookup report from a user generated query and then D&R to Sales order for the selected Item Number does not work. Error = 'No matching records found (ODBC -2028) [message 131-183]
    Any ideas?
    Best regards,
    John

    Hi John,
    I believe Drag and relate only works for system form.  The whole function is hard coded.  It will not work for any queries including system queries.
    Thanks,
    Gordon

Maybe you are looking for