Exception when Adding Sql Statements in an Applet.
Hello,
When I have added ResultSet statements in the programme, the programme is giving me exceptions at run time as
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2. at java.lang.Throwable.<init>(Compiled Code) at java.lang.Exception.<init>(Compiled Code) at java.sql.SQLException.<init>(Compiled Code) at sun.jdbc.odbc.JdbcOdbc.createSQLException(Compiled Code) at sun.jdbc.odbc.JdbcOdbc.standardError(Compiled Code) at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(Compiled Code) at sun.jdbc.odbc.JdbcOdbcStatement.execute(Compiled Code)* at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(Compiled Code) at RegistrationApplet.actionPerformed(Compiled Code) at java.awt.Button.processActionEvent(Compiled Code) at java.awt.Button.processEvent(Compiled Code) at java.awt.Component.dispatchEventImpl(Compiled Code) at java.awt.Component.dispatchEvent(Compiled Code) at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled Code) at java.awt.EventDispatchThread.run(Compiled Code) at netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled Code)
Here is the code that is generating the exception
try
URL url1 = new URL("http://www.abc.com/");
URL url2 = new URL("http://www.abc.com/Re-Register.html");
ac = getAppletContext();
ac1 = getAppletContext();
/* Checking whether the UserID is present or not */
rs = st.executeQuery("select * from Register where UserID="+userid);
if(rs.next())
/* If the UserID is present then close the connection and ask the User to re enter the login Information*/
rs.close();
System.out.println("Sorry Please Re-Register");
ac1.showDocument(url2);
else
System.out.println("insert into Register values('"+firstname+"','"+lastname+"','"+address+"','"+country+"',"+phonenumber+",'"+emailid+"','"+userid+"','"+password+"','"+b+"')");
int x = st.executeUpdate("insert into Register values('"+firstname+"','"+lastname+"','"+address+"','"+country+"',"+phonenumber+",'"+emailid+"','"+userid+"','"+password+"','"+b+"')");
System.out.println("inserted" + x);
ac.showDocument(url1);
catch(Exception e)
e.printStackTrace();
Can any one help me where am I wring? The Exception is in
rs = st.executeQuery("select * from Register where UserID="+userid);
Thanks
Regards
Uma
So your query is something like "select * from Register where UserID=uma". This compares the field UserID to the field uma, which almost certainly doesn't work. You want your query to look like "select * from Register where UserID='uma'".
Similar Messages
-
Null Pointer Exception When Adding New Row on Table
Hello JheadStart Team
I have used detail group with table layout , when I am clicking on AddRow button on detail table , I encounter NulllPointer Exception . I have traced the code and fount that in JhsCollectionModel when adding new row following
condition occurs :
DCIteratorBinding ib = getRangeBinding().getIteratorBinding();
int rangeSize = ib.getRangeSize();
int rowsInRange = ib.getAllRowsInRange().length;
because getAllRowsInRange is Null then the error raise.
My JheadStart ver is 10.1.3.3.85 .
Detail Group with table layout setting is :
Use Table range=true
Show New Row at top=true
New Rows:empty
Show Add New Row Button :true
RegardsGiven the build you are using, I assume you are an Oracle employee.
Is this correct? if so, please post your question to the [email protected] mailing list.
Steven Davelaar,
JHeadstart team. -
Unhandled exception when installing SQL Server 2008 R2
I tried to download SQL Server 2008 R2 Express it ran for about 30 minutes and then gave a Net Framework error stating that "an Unhandled exception has occurred in your
application. If you click Continue, the application will ignore this error and attempt to continue....." Once I clicked Continue and it did continue to run and then brought up an info screen with no semblance of the download having worked. I had successfully
installed SQL Server 2005 Express previously. I uninstalled it along with the Studio Manager. Do I need to uninstall .NET Framework 3.5 SP1 and .NET Framework 4 Client Profile which are still currently installed before I can install 2008?Sorry I have to reopen this. But I have a similar, but not the same problem.
I have Windows 7 64bit Ultimate, with VS 2010 professional on my notebook, quad core processor with 8gb of ram and plenty of disk space. I am trying to install SQL Server 2008 R2 Developer edition on my computer. .Net 4.0 was installed, as was .Net 3.5.1
(from the "Turn Windows Features On/Off" of Programs and Features Control Panel applet).
When I try to install, I get a Dialog labelled "Microsoft .NET Framework", then the error is "Unhandled exception has occurred in your application. If you click on Continue, the application will ignore this error and attempt to continue. If you click Quit,
the application will close immediately. <p> An error occurred create the configuration section handler for userSettings/Microsoft.SqlServer. Configuration.LandingPage.Properties.Settings: Could not load file or assembly 'System.Version=4.0.0.0.Culture-neutral.
PublicKey Token-b77a5c561934e089' or one of its dependencies. The system cannot find the file specified. (C:\users\myname\AppData\Local\Microsoft_Corporation\Landing Page.exe_StrongName_rspccglaxmt4nhlj5z3thycltsvyyx\10.0.0.0\user. config
I have removed .Net 4, I have removed .Net 3.5.1 and readded it, rebooting after each step.
any help on this would be appreciated.
Thanks -
Exception when migrating SQL 7 to Oracle 8i
I have a new installation of SQL Server 7. Created a new table called TestTable with one varchar field. Tried to migrate it to oracle. When creating Object Model, the migration fails with these exceptions/errors. Can any one please help debug the problem?
Thanks.
EXCEPTION : SQLServer7SourceModelMap.mapPrimaryKeys(): pk_dtproperties, oracle.mtg.migration.MigrationSQLException: ORA-01400: cannot insert NULL into ("SQLUSER1"."
OM_OBJ_INFO"."OBJ_OWNER") :ORA-01400: cannot insert NULL into ("SQLUSER1"."OM_OBJ_INFO"."OBJ_OWNER")
EXCEPTION : SQLServer7SourceModelMap.mapRoles(): db_owner, oracle.mtg.migration.MigrationSQLException: oracle.mtg.migration.MigrationSQLException: ORA-01400:
cannot insert NULL into ("SQLUSER1"."OM_ROLE_USER_INFO"."USER_NAME") :ORA-01400: cannot insert NULL into ("SQLUSER1"."OM_ROLE_USER_INFO"."USER_NAME") :
oracle.mtg.migration.MigrationSQLException: ORA-01400: cannot insert NULL into ("SQLUSER1"."OM_ROLE_USER_INFO"."USER_NAME") :ORA-01400: cannot insert NULL into (
"SQLUSER1"."OM_ROLE_USER_INFO"."USER_NAM
EXCEPTION : SQLServer7SourceModelMap.mapTables(): TestTable, oracle.mtg.migration.MigrationSQLException: ORA-00903: invalid table name :ORA-00903: invalid table name
EXCEPTION : SQLServer7SourceModelMap.mapTables(): dtproperties, oracle.mtg.migration.MigrationSQLException: ORA-00903: invalid table name :ORA-00903: invalid table
name
TestTable : Table. Owner name is NULL. Check that SQL Server 7.0 MASTER database is correctly recovered
dtproperties : Table. Owner name is NULL. Check that SQL Server 7.0 MASTER database is correctly recovered
nullHi Daniel,
Just to add to what John said. The Workbench should also generate
synonyms for users that have access (if they have SELECT
privilege on the table) to a table.
Regards
John
John (guest) wrote:
: Daniel (guest) wrote:
: : I'm having problems using Migration Workbench release
: 1.2.2.2.0
: : build (030999)
: : I'm trying to Migrate an SQL Server 6.5 database to Oracle
8i.
: : Capturing the source database and mapping to the Oracle model
: : appears to work ok. Migrating the contents of the Oracle
model
: : to the destination Oracle Database also appears to work ok
and
: : the message at the end confirms that the migration completed
: : successfully.
: : The problem is that when I load Oracle Administration
: Assistant
: : for Windows NT there is no evidence of the new database. In
: SQL
: : Plus, I can list migrated tables by prefixing tsa.v to each
of
: : the table names. For example in MicrosoftFs ISQL_w, I could
: type
: : SELECT * FROM EVENTLOG but in OracleFs SQL*PLUS, I have to
: type
: : SELECT * FROM SA.EVENTLOG;
: Daniel,
: Ensure that you are the owner of the table(s) in question. If
: not, you have to qualify the table with the table owner asuming
: that you have the proper privileges to access the table. For
: example, if the owner of the table(Oracle user) is SA, and your
: username is DAN, therefore, to access any table created by SA,
: you have to qualify SA to the table name(SA.EVENTLOG). On the
: other hand, if this table is owned by DAN and you logged in as
: DAN, qualifying DAN with the table name is optional.
: A workaround will be to create a PUBLIC SYNONYM on the table,
: thus saving you typing the table owner.
: I hope this addresses all your questions and concerns.
: John
Oracle Technology Network
http://technet.oracle.com
null -
Why throw exception when input Chinese in JTextField for Applet
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at java.util.Hashtable.get(Unknown Source)
at javax.swing.KeyboardManager.registerMenuBar(Unknown Source)
at javax.swing.JMenuBar.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at javax.swing.plaf.metal.MetalTitlePane.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at javax.swing.JRootPane.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at java.awt.Window.addNotify(Unknown Source)
at java.awt.Frame.addNotify(Unknown Source)
at java.awt.Window.pack(Unknown Source)
at sun.awt.im.CompositionArea.<init>(Unknown Source)
at sun.awt.im.CompositionAreaHandler.createCompositionArea(Unknown Source)
at sun.awt.im.CompositionAreaHandler.inputMethodTextChanged(Unknown Source)
at sun.awt.im.CompositionAreaHandler.processInputMethodEvent(Unknown Source)
at sun.awt.im.InputMethodContext.dispatchEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)post the code that leads to it. Cuz it can't be just Chinese text causing it.
-
"-17005 - System Level Exception" when adding extra results
Hi,
I can't find an answer to the following problem:
I defined a complex data type and used it in custom step. Further on I configured TestStand to add to results the previously defined parameters.
When running this step the execution is abnormally aborted.
The attached sequence file reproduces the error.
The environment used is TestStand 3.0 under WindowsXP.
Debugging with MSVC++ 6.0 I can see an Access Violation in TSTOBJ2.DLL, which I suspect is not handled.
Please help me out here solving this problem.
Thank you,
Silvius
Silvius Iancu
Attachments:
Error.seq 33 KBSilvius -
I remember a problem that was fixed in TestStand 3.1 and it had to do with multiple levels of types causing the problem. I tried your sequence file on TestStand 3.0 and it occurred. I tried it on TestStand 3.1 and the problem did not.
I suspect that if you do not use three levels of types and instead use two or one large type only, the problem will not occur in TestStand 3.0.
Scott Richardson (NI)
Scott Richardson
National Instruments -
IASAT gives OutOfMemory exception when adding servers
Im trying to add a new server to the Admin Tool using File\New Server
dialog. If I enter the correct info for my server I get a
java.lang.OutOfMememory exception. The box Im using is a fresh
install of NT4 Server SP5 with Option Pack, IE5 and Oracle8i. I tried
turning off the JIT and setting max heap size in the JavaArgs
registry key for iAS6.0 but still the same problem. So far I can only
find references to problems running iASAT on Solaris.
Any help much appreciated. Its got to be something stupid and obvious
that I've missed.I know this forum isnt really the right place to ask this question as
strictly it isnt a JATO related problem, but I need to sort it before
starting the upgrade process.
--- In [email protected], steve.archer@f... wrote:
Im trying to add a new server to the Admin Tool using File\New Server
dialog. If I enter the correct info for my server I get a
java.lang.OutOfMememory exception. The box Im using is a fresh
install of NT4 Server SP5 with Option Pack, IE5 and Oracle8i. I tried
turning off the JIT and setting max heap size in the JavaArgs
registry key for iAS6.0 but still the same problem. So far I can only
find references to problems running iASAT on Solaris.
Any help much appreciated. Its got to be something stupid and obvious
that I've missed. -
Error when executing sql-statement
I get the following error:
select commodity_id from book where CONTAINS(review,'%a%')>0;
ORA-29902: error in executing ODCIIndexStart() routine
ORA-20000: interMedia Text error:
DRG-50937: query too complex
DRG-51030: wildcard query expansion resulted in too many terms
Does anywhone know what to do?
nullOriginally posted by Sergey:
I get the following error:
select commodity_id from book where review like '%a%';
use it like this
Suresh
null -
DBIF_RSQL_INVALID_RSQL The maximum size of an SQL statement was exceeded
Dear,
I would appreciate a helping hand
I have a problem with a dump I could not find any note that I can help solve the problem.
A dump is appearing at various consultants which indicates the following.
>>> SELECT * FROM KNA1 "client specified
559 APPENDING TABLE IKNA1
560 UP TO RSEUMOD-TBMAXSEL ROWS BYPASSING BUFFER
ST22
What happened?
Error in the ABAP Application Program
The current ABAP program "/1BCDWB/DBKNA1" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
Error analysis
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught
and
therefore caused a runtime error.
The reason for the exception is:
The SQL statement generated from the SAP Open SQL statement violates a
restriction imposed by the underlying database system of the ABAP
system.
Possible error causes:
o The maximum size of an SQL statement was exceeded.
o The statement contains too many input variables.
o The input data requires more space than is available.
o ...
You can generally find details in the system log (SM21) and in the
developer trace of the relevant work process (ST11).
In the case of an error, current restrictions are frequently displayed
in the developer trace.
SQL sentence
550 if not %_l_lines is initial.
551 %_TAB2[] = %_tab2_field[].
552 endif.
553 endif.
554 ENDIF.
555 CASE ACTION.
556 WHEN 'ANZE'.
557 try.
>>> SELECT * FROM KNA1 "client specified
559 APPENDING TABLE IKNA1
560 UP TO RSEUMOD-TBMAXSEL ROWS BYPASSING BUFFER
561 WHERE KUNNR IN I1
562 AND NAME1 IN I2
563 AND ANRED IN I3
564 AND ERDAT IN I4
565 AND ERNAM IN I5
566 AND KTOKD IN I6
567 AND STCD1 IN I7
568 AND VBUND IN I8
569 AND J_3GETYP IN I9
570 AND J_3GAGDUMI IN I10
571 AND KOKRS IN I11.
572
573 CATCH CX_SY_DYNAMIC_OSQL_SEMANTICS INTO xref.
574 IF xref->kernel_errid = 'SAPSQL_ESCAPE_WITH_POOLTABLE'.
575 message i412(mo).
576 exit.
577 ELSE.
wp trace:
D *** ERROR => dySaveDataBindingValue: Abap-Field= >TEXT-SYS< not found [dypbdatab.c 510]
D *** ERROR => dySaveDataBindingEntry: dySaveDataBindingValue() Rc=-1 Reference= >TEXT-SYS< [dypbdatab.c 430]
D *** ERROR => dySaveDataBinding: dySaveDataBindingEntry() Rc= -1 Reference=>TEXT-SYS< [dypbdatab.c 137]
Y *** ERROR => dyPbSaveDataBindingForField: dySaveDataBinding() Rc= 1 [dypropbag.c 641]
Y *** ERROR => ... Dynpro-Field= >DISPLAY_SY_SUBRC_TEXT< [dypropbag.c 642]
Y *** ERROR => ... Dynpro= >SAPLSTPDA_CARRIER< >0700< [dypropbag.c 643]
D *** ERROR => dySaveDataBindingValue: Abap-Field= >TEXT-SYS< not found [dypbdatab.c 510]
D *** ERROR => dySaveDataBindingEntry: dySaveDataBindingValue() Rc=-1 Reference= >TEXT-SYS< [dypbdatab.c 430]
D *** ERROR => dySaveDataBinding: dySaveDataBindingEntry() Rc= -1 Reference=>TEXT-SYS< [dypbdatab.c 137]
Y *** ERROR => dyPbSaveDataBindingForField: dySaveDataBinding() Rc= 1 [dypropbag.c 641]
Y *** ERROR => ... Dynpro-Field= >DISPLAY_FREE_VAR_TEXT< [dypropbag.c 642]
Y *** ERROR => ... Dynpro= >SAPLSTPDA_CARRIER< >0700< [dypropbag.c 643]
I thank you in advance
If you require other information please requestHi,
Under certain conditions, an Open SQL statement with range tables can be reformulated into a FOR ALL ENTRIES statement:
DESCRIBE TABLE range_tab LINES lines.
IF lines EQ 0.
[SELECT for blank range_tab]
ELSE.
SELECT .. FOR ALL ENTRIES IN range_tab ..
WHERE .. f EQ range_tab-LOW ...
ENDSELECT.
ENDF.
Since FOR ALL ENTRIES statements are automatically converted in accordance with the database restrictions, this solution is always met by means of a choice if the following requirements are fulfilled:
1. The statement operates on transparent tables, on database views or on a projection view on a transparent table.
2. The requirement on the range table is not negated. Moreover, the range table only contains entries with range_tab-SIGN = 'I'
and only one value ever occurs in the field range_tab OPTION.
This value is then used as an operator with operand range_tab-LOW or range_tab-HIGH.In the above example, case 'EQ range_tab-LOW' was the typical case.
3. Duplicates are removed from the result by FOR ALL ENTRIES.This must not falsify the desired result, that is, the previous Open SQL statement can be written as SELECT DISTINCT.
For the reformulation, if the range table is empty it must be handled in a different way:with FOR ALL ENTRIES, all the records would be selected here while this applies for the original query only if the WHERE clause consisted of the 'f IN range_tab' condition.
FOR ALL ENTRIES should also be used if the Open SQL statement contains several range tables.Then (probably) the most extensive of the range tables which fill the second condition is chosen as a FOR ALL ENTRIES table.
OR
What you could do in your code is,
prior to querying;
since your select options parameter is ultimately an internal range table,
1. split the select-option values into a group of say 3000 based on your limit,
2. run your query against each chunck of 3000 parameters,
3. then put together the results of each chunk.
For further reading, you might want to have a look at the Note# 13607 as the first suggestion is what I read from the note. -
Find start and end execution time of a sql statement?
I am have databases with 10.2.0.3 and 9.2.0.8 on HP UNIX 11i and Windows 200x.
I am not in a position to turn on sql tracing in production environment. Yet, I want to find when a sql statement started executing and when it ended. When I look at v$sql, it has information such FIRST_LOAD_TIME, LAST_LOAD_TIME etc. No where it has information last time statement began execution and when it ended execution.. It shows no of executions, elapsed time etc, but they are cumulative. Is there a way to find individual times (time information each time a sql statement was executed. – its start time, its end time ….)? If I were to write my own program how will I do it?
Along the same line, when an AWR snapshot is shown, does it only include statements executed during that snapshot or it can have statements from the past if they have not been flushed from shared memory. If it only has statements executed in the snapshot period, how does it know when statement began execution?Hi,
For oracle 10g you can use below query to find start and end time, you can see data for last seven days.
select min(to_char(a.sample_time,'DD-MON-YY HH24:MI:SS')) "Start time", max(to_char(a.sample_time,'DD-MON-YY HH24:MI:SS')) "End Time", b.sql_text
from dba_HIST_ACTIVE_SESS_HISTORY a,DBA_HIST_SQLTEXT b where
a.sql_id=b.sql_id
order by 1;
Regards
Jafar -
Maximum SQL statement on ODBC 8176 or higher ?
Hello.
I am developing a DB reporting program using ODBC.
My customer complained that the program shut down when query the SQL statement.
But, my computer didn't shut down when I queried the same SQL statement.
The difference is my customer used 8177 ODBC driver, but my computer installed 8176 driver, so I changed ODBC driver 8176 to 8177 and the problem appeared too.
I debugged and I found that the program shut down at SQLPrepare API.
The size of the SQL statement is 8238 bytes.
I tested and I found that the program shut down when the SQL statement size was around 5900bytes or larger.
I think, this is the Oracle ODBC drivers bug, does anybody meet the same problem?
I noticed to my customer this situation and he tried to downgrade ODBC driver 8177 to 8176 but he failed.
How can I solve this problem? I tried that the same SQL statement with OCI but it was no problem.I've never encountered a situation where the ODBC driver improperly handled a statement that the Oracle database could, and I've seen cases where the ODBC driver was given statements longer than Oracle's maximum.
My recollection is that Oracle itself doesn't support SQL statements longer than 8k (though I think it depends on the version of the database-- it may have been 4k in the past). If you want to generate SQL statements this long (and I'm not sure you do-- perhaps there are views, etc that you need to create to simplify your queries) you really ought to by using the DBMS_SQL package. You populate a table with 256 byte chunks of data and then call this package, so you can have infinitely long SQL statements.
Justin -
Adding a field to an sql statement in Oracle Reports error ORA-00933
We have been requested to add a field that already exists in the table referred to by the sql statement in Oracle Reports Builder. The report was set up by a consultant about 3 yrs ago and we don't really have much skill in this area. What is happening when I try to modify the SQL statement, either adding a field or deleting a field to the SELECT statement, causes an error message preventing the statement from being saved. The only way out of the error message is to click Cancel. The error message is
ORA-00933:SQL command not properly ended
ORDER BY Program ==> NAME
Even adding or deleting a space anywhere in the SQL statement causes the error (not adding any new fields). A coworker found that if we comment out the ORDER BY, the statement will accept the new field in the SELECT section, however then we lose the order by functionality. I would like to add one additional field before the FROM. Not sure if any additional data are needed. Thank you.
SELECT p.person_uid PIDM_KEY, p.id_number ID,
p.full_name_lfmi name,
p.BIRTH_DATE, p.GENDER Sex,
Decode(a.residency,'D',p.Primary_ethnicity,'F') Ethn,
a.academic_period TERM,
CASE WHEN :p_group_by = 'PROGRAM' THEN a.program
ELSE ' '
END AS Program,
a.COLLEGE, a.degree, a.major, ' ' rule,
a.STUDENT_POPULATION,a.STUDENT_LEVEL, a.application_status Status, a.application_status_date app_sts_dte,
ad.decision_date1 Last_Dec_Date,
ad.decision1||' '||ad.decision2||' '|| ad.decision3||' '|| ad.decision4||' '|| ad.decision5 Decisions,
/* Deposit Date uses the last term entered in :p_term parameter string */
(SELECT MAX(deposit_effective_date) FROM usf_as_deposit WHERE account_uid = a.person_uid &term_clause group by account_uid) AS "DEPOSIT DATE",
ph.phone as PHONE,
CASE WHEN PS.FIRST_CONTACT IN ('NET','PAP','COM','COP') THEN PS.First_Contact
ELSE CASE WHEN ps.latest_contact IN ('NET','PAP','COM','COP') THEN PS.Latest_Contact
ELSE ' '
END
END AS FIRST_CONTACT,
DECODE(:p_address,'Y',REPLACE(adr.street1||' '||adr.street2||' '||adr.street3||' '||adr.city||','||adr.state||' '||adr.nation||' '||adr.zip,' ',' '),' ') as address, adr.nation, adr.state,
goremal_email_address email, a.residency, a.application_date, p.primary_ethnicity, c.cohort
FROM MST_ADMISSIONS_APPLICATION A,
MST_PERSON p,mst_pre_student PS, Admissions_Cohort c, usf_v_phone_pr_ma ph,
MST_admissions_decision_slot AD, usf_v_email, usf_v_address_dr_lr_ma_pr adr
WHERE a.PERSON_UID = p.person_uid
AND a.curriculum_priority = 1
AND a.person_uid = ps.person_uid
AND a.person_uid = ad.person_Uid(+)
AND a.person_uid = goremal_pidm(+)
AND a.person_uid = adr.pidm(+)
AND a.person_uid = ph.pidm(+)
AND ph.rnum(+) = 1
AND a.person_uid = c.person_uid(+)
AND a.academic_period = c.academic_period(+)
&Where_Clause
/* TAKE OUT FOLLOWING LINE AFTER DATA IS CLEANED UP */
AND NOT(p.id_number = '00000000' OR SUBSTR(p.id_number,1,1) = 'B' OR UPPER(p.full_name_lfmi) LIKE '%TESTING%')
AND a.application_status_date >= NVL(:p_as_of_date,sysdate-8000)
AND a.academic_period = ad.academic_period(+)
AND a.application_number = ad.application_number(+)
AND a.degree <> 'ND' /* AND a.college <> 'LW' -- Does not need non-degree and law students */
&Cohort_Clause
ORDER BY Program &ORDER_CLAUSEHi Denis,
I tried your suggestion. The good thing is that adding the comma allowed me to be able to add a.campus to the select statement, unfortunately, another error message happened.
ORA-00936: missing expression SELECT p . person_uid PIDM_KEY ,
p . id_number , p . full_name_lfmi name , p . BIRTH_DATE , p . GENDER Sex ,
Decode ( a . residency , 'D' , p . Primary_Ethnicity , 'F' ) Ethn , a . academic_period TERM ,
CASE WHEN : P_group_by = 'PROGRAM THEN a I started over and tried only putting in the comma and get the same message even though I didn't add campus. After that, removed the comma which led to the ORA-00933 error message. So once again, I had to close the file without saving, in order for the report to run at all. -
Using SQL Statements in Error Exceptions
Is there any way to include SQL statements within my catch routines (i.e.
catch (java.io.IOException ex) {
System.out.println("An error occurred whilst writing to the message buffer: " + ex);
#sql { INSERT INTO DEBUG_TBL(CURRENT_DT,PROGRAM_ID,DEBUG__MESG) VALUES (SYSDATE,'TEST',:ex) };
#sql { COMMIT };
As it stands I get the following error upon compile:
Error: Unsupported Java type for host item (at position#1): java.io.IOException
Any help would be greatly appreciated.
Thx,
Boybles
nullYou can use SQL statements in your catch blocks, just not SQL statements that use Java types which do not map to SQL.
You cannot pass exceptions from Java to SQL. You can catch a SQL exceptions as a SQLException in Java. However, any exception that is thrown by a Java Stored Procedure (including SQLException) is rendered as an "Uncaught Java exception" in SQL.
When you receive a SQLException there is information about the originator, the error message, etc. in the exception object. See:
http://technet.oracle.com/docs/products/oracle8i/doc_library/817_doc/java.817/a83723/keyprog5.htm#1004462
While you cannot insert a Java exception per se into a table, you can extract the message string(s)/code and insert that in a table. -
Null Pointer Exception when working with Custom Sql
I viewed the video on adding Custom Sql and everything seemed to work fine with regards to adding it to my report. However, I get a null pointer exception when I add a field from the Custom Sql table to the report and try to run the report including if I try to View Sql. There doesn't seem to be a stacktrace that I can show.
BTW... this was a work around for not being able to use Stored Procedures... I have killed 2 days now working on different ways to work around the Stored Procedure thing
Thanks,
SteveHi,
I'm trying to use a custom sql in my report. I could successfully create a custom SQL and add it to my report in the designer. But I'm getting NullPointer exception when I try to see the results in Preview. Can someone please help me resolve this issue.
Thanks! -
Hi All,
I have this technical environment:
-BOXIR3.1.
-DB: SQL server 2005.
-OS: Windows server 2003.
When i try to create a report under Deski, with 2 objects, i get this error:
"Exception: DBD, [ ODBC SQL Server Driver][SQL Server]Impossible
de préparer les insctruction.state:42000"
Note : I have tried all the tests(under the server, with administrator account.. ) but i get the same problem under Deski, but under Webi when i create the same Query nothings happen, in other words it works.
I have copied the SQL query:
SELECT
count (distinct (convert(char
(10),dbo.Tbld_CLI_PMSI_RSS.CLI_Donn_NoAbsEpisode)'_'convert(char
(10),dbo.Tbld_CLI_PMSI_RSS.CLI_Donn_NoRSS))),
year(( dbo.Tbld_CLI_PMSI_RSS.CLI_Date_Entree ))
FROM
dbo.Tbld_CLI_PMSI_RSS
*I activated the log, and i send you the 3 *
interesting line:
1- 2009/04/23 16:23:46.449|==| | | 3296|3924| |||||||||||||||BOCSHelper::DoRealCSDescribe( SELECT count (distinct (convert(char(10),dbo.Tbld_CLI_PMSI_RSS.CLI_Donn_NoAbsEpisode)'_'convert(char(10),dbo.Tbld_CLI_PMSI_RSS.CLI_Donn_NoRSS))), year(( dbo.Tbld_CLI_PMSI_RSS.CLI_Date_Entree )) FROM dbo.Tbld_CLI_PMSI_RSS )
2- sqlboAsyncNet.cpp:83:void __cdecl job_thread::Describe|E| | 3296|2044| |||||||||||||||job_thread::Describe : DBD:[Microsoft][ODBC SQL Server Driver][SQL Server]Impossible de préparer les instructions.
Thank you for any suggestion.
Regards,
Aimen
Edited by: Aimen Akriche on Apr 24, 2009 10:35 AM
Edited by: Aimen Akriche on Apr 24, 2009 10:36 AMHi Aimen,
Following solution might be helpful in resolving the issue.
SQL statement is case sensitive in Business Objects.
Follow these steps:
Test the connection in your universe and click Details.
From Details, copy and run the path for the PRM file used by your connection which will open the relevant PRM file in Notepad.
Modify the following parameter (or add to the PRM file if it does not exist) as follows:
<Parameter Name="CASE_SENSITIVE">N</Parameter>
Save the PRM file.
Close and relaunch Designer.
Regards,
Sarbhjeet Kaur
Maybe you are looking for
-
Are all webpages optimized for Retina Display?
I've noticed on my iPhone 4 that text on every webpage I've been to looks crisp and clear but everything but text like pictures and images still look very pixellated and blurry. Is this how everyones iPhone 4 is?
-
App MyContacts is crashing in FIORI client 1.2.4
Hello *, I get an issue creating contact persons using FIORI client 1.2.4 within app MyAccounts --> Dropdown menue --> contact persons: "App could not be started due to internal error." In addition maintenance of contacts within tile MyContacts is no
-
While I was performing some benchmarks on my W520, I became aware that there is a function in Windows 7 called Large Pages. Essentially setting this policy for either a single user or a group greatly reduces the TLB overhead when translating memory a
-
how do i chat w/an agent
-
Can we make requestor not to change the Buyer on the PO?
Is it possible to not change the Buyer on a PO once it is created? I guess this can be achieved by form Personalization. But I am not sure which PROPERTY I need to use to make this change? Any Ideas please? Thanks, Prathima