CREATING A SEARCH IN JAVA USING MYSQL QUERY
How do i create a seach in java using mysql queries. The search need to be like a good type one, whereby a category is typed and the results obtained via the search system using jtable.
Thank you.
Read the tutorial on [url http://java.sun.com/docs/books/tutorial/]JDBC Database Access.
Read the tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/table.html]How to Use Tables.
Put the two together and you come up with something like [url http://forum.java.sun.com/thread.jsp?forum=57&thread=497641]this.
Similar Messages
-
How to create a DSN Less Connection using MySQL
Hi All
How to create a DSN Less Connection using MySQL?
http://www.caucho.com/projects/jdbc-mysql/index.xtp and downloaded Caucho driver and installed the jar ---- caucho-jdbc-mysql-0.2.7.jar in my classpath..
this is how i embedded the code
try
driver = (Driver) Class.forName("com.caucho-jdbc-mysql-0.2.7.Driver").newInstance();
catch (Exception e)
lastErr = "Cannot load the driver, reason:"+e.toString();
nothing seems to work with code..
Unable to proceed..Any piece of code would be of great help..
Thanks and regds
GautamAccording to the installation instructions for that driver:
The driver is com.caucho.jdbc.mysql.Driver
The url is jdbc:mysql-caucho://hostname:port/database
You used something else for the driver name. So it doesn't work. By the way, I found those instructions here: http://www.caucho.com/projects/jdbc-mysql/ -
30EA4 Problem using MySql: "Query execution was interrupted"
Any query executes the first time but a second execution always causes the error "Query execution was interrupted"
(Update: I just installed the prodcution release of sql delveloper 2.1.1.64.45 and have the same issue)
I am using MySql driver 5.1.15
Others seem to have a similar issue and I tries the older JDBC drivers but the 5.0.4 cause the connection to hang and the 5.0.8 caused the same problem "Query execution was interrupted"
Vendor Code 1317 Query execution was interrupted MySQL
I am using Windows7 64 bit (sql developer and jdk are 32 bit), see below
MySql version
-------------------------------------------------------+
| Variable_name | Value |
-------------------------------------------------------+
| innodb_version | 1.1.4 |
| protocol_version | 10 |
| slave_type_conversions | |
| version | 5.5.8 |
| version_comment | MySQL Community Server (GPL) |
| version_compile_machine | x86 |
| version_compile_os | Win64 |
-------------------------------------------------------+
SQL Develper Info:
About
Oracle SQL Developer 3.0.03
Version 3.0.03
Build MAIN-03.97
Copyright © 2005, 2011 Oracle. All Rights Reserved.
IDE Version: 11.1.1.4.37.59.36
Product ID: oracle.sqldeveloper
Product Version: 11.1.2.03.97
Version
Component Version
========= =======
Java(TM) Platform 1.6.0_24
Oracle IDE 3.0.03.97
Versioning Support 3.0.03.97
Properties
Name Value
==== =====
awt.toolkit sun.awt.windows.WToolkit
class.load.environment oracle.ide.boot.IdeClassLoadEnvironment
class.load.log.level CONFIG
class.transfer delegate
file.encoding Cp1252
file.encoding.pkg sun.io
file.separator \
http.agent Mozilla/5.0 (Java 1.6.0_24; Windows 7 6.1 x86; en_IE) ICEbrowser/v6_1_3
ice.browser.forcegc false
ice.pilots.html4.ignoreNonGenericFonts true
ice.pilots.html4.tileOptThreshold 0
ide.AssertTracingDisabled true
ide.bootstrap.start 7381246437329
ide.build MAIN-03.97
ide.conf C:\Program Files (x86)\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf
ide.config_pathname C:\Program Files (x86)\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf
ide.debugbuild false
ide.devbuild false
ide.extension.search.path sqldeveloper/extensions:jdev/extensions:ide/extensions
ide.firstrun true
ide.java.minversion 1.6.0_04
ide.launcherProcessId 2204
ide.main.class oracle.ide.boot.IdeLauncher
ide.patches.dir ide/lib/patches
ide.pref.dir C:\Users\mark\AppData\Roaming\SQL Developer
ide.pref.dir.base C:\Users\mark\AppData\Roaming
ide.product oracle.sqldeveloper
ide.shell.enableFileTypeAssociation C:\Program Files (x86)\sqldeveloper\sqldeveloper.exe
ide.splash.screen splash.gif
ide.startingArg0 C:\Program Files (x86)\sqldeveloper\sqldeveloper.exe
ide.startingcwd C:\Program Files (x86)\sqldeveloper
ide.user.dir C:\Users\mark\AppData\Roaming\SQL Developer
ide.user.dir.var IDE_USER_DIR
ide.vcs.noapplications true
ide.work.dir C:\Users\mark\Documents\SQL Developer
ide.work.dir.base C:\Users\mark\Documents
ilog.propagatesPropertyEditors false
java.awt.graphicsenv sun.awt.Win32GraphicsEnvironment
java.awt.printerjob sun.awt.windows.WPrinterJob
java.class.path ..\..\ide\lib\ide-boot.jar
java.class.version 50.0
java.endorsed.dirs C:\Program Files (x86)\Java\jdk1.6.0_24\jre\lib\endorsed
java.ext.dirs C:\Program Files (x86)\Java\jdk1.6.0_24\jre\lib\ext;C:\Windows\Sun\Java\lib\ext
java.home C:\Program Files (x86)\Java\jdk1.6.0_24\jre
java.io.tmpdir C:\Users\mark\AppData\Local\Temp\
java.library.path C:\Program Files (x86)\sqldeveloper;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files\TortoiseSVN\bin;C:\Program Files\SlikSvn\bin\;C:\Program Files (x86)\Java\jdk1.6.0_24\bin;C:\Program Files (x86)\OpenVPN\bin;C:\tools\apache-maven-3.0.2\bin;C:\tools\mysql-5.5.8-winx64\bin
java.naming.factory.initial oracle.javatools.jndi.LocalInitialContextFactory
java.protocol.handler.pkgs oracle.jdevimpl.handler
java.runtime.name Java(TM) SE Runtime Environment
java.runtime.version 1.6.0_24-b07
java.specification.name Java Platform API Specification
java.specification.vendor Sun Microsystems Inc.
java.specification.version 1.6
java.util.logging.config.file logging.conf
java.vendor Sun Microsystems Inc.
java.vendor.url http://java.sun.com/
java.vendor.url.bug http://java.sun.com/cgi-bin/bugreport.cgi
java.version 1.6.0_24
java.vm.info mixed mode
java.vm.name Java HotSpot(TM) Client VM
java.vm.specification.name Java Virtual Machine Specification
java.vm.specification.vendor Sun Microsystems Inc.
java.vm.specification.version 1.0
java.vm.vendor Sun Microsystems Inc.
java.vm.version 19.1-b02
jdbc.library /C:/Program Files (x86)/sqldeveloper/jdbc/lib/ojdbc6.jar
line.separator \r\n
log.file.name ..//log/datamodeler.log
oracle.home C:\Program Files (x86)\sqldeveloper
oracle.ide.util.AddinPolicyUtils.OVERRIDE_FLAG true
oracle.jdbc.mapDateToTimestamp false
oracle.translated.locales de,es,fr,it,ja,ko,pt_BR,zh_CN,zh_TW
oracle.xdkjava.compatibility.version 9.0.4
orai18n.library /C:/Program Files (x86)/sqldeveloper/jlib/orai18n.jar
os.arch x86
os.name Windows 7
os.version 6.1
path.separator ;
reserved_filenames con,aux,prn,lpt1,lpt2,lpt3,lpt4,lpt5,lpt6,lpt7,lpt8,lpt9,com1,com2,com3,com4,com5,com6,com7,com8,com9,conin$,conout,conout$
sqldev.debug false
sun.arch.data.model 32
sun.boot.class.path C:\Program Files (x86)\Java\jdk1.6.0_24\jre\lib\resources.jar;C:\Program Files (x86)\Java\jdk1.6.0_24\jre\lib\rt.jar;C:\Program Files (x86)\Java\jdk1.6.0_24\jre\lib\sunrsasign.jar;C:\Program Files (x86)\Java\jdk1.6.0_24\jre\lib\jsse.jar;C:\Program Files (x86)\Java\jdk1.6.0_24\jre\lib\jce.jar;C:\Program Files (x86)\Java\jdk1.6.0_24\jre\lib\charsets.jar;C:\Program Files (x86)\Java\jdk1.6.0_24\jre\lib\modules\jdk.boot.jar;C:\Program Files (x86)\Java\jdk1.6.0_24\jre\classes
sun.boot.library.path C:\Program Files (x86)\Java\jdk1.6.0_24\jre\bin
sun.cpu.endian little
sun.cpu.isalist pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86
sun.desktop windows
sun.io.unicode.encoding UnicodeLittle
sun.java2d.ddoffscreen false
sun.jnu.encoding Cp1252
sun.management.compiler HotSpot Client Compiler
sun.os.patch.level
svnkit.sax.useDefault true
user.country IE
user.dir C:\Program Files (x86)\sqldeveloper\sqldeveloper\bin
user.home C:\Users\mark
user.language en
user.name mark
user.timezone Europe/Paris
user.variant
windows.shell.font.languages
Extensions
Name Identifier Version Status
==== ========== ======= ======
Check For Updates oracle.ide.webupdate 11.1.1.4.37.59.36 Loaded
Code Editor oracle.ide.ceditor 11.1.1.4.37.59.36 Loaded
Component Palette oracle.ide.palette1 11.1.1.4.37.59.36 Loaded
Data Miner oracle.dmt.dataminer 11.2.0.1.9.96 Loaded
Database Connection Support oracle.jdeveloper.db.connection 11.1.1.4.37.59.36 Loaded
Database Object Explorers oracle.ide.db.explorer 11.1.1.4.37.59.36 Loaded
Database UI oracle.ide.db 11.1.1.4.37.59.36 Loaded
Diagram Framework oracle.diagram 11.1.1.4.37.59.36 Loaded
Diagram Javadoc Extension oracle.diagram.javadoc 11.1.1.4.37.59.36 Loaded
Diagram Thumbnail oracle.diagram.thumbnail 11.1.1.4.37.59.36 Loaded
Diff/Merge oracle.ide.diffmerge 11.1.1.4.37.59.36 Loaded
Extended IDE Platform oracle.javacore 11.1.1.4.37.59.36 Loaded
External Tools oracle.ide.externaltools 11.1.1.4.37.59.36 Loaded
File Support oracle.ide.files 11.1.1.4.37.59.36 Loaded
Help System oracle.ide.help 11.1.1.4.37.59.36 Loaded
History Support oracle.jdeveloper.history 11.1.1.4.37.59.36 Loaded
Import/Export Support oracle.ide.importexport 11.1.1.4.37.59.36 Loaded
Index Migrator support oracle.ideimpl.indexing-migrator 11.1.1.4.37.59.36 Loaded
JDeveloper Runner oracle.jdeveloper.runner 11.1.1.4.37.59.36 Loaded
JViews Registration Addin oracle.diagram.registration 11.1.1.4.37.59.36 Loaded
Log Window oracle.ide.log 11.1.1.4.37.59.36 Loaded
Mac OS X Adapter oracle.ideimpl.apple 11.1.1.4.37.59.36 Loaded
Navigator oracle.ide.navigator 11.1.1.4.37.59.36 Loaded
Object Gallery oracle.ide.gallery 11.1.1.4.37.59.36 Loaded
Oracle IDE oracle.ide 11.1.1.4.37.59.36 Loaded
Oracle SQL Developer oracle.sqldeveloper 11.1.2.03.97 Loaded
Oracle SQL Developer - 3rd Party Database Browsers oracle.sqldeveloper.thirdparty.browsers 11.1.1.03.97 Loaded
Oracle SQL Developer - DBA Navigator oracle.sqldeveloper.dbanavigator 11.1.1.03.97 Loaded
Oracle SQL Developer - Extras oracle.sqldeveloper.extras 1.1.1.03.97 Loaded
Oracle SQL Developer - File Navigator oracle.sqldeveloper.filenavigator 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations Antlr3 Translator oracle.sqldeveloper.migration.translation.core_antlr3 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations Application Migration oracle.sqldeveloper.migration.application 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations Core oracle.sqldeveloper.migration 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations DB2 oracle.sqldeveloper.migration.db2 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations DB2 Translator oracle.sqldeveloper.migration.translation.db2 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations Microsoft Access oracle.sqldeveloper.migration.msaccess 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations Microsoft SQL Server oracle.sqldeveloper.migration.sqlserver 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations MySQL oracle.sqldeveloper.migration.mysql 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations Sybase Adaptive Server oracle.sqldeveloper.migration.sybase 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations T-SQL Translator oracle.sqldeveloper.migration.translation.core 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations Teradata oracle.sqldeveloper.migration.teradata 11.1.1.03.97 Loaded
Oracle SQL Developer - Migrations Translation UI oracle.sqldeveloper.migration.translation.gui 11.1.1.03.97 Loaded
Oracle SQL Developer - Object Viewer oracle.sqldeveloper.oviewer 11.1.1.03.97 Loaded
Oracle SQL Developer - Real Time SQL Monitoring oracle.sqldeveloper.sqlmonitor 11.1.1.03.97 Loaded
Oracle SQL Developer - Reports oracle.sqldeveloper.report 11.1.1.03.97 Loaded
Oracle SQL Developer - Scheduler oracle.sqldeveloper.scheduler 11.1.1.03.97 Loaded
Oracle SQL Developer - Schema Browser oracle.sqldeveloper.schemabrowser 11.1.1.03.97 Loaded
Oracle SQL Developer - SearchBar oracle.sqldeveloper.searchbar 11.1.1.03.97 Loaded
Oracle SQL Developer - Snippet oracle.sqldeveloper.snippet 11.1.1.03.97 Loaded
Oracle SQL Developer - Spatial oracle.sqldeveloper.spatial 11.1.1.03.97 Loaded
Oracle SQL Developer - TimesTen oracle.sqldeveloper.timesten 2.0.0.03.97 Loaded
Oracle SQL Developer - Tuning oracle.sqldeveloper.tuning 11.1.1.03.97 Loaded
Oracle SQL Developer - Unit Test oracle.sqldeveloper.unit_test 11.1.1.03.97 Loaded
Oracle SQL Developer - User Extensions Support oracle.sqldeveloper.userextensions 11.1.1.03.97 Loaded
Oracle SQL Developer - Worksheet v2 oracle.sqldeveloper.worksheet 11.1.1.03.97 Loaded
Oracle SQL Developer - XML Schema oracle.sqldeveloper.xmlschema 11.1.1.03.97 Loaded
Oracle SQL Developer Data Modeler oracle.datamodeler 3.0.0.665 Loaded
Oracle SQL Developer Data Modeler - Reports oracle.sqldeveloper.datamodeler_reports 11.1.1.03.97 Loaded
PROBE Debugger oracle.jdeveloper.db.debug.probe 11.1.1.4.37.59.36 Loaded
Peek oracle.ide.peek 11.1.1.4.37.59.36 Loaded
Persistent Storage oracle.ide.persistence 11.1.1.4.37.59.36 Loaded
Property Inspector oracle.ide.inspector 11.1.1.4.37.59.36 Loaded
QuickDiff oracle.ide.quickdiff 11.1.1.4.37.59.36 Loaded
Replace With oracle.ide.replace 11.1.1.4.37.59.36 Loaded
Runner oracle.ide.runner 11.1.1.4.37.59.36 Loaded
VHV oracle.ide.vhv 11.1.1.4.37.59.36 Loaded
Versioning Support oracle.jdeveloper.vcs 11.1.1.4.37.59.36 Loaded
Versioning Support for Subversion oracle.jdeveloper.subversion 11.1.1.4.37.59.36 Loaded
Virtual File System oracle.ide.vfs 11.1.1.4.37.59.36 Loaded
Web Browser and Proxy oracle.ide.webbrowser 11.1.1.4.37.59.36 Loaded
XML Editing Framework IDE Extension oracle.ide.xmlef 11.1.1.4.37.59.36 Loaded
audit oracle.ide.audit 11.1.1.4.37.59.36 Loaded
classpath: protocol handler extension oracle.jdeveloper.classpath 11.1.1.0.0 Loaded
jdukshare oracle.bm.jdukshare 11.1.1.4.37.59.36 Loaded
mof-xmi oracle.mof.xmi 11.1.1.4.37.59.36 Loaded
oracle.ide.dependency oracle.ide.dependency 11.1.1.4.37.59.36 Loaded
oracle.ide.indexing oracle.ide.indexing 11.1.1.4.37.59.36 Loaded
palette2 oracle.ide.palette2 11.1.1.4.37.59.36 Loaded
status oracle.ide.status 11.1.1.4.37.59.36 Loaded
Edited by: user501466 on 19-Mar-2011 03:21Hi Dermot,
Some clarification.
I have tried these 3 drivers below with the following results:
5.0.4 First Query succeeds, Second gives error "Unknown prepared statement handler (131072) given to mysqld_stmt_execute". At this point I can exit SQL Developer. If I run it a third time then the query does not complete and any attempt to exit SQL Developer results in "Connection is currently busy, try again?" and ultimately I have to kill it.
5.0.8 First Query succeeds, Second Query fails with Query execution was interrupted. Subsequent queries give the same result.
5.1.15 Same as 5.0.8
I tried your suggestion, removed the driver, restarted, installed the 5.0.4 driver and restated and ran the test,
(I added a drop table so I could run it repeatedly) and it works repeatedly if I choose "Run as script F5".
DROP TABLE table1;
CREATE TABLE table1(col1 int);
INSERT INTO Table1 values(1);
SELECT * FROM table1;
SELECT * FROM table1;
But If I execute the query "select * from table1" using "Run Statement Ctrl-Enter" twice then I get problem behaviour as described above.
I looked in the logfile for SQLDeveloper but it was empty.
I also tried creating a new database as root and connecting as root (same result)
I also tried the NightlyBuild of 5.1 and 6.0 but gave the same result as 5.1.5.
I have two other tools for accessing MySql: Toad and MySql workbench, both of which work but I've used SQL Developer with Oracle for some years and would like to keep using it.
I just tried connecting to a remote MySQL database and that seems to work without problems.
I'm thinking it may be related to some incompatibility between SQLDeveloper and the MySQL installed locally.
I'll try another version....
Ok I installed a 32 bit version of MySql 5.5.10. I thought things were working but now I still get the problem but it is much more intermittent.
Now I can get it by modifying the query ie.
select * from table1; (works repeatedly untill followed by a change to the query)
select * from table1 order by col1; (fails)
Another case
select * from table1 order by col1; (works repeatedly)
select * from table1 order by col1 asc; (fails first time)
very weird...
Edited by: user501466 on 26-Mar-2011 06:19 -
Exception while creating the Search view by using ZBOL
Hi,
I created a ZBOL by using
http://blogs.moovar.com/sap/sap-crm-create-a-custom-bol-for-web-ic/
It is working fine.
I created ZBOL_K.
Now based on this I want create a Search and Search Result.
http://blogs.moovar.com/sap/sap-crm-web-ic-create-a-new-search-view-and-result-view/
In this when I create a Search View I getting the Exception like this.
I went step by step. But in the third page I write like this.
<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<%@extension name="xhtmlb" prefix="xhtmlb" %>
<%@extension name="crm_bsp_ic" prefix="crmic" %>
<%@extension name="thtmlb" prefix="thtmlb" %>
<%@extension name="chtmlb" prefix="chtmlb" %>
<%@extension name="bsp" prefix="bsp" %>
<%
DATA: LV_XML TYPE STRING.
lv_xml = controller->CONFIGURATION_DESCR->GET_CONFIG_DATA( ).
%>
<chtmlb:config xml = "<%= lv_xml %>"
mode = "RUNTIME" />
<thtmlb:advancedSearch id = "advsO"
fieldMetadata = "<%= controller->get_dquery_definitions( ) %>"
header = "<%= TESTSEARCH->get_param_struct_name( ) %>"
fieldNames = "<%= controller->get_possible_fields( ) %>"
maxHits = "//TESTSEARCH/max_hits"
values = "//TESTSEARCH/PARAMETERS"
onEnter = "SEARCH"
ajaxDeltaHandling = "false" />
Save and Activate the view.
But when I go to the config tab. It is showing the Error.
An exception occurred in inbound plug IP_DEFAULT of target view BSP_DLC_CONF/AdvSearchConfig
An exception has occurred Exception Class CX_SY_CREATE_OBJECT_ERROR - The object could not be created: The class does not exist.
Method: CL_BSP_MODEL=>CREATE_STANDALONE_MODEL
Source Text Row: 10
And aslo in available Search Criteria I did not get fields.
So, then how I can solve this problem.
Please tell me any solution.
Regards,
B.Krishna.Hi,
I created a ZBOL by using
http://blogs.moovar.com/sap/sap-crm-create-a-custom-bol-for-web-ic/
It is working fine.
I created ZBOL_K.
Now based on this I want create a Search and Search Result.
http://blogs.moovar.com/sap/sap-crm-web-ic-create-a-new-search-view-and-result-view/
In this when I create a Search View I getting the Exception like this.
I went step by step. But in the third page I write like this.
<%@page language="abap" %>
<%@extension name="htmlb" prefix="htmlb" %>
<%@extension name="xhtmlb" prefix="xhtmlb" %>
<%@extension name="crm_bsp_ic" prefix="crmic" %>
<%@extension name="thtmlb" prefix="thtmlb" %>
<%@extension name="chtmlb" prefix="chtmlb" %>
<%@extension name="bsp" prefix="bsp" %>
<%
DATA: LV_XML TYPE STRING.
lv_xml = controller->CONFIGURATION_DESCR->GET_CONFIG_DATA( ).
%>
<chtmlb:config xml = "<%= lv_xml %>"
mode = "RUNTIME" />
<thtmlb:advancedSearch id = "advsO"
fieldMetadata = "<%= controller->get_dquery_definitions( ) %>"
header = "<%= TESTSEARCH->get_param_struct_name( ) %>"
fieldNames = "<%= controller->get_possible_fields( ) %>"
maxHits = "//TESTSEARCH/max_hits"
values = "//TESTSEARCH/PARAMETERS"
onEnter = "SEARCH"
ajaxDeltaHandling = "false" />
Save and Activate the view.
But when I go to the config tab. It is showing the Error.
An exception occurred in inbound plug IP_DEFAULT of target view BSP_DLC_CONF/AdvSearchConfig
An exception has occurred Exception Class CX_SY_CREATE_OBJECT_ERROR - The object could not be created: The class does not exist.
Method: CL_BSP_MODEL=>CREATE_STANDALONE_MODEL
Source Text Row: 10
And aslo in available Search Criteria I did not get fields.
So, then how I can solve this problem.
Please tell me any solution.
Regards,
B.Krishna. -
Searching a revision using CMIS query in Oracle UCM 11g
Hi,
I have 4 revisions of a content ,4th revision being the latest one ,Is there a way where in I can search the earlier revision of a content i.e. 2,3 or 1st revisions based on a combination of metadata using CMIS query...Take a look at this thread: Search across all revisions of a content
-
Hoe top create summary and detail report using ABAP QUERY
Hi ,
Can any one suggest me how to create summary and detailed report using ABAP Quey.
Regards,
Raghu.Hi,
Table Declaration
tables:mara,mast.
*Declaring the internal table
data: begin of itab_new occurs 0,
matnr like mara-matnr, "Material No
ernam like mara-ernam, "Material Created by
mtart like mara-mtart, "Material Type
matkl like mara-matkl, "Material Desc
werks like mast-werks, "Plant
aenam like mast-aenam, "BOM created
stlal like mast-stlal, "Alternative BOM
end of itab_new.
select-options: p_matnr for mara-matnr.
CODE A : Retrieving the data from the database
select f~matnr f~ernam f~mtart f~matkl m~werks m~aenam m~stlal
into table itab_new
from mara as f inner join mast as m
on f~matnr = m~matnr
where f~matnr in p_matnr.
CODE B : Retrieving the data from the database.
SELECT FMATNR FERNAM FMTART FMATKL MWERKS MAENAM M~STLAL
INTO TABLE ITAB_NEW
FROM MARA AS F INNER JOIN MAST AS M
ON FMATNR = MMATNR
WHERE F~MATNR = P_MATNR.
SORT ITAB_NEW BY ERNAM.
loop at itab_new.
write:/5 itab_new-matnr,itab_new-ernam,itab_new-mtart,itab_new-matkl,itab_new-werks,itab_new-aenam,itab_new-stlal.
endloop.
*TABLES: MARA , MAST.
*DATA:BEGIN OF ITAB_NEW OCCURS 0,
MATNR LIKE MARA-MATNR,
ERNAM LIKE MARA-ERNAM,
MTART LIKE MARA-MTART,
MATKL LIKE MARA-MATKL,
END OF ITAB_NEW.
SELECT MATNR ERNAM MTART MATKL
INTO TABLE ITAB_NEW
FROM MARA
WHERE MTART = 'T'
ORDER BY MATNR ERNAM MTART MATKL.
*DATA: BEGIN OF ITAB OCCURS 0,
MATNR LIKE MARA-MATNR,
END OF ITAB.
Thank U,
Jay.... -
Create Named Search with Java API
Hi,
is it possible to create or modify a named search with the Java API?
Best regards,
RomanHi Olof,
You can use the below code for searching a value in lookup table:
ResultDefinition objResultDefinition = new ResultDefinition(Lookup Table Id);
objResultDefinition.addSelectField(Lookup Field ID);
StringValue [] objStringValue = new StringValue[1];
objStringValue[0] = new StringValue("Value to search");
RetrieveRecordsByValueCommand objRetrieveRecordsByValueCommand = new RetrieveRecordsByValueCommand(objConnectionAccessor);
objRetrieveRecordsByValueCommand.setSession(strUserSessionID);
objRetrieveRecordsByValueCommand.setResultDefinition(objResultDefinition);
objRetrieveRecordsByValueCommand.setFieldId(lookup field id);
objRetrieveRecordsByValueCommand.setFieldValues(objStringValue);
objRetrieveRecordsByValueCommand.execute();
RecordResultSet objRecordResultSet = objRetrieveRecordsByValueCommand.getRecords();
Now using the objRecordResultset in a loop you can get the record id by calling the getRecord(i).getId() method.
Hope this helps!!
Cheers,
Arafat -
Creating a Search Criteria Form Using Oracle ADF Find Mode (10.1.2)
Hi Guys,
Any useful sample links on how to create a custom search form? Basically I have to control parameters and I want to show that in the form..
Thanks!I mean like I have Name and Department as Search Parameters (added as text box maybe) then Search button. after clicking search I want to display the result in same page in a form/table.Im using the UIX page and I added Data Page in the Struts Layout but dont know how to add the form and how to implement the parameter part..
..Thanks! -
ColdFusion Report Builder 9 Using MySQL query's
Hey Everyone
I have been pulling my hair out for several days with this, I have all of the Adobe ColdFusion 9 dev books, and Google returns a cluster of information that doesnt seem to work. I was hoping someone could help me out here.
So what I did was open query builder in Adobe ColdFusion 9 Report Builder, I clicked the icon at the top that says report query and placed the following mySQL information, which works fine.
MySQL
select name.soc_sec, name.last_name, name.first_name, nmcrs.course,nmcrs.crs_txt AS Course_Title ,practicl.day_cod,CAST(practicl.start_hr AS VARCHAR(2)) + ':' + CAST(practicl.start_min AS VARCHAR(2)) AS Start_Time,
CAST(practicl.end_hr AS VARCHAR(2)) + ':' + CAST(practicl.end_min AS VARCHAR(2)) AS End_Time, nmcrs.section, nmcrs.sch_yr, nmcrs.sm_desc, nmattend.attend_txt,address.phone,address.cell_phone,
address.e_mail
From name
--INNER JOIN nmprg ON name.soc_sec = nmprg.soc_sec
INNER JOIN nmcrs ON name.soc_sec = nmcrs.soc_sec
Left Join crssect ON name.soc_sec = crssect.crs_id
Inner Join practicl On practicl.sid = nmcrs.sid
inner join nmattend on name.soc_sec = nmattend.soc_sec
Inner join address On name.soc_sec = address.soc_sec
WHERE (name.camp_cod = 'California') AND (nmcrs.sch_yr = '201213')and (nmcrs.semester = '1') and (nmattend.attend_txt = 'SP') and
(nmcrs.section not like'w%')
group by name.soc_sec, name.last_name, name.first_name,nmcrs.course,nmcrs.crs_txt,practicl.day_cod,practicl.start_hr,
practicl.start_min, practicl.end_hr,practicl.end_min,nmcrs.section, nmcrs.sch_yr,nmcrs.sm_desc, nmcrs.grade,
nmattend.attend_txt, address.phone,address.cell_phone,address.e_mail
ORDER BY nmcrs.section, name.soc_sec
Now I place my fields where I want them in the desgner, I double click the field to open the expression builder and all I have to type is something like query.Start_Time
When I run the report it lists all of the start times that match my criteria.
good
So my trouble is, I would like to use an if statement to make something happen based on the start time and cant get it to work. I have tried using <cfscript> <cfif> <cfquery> if, IIF, nothing works, mainly because once I use one of those tags it no longer recognizes the query.Start_Time.
I was wondering if someone could give me an example on how to do this like
<cfif (query.Start_Time) IS '12:0'>
query.Start_Time = '12.00'
</cfif>
or
<cfscript>
if(query.Start_Time == '12:0')
query.Start_Time = '12:00';
</cfscript>
I mean I know thats wrong and Its probably not that simple but all I need is a simple example to work off of and one would be greatly appreciated. Or even an example in the mySQL info I provided would work too. Please Help
Thanks
ShawnShawn, forgive me not focusing on the direct question, but I want to clarify first that this is not the right forum for that question, about the CF Report Builder. This forum is for CF Builder, the relatively new CF IDE (integrated development environment) for CF, based on Eclipse.
Your question about the CF Report Builder should be directed to its own forum, the CF Reporting forum:
http://forums.adobe.com/community/coldfusion/coldfusion_reporting
I do understand the easy confusion (the name CF Builder is awfully close to the CF Report Builder). Also, the forum name “CF Reporting” may not have jumped out as a place for RB questions. (For any readers who may be interested, the list of all CF-related forums is at http://forums.adobe.com/community/coldfusion)
That forum is not as busy, no, but then the Report Builder is quite a bit older, having come out with CF 7, and not really having been updated much since then. Still, there are folks there who have replied to questions asked, including Adobe staff.
Since I don’t read that forum myself, and won’t see your question asked/answered there, let me point out something else that may help (in case others there would not). You say “I have all of the Adobe ColdFusion 9 dev books”, and that may mean various books like the CF Web App Construction Kit books that Ben, Ray, myself, and others have done.
But did you know that there is an entire chapter on the CF Report Builder in the free online CF9 manual called “Developing ColdFusion 9 Applications” (a 1300-page manual which many miss entirely , as happened with the versions for CF8 and 7 as well). Many people never even know there is any such “documentation” from Adobe for working with the CF Report Builder. I’ll note also that we (writers of books) may not always get into all the detail that’s in those docs because, well, we don’t want to duplicate their effort. But I know even some writers/bloggers/forum respondents never even know of the manuals, as they are rarely referred to.
In your case, with the CFRB, it’s especially important to be aware of its substantial chapter:
http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24 -6fc2.html
For instance, you may already know about this but there you’ll learn that there is a QUERY attribute for the CFREPORT, whereby you can build the query dynamically (as any CFQUERY can be) and then pass that resultset to the report. That may suffice to solve the challenge for you, but if it does not, then you may want to at least take a moment to peruse that chapter before proceeding to ask the question in that other forum.
And if the book doesn’t help (and I grant it may not) them one more suggestion before you may re-post the question on the other forum: it really may be best for you not to make reference to MySQL or CF9 in your subject, as you did here. There’s doesn’t really seem anything about your challenge that’s specific to them, but saying it in your subject may limit who would read/reply (if they don’t use with MySQL or are not yet on CF9).
Hope something there’s helpful.
/charlie
PS If you may feel that this answers the question, please do mark it as such in the forum web interface, if you would please. Thanks. -
Creating a ad-hoc calculation using sql query
Hi All,
I want to know if its possible some way to create a ad-hoc sql query inside a workbook so as to create a calculation using that sql.
I have a folder which gives me balance for any period. My requirement is to display current period balance along with prior years closing balance in same record for each code combination. I dont want to modify folder definition.
Thanks for your inputs.
Vishal.You could try creating a custom function for this purpose. You would need to register the function in the End User Layer and then you can call the function from your report.
-
How to create soap message through java using JAXM
Hi,
I'M REALLY NEW TO THIS JAVA WEB SERVICES. I need to send a soap messages from core java with using url and it goes to my servlet and able to retrieve the soap message and do the processing. I really don't the work flow too. I'm using JAXM for receiving and transfering message. Could anyone tell me how its going to work for core java. Actually i need to accept any incoming soap messages and according to the request i got , i do need to do the further processing and again send back response to the core java. I'm not sure what i'm telling is wright or wrong. I literally confused with whole java web services . Could anyone help me out please or suggest some other suggestions through which i can proceed further.
in advance thanks a lot.......File f = new File("c:\MyFolder");
f.mkdir(); -
Creating formatted search using DI API
Dear All,
Please let me know if we can implement/create formatted search on a UDF textbox using DI API. Is it possible to create formatted search through code using DI API ?
Regards,
Noor HussainYes, it is possible. Look for the FormattedSearches object in SDK.
-
Only firefox executing mysql query two times. but other browser works perfect why?
i am a web developer. and i am facing a problem only with firefox. every time i use MySQL query in my php code fire fox execute it two times. but same query is working fine on other browsers.
Yes, the problem is seen without extensions and also in safe mode.
But, I am starting to think that firefox is running low on memeory or CPU.
Without extensions the possibility of failing is 1 in 3.
I am still unable to explain why closing the browser or aborting the request can cause the stuck request to immediately reach the server.
Is there a way to collect Firefox logs and post it here ? -
Code to create a folder in java
Hi friends
I want to know how to create a folder in java using files concept.
Can any one send me the code to create a folder in our system using files concept.
Thanks in advance.[http://java.sun.com/docs/books/tutorial/essential/io/file.html]
-
Hi Experts,
I need to use MySQL query in Xcelcius.
Please can you tell the steps how to get MySQL query in Xcelcius?
How to insert a mysql query during runtime?
Advance Thanks,
Regards,
BBC
Edited by: BBC Achari on Oct 3, 2011 3:26 PMHi Amit,
Here I am trying to use without Universe.
Now I am getting data from MySQL using ODBC connection and I have designed dashboard also. Here I am looking How to insert a MySQL query during runtime?
Please tell me, way to do this.
Regards,
Bala Achari
Maybe you are looking for
-
PowerPivot data model as Source on Cloud
Hi All, We have an excel workbook with a heavy powerpivot model. Can we use any Cloud services to segregate the powerpivot model and use it as a data source? We have already accessed the PowerPivot Gallery on Sharepoint(On-Premise) and Tabular Cube s
-
HT1657 Can I watch a rental movie in my iPad when in an airplane with the airplane mode on?
I rented a couple of movies hoping to watch them in the plane and all it says is it can not open when I try to watch.... Is there a way to watch rented movies in airplane mode?
-
Setting up SNP with ECC at a macro level
Hello experts What are the different scenarios that can be set up with SNP - ECC - SNP with respect to Distribution planning ? Meaning stock transfers , assuming PPDS will be active and will only be used for creating PPDS planned orders. We have 10 p
-
Issue with Date and Time Picker on Windows 8.1 and Office 2013
We are having a issue with the Developer tool in Excel called the Date and Time Picker which puts a calendar field into the spreadsheet where you can select a date from the calendar popup If we change this date field and then save and close and reope
-
The volume on my Macbook Pro is not working ?
I've checked the settings in System Preferences and it seems everything should be working with my volume. NO GO! Help please