CF9 Problems with Select * query, resulting in Value can not be converted to requested type.
So, I work on a legacy CF web site and there are numerous SELECT * FROM USERS_TABLE queries all over the site.
Well, we changed the structure of said table in the database on our Testing and Staging sites, with no issues.
When we pushed up to our production environment and changed the structure of the production DB table, the server kept kicking back "Value can not be converted to requested type."
After doing some searching out there, it looks like CF caches the structure of the table, and you either have to restart CF to clear it, or rename and then name-back the DSN to fix the issue.
http://www.bennadel.com/blog/194-ColdFusion-Query-Error-Value-Can-Not-Be-Converted-To-Requ ested-Type.htm
That said, this doesn't happen in our testing and staging environments - so what would be the difference?
Is there some setting I need to change in the CF Admin to keep this from happening again?
Also, if you can use a Stored Procedure to retrieve the data, do so. Standard queries gets all the information, anyway, chokes bandwidth passing it all to the CF server, and forces the CF server to filter, sort, and format the data. SPs tell the db server to get ONLY the data requested, and forces the db server to filter and sort the data, leaving only formatting to the CF server.
That's not true. The only time CF messes with data returned from the DB is if there's a maxrows attribute, and the record set returnded from the DB has more than that number of records... which causes CF to truncate the recordset to the correct size before returning it. The DB might or might not stop sending rows down to CF after CF says "yeah, I've got all I want now".
Other than that, for all intents and purposes all CF does with the SQL is pass it to the DB and wait for an answer. The only thing it does to the returned data is to create a CF record set ("query") with it... this does not involve any filtering and sorting.
Adam
Similar Messages
-
Exception --- Value can not be converted to requested type.Error Code: 0
Inside my query, I try to use function,like
Expression formattedRegDateCol = regDateCol.getFunction("to_char", "YYYY/MM/DD");
sometimes query works fine and sometimes got following exception, can anyone here help me out..
Internal Exception: java.sql.SQLException: [BEA][Oracle JDBC Driver]Value can not be converted to requested type.Error Code: 0
Call:SELECT COUNT(*), to_char(REG_DATE, 'YYYY/MM/DD') FROM SYSTEM_DETAIL WHERE ((REG_DATE BETWEEN {ts '2008-08-10 00:00:00.0'} AND {ts '2008-09-30 23:59:59.0'}) AND (GEOGRAPHIC_ID = 104)) GROUP BY to_char(REG_DATE, 'YYYY/MM/DD') ORDER BY to_char(REG_DATE, 'YYYY/MM/DD') ASC
Query:ReportQuery(com.cad.registration.RegistrationDetailImpl)
at com.cad.report.data.DocumentReturnedDataGenImpl.loadData(DocumentReturnedDataGenImpl.java:130)
at com.cad.report.data.AbstractDataGen.getReport(AbstractDataGen.java:96)
at com.cad.report.command.ProcessReportRequestOnMessage.run(ProcessReportRequestOnMessage.java:74)
at com.cad.registration.command.AbstractCommand.execute(AbstractCommand.java:106)
at com.cad.flow.core.Run.run(Unknown Source)
at com.cad.flow.core.WorkflowComponent.run(Unknown Source)
at com.cad.flow.ejbs.WorkflowManagerBean.execute(WorkflowManagerBean.java:238)
at com.cad.flow.ejbs.WorkflowManagerBean.execute(WorkflowManagerBean.java:135)
at com.cad.flow.ejbs.WorkflowManager_uh667k_EOImpl.execute(WorkflowManager_uh667k_EOImpl.java:132)
at com.cad.flow.ejbs.WorkflowManager_uh667k_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:174)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:335)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:252)
at com.cad.flow.ejbs.WorkflowManager_uh667k_EOImpl_1001_WLStub.execute(Unknown Source)
at com.cad.util.WorkflowProxy.runWorkflow(WorkflowProxy.java:128)
at com.cad.kbd.messenger.listener.mdb.ReportRequestMDB.onMessage(ReportRequestMDB.java:84)
at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466)
at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:371)
at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:327)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4072)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:3964)
at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:4490)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:464)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
Caused by: Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.3.0) (Build 070620)): oracle.toplink.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: [BEA][Oracle JDBC Driver]Value can not be converted to requested type.Error Code: 0
Call:SELECT COUNT(*), to_char(REG_DATE, 'YYYY/MM/DD') FROM SYSTEM_DETAIL WHERE ((REG_DATE BETWEEN {ts '2008-08-10 00:00:00.0'} AND {ts '2008-09-30 23:59:59.0'}) AND (GEOGRAPHIC_ID = 104)) GROUP BY to_char(REG_DATE, 'YYYY/MM/DD') ORDER BY to_char(REG_DATE, 'YYYY/MM/DD') ASC
Query:ReportQuery(com.cad.registration.RegistrationDetailImpl)
at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:282)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.getObject(DatabaseAccessor.java:988)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.fetchRow(DatabaseAccessor.java:780)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:562)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:441)
at oracle.toplink.threetier.ServerSession.executeCall(ServerSession.java:457)
at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:117)
at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:103)
at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:174)
at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:481)
at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:825)
at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.selectAllReportQueryRows(ExpressionQueryMechanism.java:791)
at oracle.toplink.queryframework.ReportQuery.executeDatabaseQuery(ReportQuery.java:518)
at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:620)
at oracle.toplink.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:779)
at oracle.toplink.queryframework.ReadAllQuery.execute(ReadAllQuery.java:451)
at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:2089)
at oracle.toplink.publicinterface.Session.executeQuery(Session.java:993)
at oracle.toplink.publicinterface.Session.executeQuery(Session.java:965)
at oracle.toplink.publicinterface.Session.executeQuery(Session.java:878)
at com.cad.persistence.toplink.TopLinkPersistenceBrokerImpl.executeQuery(TopLinkPersistenceBrokerImpl.java:420)
at com.cad.report.data.DocumentSys.getSummitedDocumentNumber(DocumentSys.java:332)
at com.cad.report.data.DocumentSys.loadData(DocumentSys.java:110)
... 24 more
Caused by: java.sql.SQLException: [BEA][Oracle JDBC Driver]Value can not be converted to requested type.
at weblogic.jdbc.base.BaseExceptions.createException(Unknown Source)
at weblogic.jdbc.base.BaseExceptions.getException(Unknown Source)
at weblogic.jdbc.base.BaseData.getTimestamp(Unknown Source)
at weblogic.jdbc.base.BaseResultSet.getTimestamp(Unknown Source)
at weblogic.jdbc.wrapper.ResultSet_weblogic_jdbc_base_BaseResultSet.getTimestamp(Unknown Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.getObjectThroughOptimizedDataConversion(DatabaseAccessor.java:1038)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.getObject(DatabaseAccessor.java:942)
... 45 moreHere is my code
ExpressionBuilder builder = new ExpressionBuilder();
ReportQuery query = new ReportQuery(RegistrationDetailImpl.class, builder);
query.addArgument("startTime");
query.addArgument("endTime");
query.addArgument("lro");
Expression lroCol = builder.get("lro");
Expression regDateCol = builder.get(
QueryConstants.RegistrationDetailQueryConstants.REGISTRATION_NUMBER_COL).get(
QueryConstants.RegistrationDetailQueryConstants.REGISTRATION_DATE_COL);
Expression formattedRegDateCol = regDateCol.getFunction("to_char", "YYYY/MM/DD");
Expression timeExp = regDateCol.between(builder.getParameter("startTime"), builder
.getParameter("endTime"));
Expression lroExp = lroCol.equal(builder.getParameter("lro"));
query.setSelectionCriteria(timeExp.and(lroExp));
query.addCount();
query.addAttribute("regDate", formattedRegDateCol);
query.addGrouping(formattedRegDateCol);
query.addOrdering(formattedRegDateCol.ascending());
descriptor.getDescriptorQueryManager().addQuery("testquery", query); -
Problem with select query (results cant b displayed)
SELECT url,SUM(data_received) xyz FROM logs GROUP BY url ORDER BY xyz desc
when i triedthe above query in the worksheet it works fine but when i write same query in code i get this error.
myjsp page has this code.
<%while (rset.next())
out.println("<tr>");
out.println("<td>" +
rset.getString(1) + "</td><td>" +
rset.getInt(2) + "</td><td> " +
"</td>");
out.println("<tr>");
%>
This is the error
500 Internal Server Error
java.sql.SQLException: Invalid column name at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:240) at oracle.jdbc.driver.OracleStatement.get_column_index(OracleStatement.java:3201) at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:1880) at oracle.jdbc.driver.ScrollableResultSet.findColumn(ScrollableResultSet.java:1308) at oracle.jdbc.driver.OracleResultSet.getInt(OracleResultSet.java:1618) at list_action._jspService(_list__action.java:67) [list_action.jsp] at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.0.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:60) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:416) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:119) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230) at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33) at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595)
please helpit is better to use into table ....itab.
dont go for joins if u r joining four tables .......
it is better to for all entries.
SELECT aauart awerks akdauf akdpos
bftrmi baufnr bstlbez baufpl
blead_aufnr bprodnet
FROM aufk AS a
INNER JOIN afko AS b
ON baufnr EQ aaufnr
INTO TABLE i_data1
WHERE a~auart IN s_auart
AND a~kdauf IN s_vbeln
AND a~werks EQ p_werks
AND b~aufnr IN s_aufnr
AND b~ftrmi IN s_ftrmi.
if i_data1[] is not initial .
if any sorting criteria is required based on primary keys write the sort statement here.
select crueck crmzhl
cvornr carbid clmnga cxmnga
crmnga cism04 cism05 cbudat
d~kunnr
e~arbpl
FROM afru AS c inner join vbak AS d
ON caufnr EQ aaufnr innerjoin crhd AS e
like this u need to do...........................
u have joined around five tables ...definetly that wont work
endif. -
Hi All,
i_dfkkko-xblnr
IF NOT i_dfkkko[] IS INITIAL .
SELECT opbel
belnr
FROM erchc
INTO TABLE i_erchc1
FOR ALL ENTRIES IN i_dfkkko
WHERE opbel EQ i_dfkkko-xblnr.
ENDIF.
I am using the above select query.problem is when i put the value
of i_dfkkko-xblnr by going to the table erchc i am getting the record.But this qury is not resulting any value.
i have checked in debug mode copied the value of xblnr of i_dfkkko
and went to erchc table and passed to opbel of erchc i got the reords.
can anybody pls help..
Rgds,
SaiHi,
The database would be having the value with leading zeroes.
Use FM "CONVERSION_EXIT_ALPHA_INPUT" to conver the values & then pass to select query.
_dfkkko-xblnr
IF NOT i_dfkkko[] IS INITIAL .
loop at i_dfkkko.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
VALUE(INPUT) = i_dfkkko-xblnr
IMPORITNG
VALUE(OUTPUT) = i_dfkkko-xblnr.
modify i_dfkkko.
endloop.
SELECT opbel
belnr
FROM erchc
INTO TABLE i_erchc1
FOR ALL ENTRIES IN i_dfkkko
WHERE opbel EQ i_dfkkko-xblnr.
ENDIF. -
Problem with select query when it returns a NULL value
Hi all,
I have a d/b table called QMEL and i picked VBELN from that table. Now if the VBELN value in that table is NULL i have to wtite an if condition.
Can i say it like this
IF VBELN = ' '.
write: enter into the if condition.
ELSE.
write: enter into the else condition.
ENDIF.
or should is say some thing else? my objective is ..i should execute some statments if VBELN has no value and i should execute some othet statements if VBELN has a value.
Kindly help..as even though i put above condition..it deosnot work
Regards,
Jessica Samhi
check this
if u r using selection optins use this code
IF NOT s_material[] IS INITIAL.
SELECT material
FROM marc
INTO l_material
WHERE material IN s_material.
ENDSELECT.
IF sy-subrc NE 0 AND l_material IS INITIAL.
MESSAGE e302 WITH space.
ENDIF.
ENDIF.
if u r using parameter then
IF NOT P_material IS INITIAL.
SELECT material
FROM marc
INTO l_material
WHERE material EQ P_material.
ENDSELECT.
IF sy-subrc NE 0 AND l_material IS INITIAL.
MESSAGE e302 WITH space.
ENDIF.
ENDIF.
~linganna
Edited by: katigiri linganna on Apr 8, 2009 5:58 AM -
Problem with select query inside a function.
Hi,
i have created a function as
create or replace function "NEW"
(emp in number,
s_date in DATE,
e_date in DATE)
return number
is
v_alo number default 0;
v_alo2 number default 0;
v_date date;
begin
select sum(allocation_percent) into v_alo from employeeproject where start_date < s_date and end_date > e_date and pid != 'BPDE-KER12' and employee_id = emp;
select allocation_percent into v_alo2 from employeeproject where start_date < s_date and end_date > e_date and pid = 'BPDE-KER12' and employee_id = emp;
select max(end_date) into v_date from employeeproject where employee_id=emp having max(end_date) <= S_DATE;
if v_alo < 100 then
return 1;
else if v_alo2 = 100 then
return 2;
else if v_date < s_date then
return 3;
else
return 4;
end if;
end if;
end if;
exception
when NO_DATA_FOUND then
return 5;
end;it is compiled correctly.
when executing the function with
select abc.a,new(a,'03-jan-2011','04-jan-2011') "status" from abc where new(a,'03-jan-2011','04-jan-2011') in (1,2,3,4);it is returning
A status
1 5
2 5
3 5
instead of
A status
1 1
2 2
3 3
and when i comment any two select statements then some part of my ans is correct.
unable to understand the behaviour.
can any pls help me understand it.
Thanks,
hariHi,
thanks for the reply, and sorry for my ugly code.
i am using Oracle database 10g express edition.
Case could be a option to use but i need to figure why my query is not returning any value when used together.
my requirement is to find
the employees who are have allocation percent sum < 100 for a defined period(excluding pid=BPDE-KER12) and
employee who is mapped to pid=BPDE-KER12 not in my first requirement in that period and
the employees whose latest end date is less than the new start date.
i have tried the new modified code as you said but this time it returns null, not even exceptions running.
i divide my requirement into three functions which will return value.
1. create or replace function "NEW4"
(emp in number,
s_date in DATE,
e_date in DATE)
return number
is
v_alo number default 0;
v_alo2 number default 0;
v_date date;
begin
--to check if the employee total percentage is <100 then return 1 else return 4
select sum(allocation_percent) into v_alo from pm_employee_project
where
start_date < s_date and end_date > e_date and pid !='BPDE-KER12' and employee_id = emp;
if v_alo < 100 then
return 1;
elsif v_alo2 = 100 then
return 2;
elsif v_date < s_date then
return 3;
else
return 4;
end if;
exception
when NO_DATA_FOUND then
return 5;
end;
then,
select abc.a,NEW4(a,'03-jan-2011','30-jan-2011') "STATUS" from abc
result,
A STATUS
1 *1*
2 4
3 4 2.create or replace function "NEW5"
(emp in number,
s_date in DATE,
e_date in DATE)
return number
is
v_alo number default 0;
v_alo2 number default 0;
v_date date;
begin
--To select employee who are in a specific pid.
select allocation_percent into v_alo2 from pm_employee_project where
start_date < s_date and end_date > e_date and pid = 'BPDE-KER12' and
employee_id = emp;
if v_alo2 = 100 then
return 2;
elsif v_alo < 100 then
return 1;
elsif v_date < s_date then
return 3;
else
return 4;
end if;
exception
when NO_DATA_FOUND then
return 5;
end;
then,
select abc.a,NEW5(a,'03-jan-2011','30-jan-2011') "STATUS" from abc
Result,
A STATUS
1 5
2 *2*
3 5 3. create or replace function "NEW6"
(emp in number,
s_date in DATE,
e_date in DATE)
return number
is
v_alo number default 0;
v_alo2 number default 0;
v_date date;
begin
--to select the employee whose project end date is less thann the new date.
select max(end_date) into v_date from pm_employee_project where
employee_id=emp having max(end_date) <= S_DATE;
if v_alo2 = 100 then
return 2;
elsif v_alo = 100 then
return 1;
elsif v_date < s_date then
return 3;
else
return 4;
end if;
exception
when NO_DATA_FOUND then
return 5;
end;
then,
select abc.a,NEW6(a,'03-jan-2011','30-jan-2011') "STATUS" from abc
Result,
A STATUS
1 5
2 5
3 *3* so my function works properly individually, but i want all the three conditions in a single function with same order as above 1 then 2 and then 3.
and when i try to do it that way i am not getting my result as
A STATUS
1 *1*
2 *2*
3 *3*
so how can i proceed.
my input table values,
select * from abc
A B C
1 2 2
2 1 3
3 1 2
select * from pm_employee_project
varchar2 varchar2 date date date varchar2
EMPLOYEE_ID PID START_DATE END_DATE ALLOCATION_PERCENT SUPERVISOR_ID
1 10 02-JAN-11 31-JAN-11 89 -
1 20 05-JAN-11 20-JAN-11 9 -
1 BPDE-KER12 21-JAN-11 31-JAN-11 11 -
2 BPDE-KER12 01-JAN-11 31-JAN-11 100 -
3 30 01-JAN-10 01-JAN-11 100 -
Problem with select query in search
Hi,
Here i am using MYSQL database and when i am insertind date to database it is saving like '2009-11-10 00:00:00' and when i used to dispaly this in dateformat as '11/10/2009' .
here is the problem occurs , when i write a search query as
select recruitername,interviewdate ,skillset
from details
where interviewdate = #form.interviewdate#
i am getting problem with date . would u please help me how to solve this issue .Try to use DateFormat
select recruitername,interviewdate ,skillset
from details
where interviewdate = #DateFormat(form.interviewdate, "yyyy-dd-mm")# -
The school says that it is a problem with firefox version 7, I can not begin to express how difficult it makes for me to submit my work. I hope you get it fixed soon so that we all at Kaplan can submit our homework.
thanksThis is the second time I have been unable to open Firefox after an update. On both occassions nothing is displayed (no splash screen, nor errors). A firefox.exe task is then shown in Task Manager.
-
Problem with InDesing hiding and other programs can not be opened on screen at the same time.
I have just installed InDesign on my Mac today. When opened it takes up all the screen and then when I try to open any other programs like a browser, it hides. I would like to make the InDesign window smaller, so I can follow instructions from a website, but the minimize window size buttons are not showing up at all. Any idea how I can fix the InDesing window size and show it along with the browser? Also how to detach it from Finder bar on the top of my screen?
Hi Guys,
Thank you so much for all your help. I was now able to fix it. It was after all the problem with the application frame being Off by dafout. It was showing up, but taking my whole descktop. Now when I followed your advice and checket it on under "Window" , it become much smaller and I am not able to resize it and the buttons to minimize or close it are now showing up (they were invisible before). Thank you so much to all of you who have helped me here.
If I may have one more question, I have enocuntered another problem with using this Trial version of inDesign. When I wanted to access Bridge from the Bridge icon inside the program, I got an message that I need to download it from Creative Clowd. I found it strange since I have Photoshop CS6 and Brigge is part of this program, so I don't want to pay for it via Clowd service.
I was able to open Bridge by just clicking on the program from my software launch screen, so it is now working along InDesign, but I wanted it to be part of the InDesign workspcace, so it would show along the program frame on the right of InDesign window and then could be attached there and moved along with it. In such set up I won't need to move each program frame separatelly when they are in my way while I work. I wonder if it could be fixed and how. Any ideas? I would appreciate very much your reply. -
Dear Customer
I has one Iphone and I have some problem with In-App Purcases Because my sister purchased In-app when she play
and i can not report a problem in Itune,
I inadvertently purchased all of this application in Order Number: MH*****4H5 Date: 04/09/12 ,Order Total $36.81
So i can't use App store on my phone Because have problem Billing info and i dont want this order, I inadvertently purcased all of this application
Hopefully I can ge help from you as well.
Best Regards
<Edited By Host>These are user-to-user forums, you are not talking to Apple here. All purchases are considered final, but you can try contacting iTunes support and see if they will refund or credit you : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption
-
Problem with select query that includes a date
I've been fighting with this for about 4 hours - yes, quite literally... I've never been good with date stuff. I have a brain block.
Anyway, here's the situation:
I have an Access database that has a time/date field. There are no times, just a date in mm/dd/yyyy format.
That table is a list of classes held for the past three years. I want to make a query that only shows the classes that have ended after January 1 of this year. I don't want to put 01/01/2010 in the query itself because I want it to still work next year.
This is the current query:
<cfquery name="classes" datasource="#DSN#" dbtype="ODBC">
SELECT classesTitles.ClassTitle, classesTitles.ClassDesc, classCatagories.catagoryName, classes.classStart, classes.classEnd, classes.classNotes, owners.fName, owners.lName, classTime.timeSlot, classes.classID, classes.classLimit
FROM classCatagories INNER JOIN (((classes INNER JOIN classesTitles ON classes.classTitle = classesTitles.classTitleID) INNER JOIN classTime ON classes.classTime = classTime.timeID) INNER JOIN owners ON classes.classInstructor = owners.ownerID) ON classCatagories.catagoryID = classesTitles.ClassType
WHERE classes.classEnd < 01/01/#DatePart("yyyy", now())#
ORDER BY classes.classStart, classCatagories.catagoryName, classTime.timeSlot, classesTitles.ClassTitle
</cfquery>
I don't get any results, but I should get a list of every class that has an end date before January 1 of this year - about 200 records.
When I swap around the where clause to:
<cfquery name="classes" datasource="#DSN#" dbtype="ODBC">
SELECT classesTitles.ClassTitle, classesTitles.ClassDesc, classCatagories.catagoryName, classes.classStart, classes.classEnd, classes.classNotes, owners.fName, owners.lName, classTime.timeSlot, classes.classID, classes.classLimit
FROM classCatagories INNER JOIN (((classes INNER JOIN classesTitles ON classes.classTitle = classesTitles.classTitleID) INNER JOIN classTime ON classes.classTime = classTime.timeID) INNER JOIN owners ON classes.classInstructor = owners.ownerID) ON classCatagories.catagoryID = classesTitles.ClassType
WHERE classes.classEnd > 01/01/#DatePart("yyyy", now())#
ORDER BY classes.classStart, classCatagories.catagoryName, classTime.timeSlot, classesTitles.ClassTitle
</cfquery>
I get EVERY class in the database, and I should only be getting about 50
The classes are about 8 weeks long, the begin date and end date are in the database as date/time fields, so I need to show everything that ended in 2010, regardless of when it started.
I'm sure it's something glaringly obvious, but it's escaping me.
THANKS
MichelleThe format of your date field in access is irrelevent to the situation at hand. Use proper date objects instead of trying to build a suitable string. For the first of January of the current year, the coldfusion functions createdate(), year(), and now() are your freinds. Then, in case Adam's post was not clear, use cfqueryparam with the resulting variable.
-
Problem with Select query fetching records.
Hi All,
SELECT bukrs belnr gjahr bldat cpudt aedat cputm usnam xblnr bktxt waers
FROM bkpf INTO TABLE bkpf_tbl
WHERE bukrs IN s_bukrs AND blart IN ('RE' , 'ZL')
AND ( ( cpudt > prv_date )
OR ( cpudt = prv_date AND cputm >= prv_time ) )
OR ( ( aedat > prv_date )
OR ( aedat = prv_date AND cputm >= prv_time ) )
AND gjahr IN s_gjahr
AND monat IN s_monat
AND belnr IN s_belnr
My prv_date is 05/04/2010 while debugging.
CPUDT (Accounting Document Entry Date) in BKPF doesnu2019t have any entries.
But AEDAT (Date of the Last Document Change by Transaction) is having a single entry on date 05/04/2010.
While this query is showing number of records around 200000. I feel something is wrong with the AND/OR statements.
Please suggest some ideas?Hi Mishra,
I dont know the excaly wht u r passing in the prv_date and cpudt . But one thing i notice that blart part.
SELECT bukrs belnr gjahr bldat cpudt aedat cputm usnam xblnr bktxt waers
FROM bkpf INTO TABLE bkpf_tbl
WHERE bukrs IN s_bukrs AND blart eq 'RE' or blart eq 'ZL'
AND ( ( cpudt > prv_date )
OR ( cpudt = prv_date AND cputm >= prv_time ) )
OR ( ( aedat > prv_date )
OR ( aedat = prv_date AND cputm >= prv_time ) )
AND gjahr IN s_gjahr
AND monat IN s_monat
AND belnr IN s_belnr.
With Regards,
Sumodh.P -
Problem with select query:help
SELECT url,SUM(data_received) xyz FROM logs GROUP BY url ORDER BY xyz desc
when i triedthe above query in the worksheet it works fine but when i write same query in code i get this error.
myjsp page has this code.
<%while (rset.next())
out.println("<tr>");
out.println("<td>" +
rset.getString(1) + "</td><td>" +
rset.getInt(2) + "</td><td> " +
"</td>");
out.println("<tr>");
%>
This is the error
500 Internal Server Error
java.sql.SQLException: Invalid column name at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:240) at oracle.jdbc.driver.OracleStatement.get_column_index(OracleStatement.java:3201) at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:1880) at oracle.jdbc.driver.ScrollableResultSet.findColumn(ScrollableResultSet.java:1308) at oracle.jdbc.driver.OracleResultSet.getInt(OracleResultSet.java:1618) at list_action._jspService(_list__action.java:67) [list_action.jsp] at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.0.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:60) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:416) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:119) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230) at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33) at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595)
please helpThis is not the proper forum....
Post this thread to
Java Server Pages (JSP)
Greetings...
Sim -
Value cannot be converted to requested type
hi.
can anyone tell me why i get the following error:
[sunm][Oracle JDBC Driver]Value can not be converted to requested type
I get this error when i try to execute a SQL query like the one below:
SELECT * FROM orders WHERE orders.date BETWEEN '20-SEP-05' AND '22-SEP-05'
this is not the exact query i am trying to excute, but serves the purpose of this forum post.
ideally, i'd like to use the "?" parameter instead of the dates written above. the application's user selects a StartDate and EndDate for his search. this should display a list of orders within that date range.
i have tried using several date formats, as well as the TO_DATE() function. i always get this error when using the "?" parameter but it displays the correct records when i use an actual date.
i also only get this error when working with dates. i can use the "?" parameter with no problems for any other table column.
someone please help!!How is the user selecting a start and end date? By using the calendar? You might need to convert the calendar's date into an SQL friendly date. For instance, try this:
somethingRowSet.setObject(1, (new java.sql.Timestamp(((java.util.Date)StartDate.getValue()).getTime()).toString()))You might also want to try turning on printStatements in the row set's properties. This will cause the row set to print out the parameters to the log file so you can then analyze what exactly the row set is doing.
Hope this helps.
-Jeff -
Problem with "SELECT...FOR UPDATE OF..." and "POST command" combination
Problem in committing transactions in Multiple Forms (Oracle Forms) with POST built-in command:
Consider that the following statements are written in WHEN-WINDOW-CLOSED trigger of a called form.
Statements in called form (Form name: FORM_CHILD):
go_block('display_block') ;
do_key('execute_query') ;
-- Data from table_b will be populated in this block, based on the value of COLUMN_1 obtained
-- from TABLE_A.
-- Example: If the value of COLUMN_1 is 10, then all the matching records from TABLE_B, which
-- are inserted with value 10 in TABLE_B.COLUMN_1 will be fetched and shown here.
if user_choice = 'YES' then
commit ;
else
rollback ;
end if ;
Statements in calling forms:
There are two calling forms having following statements and it is going to call the above said called form.
CALLING FORM 1
Statements in KEY-COMMIT trigger:
post;
call_form(form_child, no_activate) ;
Statements in ON-INSERT trigger:
select column_1
from table_a
for update of column_1
where column_2 = 'X' ;
update table_a
set column_1 = column_1 + 1
where column_2 = 'X' ;
insert into table_b ...;
insert into table_b ...; Statements in KEY-COMMIT trigger:
post;
call_form(form_child, no_activate) ;
CALLING FORM 2:
Statements in ON-INSERT trigger:
select column_1
from table_a
for update of column_1
where column_2 = 'X' ;
update table_a
set column_1 = column_1 + 1
where column_2 = 'X' ;
insert into table_b ...;
insert into table_b ...;
insert into table_b ...;
Our understanding:
Assume that both the forms are running from two different machines/instances, issuing commit at the same time. In this case, forms will start executing the statements written in ON-INSERT trigger, the moment POST command is executed. Though the commit is issued at the same time, according to oracle, only one of the request will be taken for processing first. Assume that calling form 1 is getting processed first.
So, it fetches the value available in COLUMN_1 of TABLE_A and locks the row from further select, update, etc. as SELECT...FOR UPDATE command is used (note that NOWAIT is not given, hence the lock will be released only when COMMIT or ROLLBACK happens) and proceed executing further INSERT statements. Because of the lock provided by the SELECT...FOR UPDATE command, the statements in calling form 2 will wait for the resource.
After executing the INSERT statements, the FORM_CHILD is called. The rows inserted in to TABLE_A will be queried and shown. The database changes will be committed when user closes the window (as COMMIT is issued in its WHEN-WINDOW-CLOSED trigger). Then the SELECT...FOR UPDATE lock will be released and calling form 2's statements will be executed.
Actual happenings or Mis-behavior:
Calling form 2 starts executing INSERT statements instead of waiting for SELECT...FOR UPDATE lock. Also, the value selected from TABLE_A.COLUMN_1 is same in both the calling forms, which is wrong.
The rows inserted into TABLE_B are having similar COLUMN_1 values in calling form 2 and they are fetched and shown in the called form FORM_CHILD.
Note that in calling form 2 also POST only is issued, but the changes posted there are accessible in calling form 1 also, which is wrong.
Kindly suggest us as to how to fix above problem. It will be much use, if you can send us the information regarding the behavior of Oracle Forms POST built-in also.
Our mail ID: [email protected]
Thanks a lot in advance.You have several problems:
1. On-Insert will ONLY run if you have created a new record in a base-table block. If you haven't done that, then the POST command will not cause it to run.
2. Select for update without a "no wait" will lock records for the first form, but when the second form tries this, it will hit the ORA-00054 exception, and will NOT wait. The only way you could make it wait is to issue an UPDATE sql command, which is not such a good way to go.
All POST does is issues SQL insert or update commands for any changes the user has made to records in a form's base-table blocks, without following with a Commit command.
Also understand that Commit is the same as Commit_Form, and Rollback is the same as Clear_Form. You should read up on these in the Forms help topics.
Maybe you are looking for
-
Kann keine Programme mehr installieren. (Creative Cloud)
Hallo zusammen, seit geraumer Zeit ist es mir nicht mehr möglich Programme über den Adobe Application Manager zu installieren. Ich bekomme jedesmal diese Fehlermeldung "Nicht genügend Speicherplatz. Geben Sie speicherplatz auf untitled frei und versu
-
ITunes Movie Download keeps stopping at 1.64GB
Hiya, I recently bought the Avengers off iTunes [HD, trying 1080p] but everytime the download gets to around 1.64GB, the timer vanishes and the progress bar stops going up indefinatly, though it says it's still downloading. The iTunes extra part of t
-
Firefox launches and loads the 5 or 6 tabs I usually keep. Then it load them again, along with other tabs I closed long ago. And sometimes it loads them all again, so there is a string of 18 or 2o tabs when all I want is the regular 5 or 6 I usually
-
How to arrange items in an application
Hi, I'm new at APEX and at this forum My Question is: I want to create a region that shows a certain record from a table but i want to be able to arrange the items by my choice. when i create the region based on a form items are arrange verticaly and
-
Create a registry key from SAP
Hi all, I am trying to create a registry key from SAP. The code i am using is as follows. data: h_gui type ole2_object. data: GuiXT_active type I. data: root type I value 1. *// Connect to desktop object Create Object h_gui 'SAPINFO'. Call