Insert a new record in the middle of a tabular form
Hi,
I have a tabular form.
Pressing "Add Row" button opens a new, empty row at the bottom of the page or - if I use pagination - jumps to the page with the last record and creates a new record there.
Is it possible to open a new line in the middle of the page ?
I mean: if I have 25 records, I am on the first page (records 1-10) and the cursor is in a field of the second record and I press the "Add Row" button there should be a new, empty second line with old second record in the third line,... the old ninth record now in line 10 and disappeared record ten ?
Any idea ?
Thanks,
Heinz
Heinz,
You may investigate logic using UNIONs and a manual tabular form.
Something like:
--get all records above new row
select apex_item... column1
,apex_item... column2
from yourtable
where <logic to limit rows above new record>
union
--get the new row
select apex_item... column1
,apex_item... column2
from dual
where :REQUEST = 'ADDROW'
union
--get every row not in the top query
select apex_item... column1
,apex_item... column2
from yourtable
where <logic to pull all records not pulled above new record>
For this to work you'll need to add your own "Add Row" button and associate it with a branch. Notice the select between the two unions in the above query is a select against dual. This will be your new record when pressing your "Add Row" button (:REQUEST = 'ADDROW').
The following how-to link is a reference for some of the logic you'll need when creating a manual tabular form.
http://www.oracle.com/technology/products/database/application_express/howtos/tabular_form.html#MANUAL
Good Luck,
Todd
Similar Messages
-
How to insert a new row in the middle of an set of rows
Hi
How to insert a new row in the middle of an set of rows ? and How to Reset the line id after the new row added ?
Regards,
Sudhir B.Hai,
just try this,
Instead of using omatrix.Addrow(1,-1) use like
omatrix.AddRow( RowCount , Position)
RowCount
The number of rows to add (default is 1)
Position
The position of the new rows (0-based; default is -1, meaning append row to the end)
After adding rows in matrix For, sno.
for i=1 to omatrix.visualrowcount
otext=omatrix.getcellspecific("columnid",i) '--where columnid is the unique id of the sno column
otext.value=i
next i
Hope this helps you.
Thanks & Regards,
Parvatha Solai.N -
Insert a new record in the database table in between the records.
i va a database table which ve 100 records. but i want to insert my new record as 50th record. how i want to proceed?
thanks ,
velu.V,
This is an odd request. Why?
Ignoring that, you can ATTEMPT to insert into the 50th position IF:
1) The DB table has just had the primary key index re-built/re-shuffled to GUARANTEE that it IS in primary key order
2) And the primary key of the new record is built so that it follows the 49th record
Regardless, once this table has activity against it, its sort order can/will get out of promary key order (with adds/changes/deletes).
But when you select data from it, you can use ORDER BY or an ABAP SORT to organzie the date as needed.
Again... not sure WHY you need a record in a particular physical position... who cares... it is a relational DB. -
Is it possible to split a song in 2 as a whole, and insert a new part in the middle?
Im recording a song, and just realized id like to have an 8 bar drum part in the middle of it, before it kicks in to the other part...
Is it possible to do this or do I have to cut and paste each track indivually? There are 27 so it would be pretty time consuming this way.
Thanks in advance.Sfreeze wrote:
do I have to cut and paste each track indivually?
no, split works across any number of tracks:
http://www.bulletsandbones.com/GB/GBFAQ.html#split
(Let the page FULLY load. The link to your answer is at the top of your screen) -
How to add a new row at the top of manual tabular form
I have a manual tablular form. I'm trying to add a row at the top of the form, instead of new row of being displayed at the bottom. any ideas are appreciated.
thanks,
SuryaThis will depend on two things:
1. sorting of the columns - needs to be a some kind of a descending sorting on a hidden column, enabled within the Report Attributes and not in the SQL Query
2. Report Attributes => Layout and Pagination => Sort Nulls First
You will need to play with those settings a bit. One thing to consider is that you should sort your report on a hidden column and you shuldn't enable the sorting on visible columns, because it will mess up your row positioning.
See this example:
http://apex.oracle.com/pls/otn/f?p=31517:215
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
------------------------------------------------------------------- -
Using combination of insert into and select to create a new record in the table
Hello:
I'm trying to write a stored procedure that receives a record locator parameter
and then uses this parameter to locate the record and then copy this record
into the table with a few columns changed.
I'll use a sample to clarify my question a bit further
-- Create New Amendment
function create_amendment(p_mipr_number in mipr.mipr_number%TYPE, p_new_amendment_number in mipr.amendment_number%TYPE)
return integer is
new_mipr_id integer;
begin
THIS is causing me grief See comments after this block of code
insert into mipr
(select mipr_id from mipr where mipr_number=p_mipr_number),
(select fsc from mipr where mipr_number=p_mipr_number),
45,
(select price from mipr where mipr_number=p_mipr_number),
practical,
(select part_number from mipr where mipr_number=p_mipr_number);
THe above will work if I say the following
insert into mipr
(select * from mipr where mipr_number=p_mipr_number);
BUt, Of course this isn't what I want to do... I want to duplicate a record and change about 3 or 4 fields .
How do I use a combination of more than one select and hard coded values to insert a new record into the table.
/** Ignore below this is fine... I just put a snippet of a function in here ** The above insert statement is what I need help with
select (mipr_id) into new_mipr_id from mipr where mipr_number=p_mipr_number + amendment_number=(select max(amendment_number) + 1);
return new_mipr_id;
end;
THANK YOU IN ADVANCE!
KTfunction create_amendment(p_mipr_number in mipr.mipr_number%TYPE)
return integer is
new_mipr_id integer;
tmp_number number;
tmp_mipr_id integer;
begin
tmp_number :=(select max(amendment_number) from mipr where mipr_number=p_mipr_number);
Question:
tmp_number :=1; works..
tmp_number doesn't work with the select statement?
Obviously I'm a novice! I can't find anything in my book regarding tmp variables... What should I look under is tmp_number a
variable or what? In my Oracle book, variable means something different.
Thanks!
KT
I have the following code in my stored procedure:
Good luck,
Eric Kamradt -
How to insert a new record to table with foreign key
I have 3 tables like this :
CREATE TABLE PERSON (
PK INTEGER NOT NULL,
NAME VARCHAR(10),
SSNUM INTEGER,
MGR INTEGER);
ALTER TABLE PERSON ADD CONSTRAINT PK_PERSON PRIMARY KEY (PK);
ALTER TABLE PERSON ADD CONSTRAINT FK_PERSON FOREIGN KEY (MGR) REFERENCES
PERSON (PK);
/* Tables
CREATE TABLE PROJECT (
PK INTEGER NOT NULL,
CODE_NAME INTEGER);
ALTER TABLE PROJECT ADD CONSTRAINT PK_PROJECT PRIMARY KEY (PK);
/* Tables
CREATE TABLE XREF (
PERSON INTEGER NOT NULL,
PROJECT INTEGER NOT NULL);
ALTER TABLE XREF ADD CONSTRAINT PK_XREF PRIMARY KEY (PERSON, PROJECT);
ALTER TABLE XREF ADD CONSTRAINT FK_XREF1 FOREIGN KEY (PERSON) REFERENCES
PERSON (PK);
ALTER TABLE XREF ADD CONSTRAINT FK_XREF2 FOREIGN KEY (PROJECT) REFERENCES
PROJECT (PK);
I do like the way of "ReverseTutoral" and the file .jdo here :
<?xml version="1.0" encoding="UTF-8"?>
<jdo>
<package name="reversetutorial">
<class name="Person" objectid-class="PersonId">
<extension vendor-name="kodo" key="class-column" value="none"/>
<extension vendor-name="kodo" key="lock-column" value="none"/>
<extension vendor-name="kodo" key="table" value="PERSON"/>
<field name="name">
<extension vendor-name="kodo" key="data-column"
value="NAME"/>
</field>
<field name="person">
<extension vendor-name="kodo" key="pk-data-column"
value="MGR"/>
</field>
<field name="persons">
<collection element-type="Person"/>
<extension vendor-name="kodo" key="inverse"
value="person"/>
<extension vendor-name="kodo" key="inverse-owner"
value="person"/>
</field>
<field name="pk" primary-key="true">
<extension vendor-name="kodo" key="data-column"
value="PK"/>
</field>
<field name="ssnum">
<extension vendor-name="kodo" key="data-column"
value="SSNUM"/>
</field>
<field name="xrefs">
<collection element-type="Xref"/>
<extension vendor-name="kodo" key="inverse"
value="person"/>
<extension vendor-name="kodo" key="inverse-owner"
value="person"/>
</field>
</class>
<class name="Project" objectid-class="ProjectId">
<extension vendor-name="kodo" key="class-column" value="none"/>
<extension vendor-name="kodo" key="lock-column" value="none"/>
<extension vendor-name="kodo" key="table" value="PROJECT"/>
<field name="codeName">
<extension vendor-name="kodo" key="data-column"
value="CODE_NAME"/>
</field>
<field name="pk" primary-key="true">
<extension vendor-name="kodo" key="data-column"
value="PK"/>
</field>
<field name="xrefs">
<collection element-type="Xref"/>
<extension vendor-name="kodo" key="inverse"
value="project"/>
<extension vendor-name="kodo" key="inverse-owner"
value="project"/>
</field>
</class>
<class name="Xref" objectid-class="XrefId">
<extension vendor-name="kodo" key="class-column" value="none"/>
<extension vendor-name="kodo" key="lock-column" value="none"/>
<extension vendor-name="kodo" key="table" value="XREF"/>
<field name="person">
<extension vendor-name="kodo" key="pk-data-column"
value="PERSON"/>
</field>
<field name="person2" primary-key="true">
<extension vendor-name="kodo" key="data-column"
value="PERSON"/>
</field>
<field name="project">
<extension vendor-name="kodo" key="pk-data-column"
value="PROJECT"/>
</field>
<field name="project2" primary-key="true">
<extension vendor-name="kodo" key="data-column"
value="PROJECT"/>
</field>
</class>
</package>
</jdo>
Data of those tables are :
PERSON :
| PK | NAME | SSNUM | MGR |
| 1 | ABC | 1 | 1 |
| 2 | DEF | 5 | 1 |
PROJECT
| PK | CODE_NAME |
| 1 | 12 |
| 2 | 13 |
And now I want to add a new record into table XREF : insert into XREF
values (1,1);
public void createData() {
Xref xref = new Xref();
Person person = new Person(1);
Project project = new Project(1);
xref.setPerson(person);
xref.setProject(project);
person.getXrefs().add(xref);
person.getXrefs().add(xref);
pm.currentTransaction().begin();
pm.makePersistent(xref);
pm.currentTransaction().commit();
I don't know why Kodo automatically insert new record to table PERSON ->
confilct Primary Key. The errors are :
0 [main] INFO kodo.Runtime - Starting Kodo JDO version 2.4.1
(kodojdo-2.4.1-20030126-1556) with capabilities: [Enterprise Edition
Features, Standard Edition Features, Lite Edition Features, Evaluation
License, Query Extensions, Datacache Plug-in, Statement Batching, Global
Transactions, Developer Tools, Custom Database Dictionaries, Enterprise
Databases, Custom ClassMappings, Custom ResultObjectProviders]
41 [main] WARN kodo.Runtime - WARNING: Kodo JDO Evaluation expires in 29
days. Please contact [email protected] for information on extending
your evaluation period or purchasing a license.
1627 [main] INFO kodo.MetaData -
com.solarmetric.kodo.meta.JDOMetaDataParser@e28b9: parsing source:
file:/D:/AN/Test/classes/reversetutorial/reversetutorial.jdo
3092 [main] INFO jdbc.JDBC - [ C:23387093; T:19356985; D:10268916 ] open:
jdbc:firebirdsql:localhost/3050:D:/An/test/temp.gdb (sysdba)
3325 [main] INFO jdbc.JDBC - [ C:23387093; T:19356985; D:10268916 ]
close:
com.solarmetric.datasource.PoolConnection@164dbd5[[requests=0;size=0;max=70;hits=0;created=0;redundant=0;overflow=0;new=0;leaked=0;unavailable=0]]
3335 [main] INFO jdbc.JDBC - [ C:23387093; T:19356985; D:10268916 ] close
connection
3648 [main] INFO jdbc.JDBC - Using dictionary class
"com.solarmetric.kodo.impl.jdbc.schema.dict.InterbaseDictionary" to
connect to "Firebird" (version "__WI-V6.2.972 Firebird 1.0.3)WI-V6.2.972
Firebird 1.0.3/tcp (annm)/P10") with JDBC driver "firebirdsql jca/jdbc
resource adapter" (version "0.1")
4032 [main] INFO jdbc.JDBC - [ C:25657668; T:19356985; D:10268916 ] open:
jdbc:firebirdsql:localhost/3050:D:/An/test/temp.gdb (sysdba)
4143 [main] INFO jdbc.SQL - [ C:25657668; T:19356985; D:10268916 ]
preparing statement <3098834>: INSERT INTO XREF(PERSON, PROJECT) VALUES
4224 [main] INFO jdbc.SQL - [ C:25657668; T:19356985; D:10268916 ]
executing statement <3098834>: [reused=1;params={(int)1,(int)1}]
4244 [main] INFO jdbc.SQL - [ C:25657668; T:19356985; D:10268916 ]
preparing statement <9090824>: INSERT INTO PERSON(MGR, NAME, PK, SSNUM)
VALUES (?, ?, ?, ?)
4315 [main] INFO jdbc.SQL - [ C:25657668; T:19356985; D:10268916 ]
executing statement <9090824>: [reused=1;params={null,null,(int)1,(int)0}]
4598 [main] WARN jdbc.JDBC - java.sql.SQLWarning: java.sql.SQLWarning:
resultSetType or resultSetConcurrency changed
4598 [main] WARN jdbc.JDBC - java.sql.SQLWarning: java.sql.SQLWarning:
resultSetType or resultSetConcurrency changed
4598 [main] INFO jdbc.JDBC - [ C:25657668; T:19356985; D:10268916 ] begin
rollback
4608 [main] INFO jdbc.JDBC - [ C:25657668; T:19356985; D:10268916 ] end
rollback 10ms
4628 [main] INFO jdbc.JDBC - [ C:25657668; T:19356985; D:10268916 ]
close:
com.solarmetric.datasource.PoolConnection@1878144[[requests=2;size=2;max=70;hits=0;created=2;redundant=0;overflow=0;new=2;leaked=0;unavailable=0]]
4628 [main] INFO jdbc.JDBC - [ C:25657668; T:19356985; D:10268916 ] close
connection
javax.jdo.JDOFatalDataStoreException:
com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
[SQL=INSERT INTO PERSON(MGR, NAME, PK, SSNUM) VALUES (null, null, 1, 0)]
[PRE=INSERT INTO PERSON(MGR, NAME, PK, SSNUM) VALUES (?, ?, ?, ?)]
GDS Exception. violation of PRIMARY or UNIQUE KEY constraint "PK_PERSON"
on table "PERSON" [code=335544665;state=null]
NestedThrowables:
com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
[SQL=INSERT INTO PERSON(MGR, NAME, PK, SSNUM) VALUES (null, null, 1, 0)]
[PRE=INSERT INTO PERSON(MGR, NAME, PK, SSNUM) VALUES (?, ?, ?, ?)]
GDS Exception. violation of PRIMARY or UNIQUE KEY constraint "PK_PERSON"
on table "PERSON"
at
com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions.throwFatal(SQLExceptions.java:17)
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManager.java:416)
at
com.solarmetric.kodo.runtime.PersistenceManagerImpl.flush(PersistenceManagerImpl.java:575)
at
com.solarmetric.kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:438)
at reversetutorial.Finder.createData(Finder.java:74)
at reversetutorial.Finder.main(Finder.java:141)
NestedThrowablesStackTrace:
org.firebirdsql.jdbc.FBSQLException: GDS Exception. violation of PRIMARY
or UNIQUE KEY constraint "PK_PERSON" on table "PERSON"
at
org.firebirdsql.jdbc.FBPreparedStatement.internalExecute(FBPreparedStatement.java:425)
at
org.firebirdsql.jdbc.FBPreparedStatement.executeUpdate(FBPreparedStatement.java:136)
at
com.solarmetric.datasource.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:111)
at
com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedStatementNonBatch(SQLExecutionManagerImpl.java:542)
at
com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedStatement(SQLExecutionManagerImpl.java:511
at
com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeInternal(SQLExecutionManagerImpl.java:405)
at
com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.flush(SQLExecutionManagerImpl.java:272
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManager.java:411)
at
com.solarmetric.kodo.runtime.PersistenceManagerImpl.flush(PersistenceManagerImpl.java:575)
at
com.solarmetric.kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:438)
at reversetutorial.Finder.createData(Finder.java:74)
at reversetutorial.Finder.main(Finder.java:141)
at org.firebirdsql.gds.GDSException: violation of PRIMARY or UNIQUE KEY
constraint "PK_PERSON" on table "PERSON
at org.firebirdsql.jgds.GDS_Impl.readStatusVector(GDS_Impl.java:1683)
at org.firebirdsql.jgds.GDS_Impl.receiveResponse(GDS_Impl.java:1636)
at org.firebirdsql.jgds.GDS_Impl.isc_dsql_execute2(GDS_Impl.java:865)
at
org.firebirdsql.jca.FBManagedConnection.executeStatement(FBManagedConnection.java:782)
at
org.firebirdsql.jdbc.FBConnection.executeStatement(FBConnection.java:1072)
at
org.firebirdsql.jdbc.FBPreparedStatement.internalExecute(FBPreparedStatement.java:420)
at
org.firebirdsql.jdbc.FBPreparedStatement.executeUpdate(FBPreparedStatement.java:136)
at
com.solarmetric.datasource.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:111)
at
com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedStatementNonBatch(SQLExecutionManagerImpl.java:542)
at
com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedStatement(SQLExecutionManagerImpl.java:511)
at
com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeInternal(SQLExecutionManagerImpl.java:405)
at
com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.flush(SQLExecutionManagerImpl.java:272)
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManager.java:411)
at
com.solarmetric.kodo.runtime.PersistenceManagerImpl.flush(PersistenceManagerImpl.java:575)
at
com.solarmetric.kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:438)
at reversetutorial.Finder.createData(Finder.java:74)
at reversetutorial.Finder.main(Finder.java:141)
Exception in thread "main"First off, use the '-primaryKeyOnJoin true' flag when running the reverse
mapping tool so that you can get rid of that useless Xref class and have
a direct relation between Person and Project. See the documentation on
reverse mapping tool options here:
http://www.solarmetric.com/Software/Documentation/latest/docs/ref_guide_pc_reverse.html
But your real problem is that you are creating new objects, assigning
primary key values, and expecting them to represent existing objects.
That's not the way JDO works. If you want to set relations to existing
objects in JDO, you use the PM to look up those objects. If you try to
create new objects, JDO will assume you want to insert new records into
the DB, and you'll get PK conflicts like you see here.
There are several good books out on JDO; if you're just starting out with
it, they might save you a lot of time and help you master JDO quickly. -
To add new record into the table Data Service client
When I am trying to add new record into the table Employeedetails using Data Service client it is giving a sql exception: "java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__EmployeeDetails__6383C8BA'. Cannot insert duplicate key in object 'EmployeeDetails'. Severity 14, State 1, Procedure 'PC-P41403 null', Line 1."
Code:
DataService ds=DataServiceFactory.newDataService(getInitialContext(),"EmplDetApp","ld:EmplDetAppDataServices/EmployeeDetails");
EmployeeDetailsDocument edoc=EmployeeDetailsDocument.Factory.newInstance();
edoc.addNewEmployeeDetails();
//here I set the primary key value empid
edet.setEmpid("1212");
edet.setEmpname("manu");
ds.submit(edoc);
Error
EmpName 5 java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__EmployeeDetails__6383C8BA'. Cannot insert duplicate key in object 'EmployeeDetails'. Severity 14, State 1, Procedure 'PC-P41403 null', Line 1
com.bea.ld.dsmediator.DataServiceException: java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__EmployeeDetails__6383C8BA'. Cannot insert duplicate key in object 'EmployeeDetails'. Severity 14, State 1, Procedure 'PC-P41403 null', Line 1
at com.bea.ld.dsmediator.update.JDBCAdaptor.save(JDBCAdaptor.java:247)
at com.bea.ld.dsmediator.update.DataServiceMediator.submit(DataServiceMediator.java:528)
at com.bea.ld.dsmediator.update.DataServiceMediator.submit(DataServiceMediator.java:245)
at com.bea.ld.ServerBean.submit(ServerBean.java:529)
at com.bea.ld.Server_ydm4ie_EOImpl.submit(Server_ydm4ie_EOImpl.java:910)
at com.bea.ld.Server_ydm4ie_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:492)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:435)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:430)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:35)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
at java.lang.Thread.startThreadFromVM(Unknown Source)
Caused by: java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__EmployeeDetails__6383C8BA'. Cannot insert duplicate key in object 'EmployeeDetails'. Severity 14, State 1, Procedure 'PC-P41403 null', Line 1
at weblogic.jdbc.mssqlserver4.TdsStatement.processWarning(TdsStatement.java:1178)
at weblogic.jdbc.mssqlserver4.TdsStatement.parseMsWarning(TdsStatement.java:1089)
at weblogic.jdbc.mssqlserver4.TdsStatement.getMoreResults(TdsStatement.java:756)
at weblogic.jdbc.mssqlserver4.TdsStatement.execute(TdsStatement.java:210)
at weblogic.jdbc.mssqlserver4.TdsStatement.executeUpdate(TdsStatement.java:97)
at weblogic.jdbc.mssqlserver4.TdsStatement.executeUpdate(TdsStatement.java:1455)
at weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStatement.java:147)
at com.bea.ld.dsmediator.update.JDBCAdaptor.save(JDBCAdaptor.java:151)
... 15 more
But I am not sure why it is giving an exception as Violation of PRIMARY KEY.
The update method works fine for the same client.
The exception only happens when I am trying to insert a new record.
Please help me to figure out this problem.If you are absolutely sure that you do not have such a row already in your table, open a case with customer support and reference CR321312. I believe the work-around is to put ld-server-core.jar in your client classpath.
Correction: put ld-server-app.jar in the client classpath
Edited by mreiche at 09/17/2007 3:28 PM -
Best way to add a new section in the middle of a tune?
hi,
what's best way to add a new section in the middle of a tune? I think I came up with an interesting transition to a tune... what's the best way to try it out?
please be specific. if it's just select all and cut and move - I already know that one. somehow, I bet there's a better way.
thanks in advance...You should be able to enter the "in" and out" points in the transport bar. And then under the Region menu, choose "Cut/Insert time."
So if, for instance, you go up to bar 32, and want to add 8 bars, enter 32 1 1 1 in the top transport place, and 40 1 1 1 in the second. Then select "Cut/Insert Time", and an 8 bar whole will be added to your song.
Be aware that if there are overlapping MIDI notes found at that cut point, Logic will warn you about it, and give you some options. In this case, I think "Keep" would be what you'd want, but every situation is different...
Hope that helps.... -
Record into the middle of an existing file without deleting
Is it possible to record into the middle of a .wav (or any format) file without audition recording right over the existing file? Is there an equivelent of using the Insert toggle in Word?
Duane_Whitcomb wrote:
Is it possible to record into the middle of a .wav (or any format) file without audition recording right over the existing file? Is there an equivelent of using the Insert toggle in Word?
Okay, well let's try answering the question you actually asked...
The answer is yes - although there's a constraint (as you've discovered...). If you pick a section in the middle of a file, and insert silence into it, you have an extra chunk of file, the length of which you can determine when you create it. Now, if you leave this section highlighted, and hit 'record' then you will be able to record only over the highlighted section.
So the constraint is that you have to define the time you want in advance. Usually that's not a problem - just pick a bit more than you'll need and trim out what you don't use afterwards. -
Can't add new page in the middle of document
I am creating a manual and inserted page breaks at the end of each page as I created the document. Now I am trying to add a new page to the middle by inserting page breaks and even section breaks, but every time I try to add it in, it just goes to the bottom of the document and I am unable to move anything into the original 50 pages. Any tips here?
When I look at the thumbnail view of the document it has all 50 pages in one yellow box instead of one page individually. A bit odd.The thumbnail browser shows one small page thumbnail for each page of your document. Each yellow bounding box indicates a section. So the thumbnail browser indicates your document has a single section with 50 pages in it.
As you've typed your document it has naturally flowed from one page to the next. If you place a page break at the end of the page you are simply mandating what Pages has already voluntarily done. But if you insert a second page break you should get a new blank page. In other words, if you put your cursor at the bottom of page 6 and insert a page break you will move to the top of page 7 which has text because it is still page 7. Insert another page break and page 7 becomes page 8 and you'll have a blank page 7.
Note: if you move your cursor into the middle of the document and insert a section break you'll see that the thumbnail browser shows two sections; one ending on the page above your cursor and one starting on the page your cursor is in. This is useful to understand.
Second Note: if you use the Insert>Sections option it always inserts a new section at the bottom of the section your cursor occupies. Since your document currently has one section, that's why you wind up with the inserted page at the end of your document. -
Inserting one table records to the another table
Hi There
Though i don't close the Result set , My program throws the following Exception
java.sql.SQLException: ResultSet is ClosedBecause of this my program Inserts only one record in the another table
My code is this
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.DefaultComboBoxModel.*;
import javax.swing.table.*;
import java.sql.*;
import java.util.*;
public class SearchBook extends JDialog implements ActionListener
private JComboBox comboCategory,comboAuthor;
private JSplitPane splitpane;
private JTable table;
private JToolBar toolBar;
private JButton btnclose, btncancel;
private JPanel panel1,panel2,panel3,panel4;
private JLabel lblCategory,lblAuthor;
private Container c;
//DefaultTableModel model;
Statement st;
ResultSet rs;
Vector v = new Vector();
public SearchBook (Connection con)
// Property for JDialog
setTitle("Search Books");
setLocation(40,110);
setModal(true);
setSize(750,450);
// Creating ToolBar Button
btnclose = new JButton(new ImageIcon("Images/export.gif"));
btnclose.addActionListener(this);
// Creating Tool Bar
toolBar = new JToolBar();
toolBar.add(btnclose);
try
st=con.createStatement();
rs =st.executeQuery("SELECT BCat from Books Group By Books.BCat");
while(rs.next())
v.add(rs.getString(1));
catch(SQLException ex)
System.out.println("Error");
panel1= new JPanel();
panel1.setLayout(new GridBagLayout());
GridBagConstraints c = new GridBagConstraints();
c.fill = GridBagConstraints.HORIZONTAL;
lblCategory = new JLabel("Category:");
lblCategory.setHorizontalAlignment (JTextField.CENTER);
c.gridx=2;
c.gridy=2;
panel1.add(lblCategory,c);
comboCategory = new JComboBox(v);
comboCategory.addActionListener(this);
c.ipadx=20;
c.gridx=3;
c.gridwidth=1;
c.gridy=2;
panel1.add(comboCategory,c);
lblAuthor = new JLabel("Author/Publisher:");
c.gridwidth=2;
c.gridx=1;
c.gridy=4;
panel1.add(lblAuthor,c);
lblAuthor.setHorizontalAlignment (JTextField.LEFT);
comboAuthor = new JComboBox();
comboAuthor.addActionListener(this);
c.insets= new Insets(20,0,0,0);
c.ipadx=20;
c.gridx=3;
c.gridy=4;
panel1.add(comboAuthor,c);
comboAuthor.setBounds (125, 165, 175, 25);
table = new JTable();
JScrollPane scrollpane = new JScrollPane(table);
//panel2 = new JPanel();
//panel2.add(scrollpane);
splitpane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,panel1,scrollpane);
splitpane.setDividerSize(15);
splitpane.setDividerLocation(190);
getContentPane().add(toolBar,BorderLayout.NORTH);
getContentPane().add(splitpane);
public void actionPerformed(ActionEvent ae)
Object obj= ae.getSource();
if(obj==comboCategory)
String selecteditem = (String)comboCategory.getSelectedItem();
displayAuthor(selecteditem);
System.out.println("Selected Item"+selecteditem);
else if(obj==btnclose)
dispose();
else if(obj==comboAuthor)
String selecteditem1 = (String)comboAuthor.getSelectedItem();
displayavailablity(selecteditem1);
//System.out.println("Selected Item"+selecteditem1);
System.out.println("Selected Author"+selecteditem1);
private void displayAuthor(String selecteditem)
try
{ Vector data = new Vector();
rs= st.executeQuery("SELECT BAuthorandPublisher FROM Books where BCat='" + selecteditem + "' Group By Books.BAuthorandPublisher");
System.out.println("Executing");
while(rs.next())
data.add(rs.getString(1));
//((DefaultComboBoxModel)comboAuthor.getModel()).setVectorData(data);
comboAuthor.setModel(new DefaultComboBoxModel(data));
//rs.close();
catch(SQLException ex)
System.out.println("ERROR");
private void displayavailablity(String selecteditem1)
try
Vector columnNames = new Vector();
Vector data1 = new Vector();
String bname,bauthor,bcategory,bref1,bavail,bid;
int bref,mid,num;
rs = st.executeQuery("SELECT * FROM Books where BAuthorandPublisher='" + selecteditem1 +"'");
while(rs.next())
bname = rs.getString("BName");
bauthor = rs.getString("BAuthorandPublisher");
bcategory = rs.getString("BCat");
bref = rs.getInt("BRef");
if(bref==1)bref1="Yes";
else bref1 = "No";
mid = rs.getInt("Mid");
if(mid==0)bavail="Available";
else bavail="Issued To:"+mid;
bid = rs.getString("BId");
System.out.println("Book Name is::"+bname);
System.out.println("Book Availabilty::"+bavail);
num = st.executeUpdate("insert into BSearch Values('"+bid+"','"+bname+"','"+bcategory+"','"+bauthor+"','"+bavail+"','"+bref1+",')");
System.out.println("Inseted in the table");
/**ResultSetMetaData md= rs.getMetaData();
int columns =md.getColumnCount();
String booktblheading[]={"Book ID","Book NAME","BOOK AUTHOR/PUBLISHER","REFRENCE","CATEGORY"};
for(int i=1; i<= booktblheading.length;i++)
columnNames.addElement(booktblheading[i-1]);
while(rs.next())
Vector row = new Vector(columns);
for(int i=1;i<=columns;i++)
row.addElement(rs.getObject(i));
data1.addElement(row);
//System.out.println("data is:"+data);
((DefaultTableModel)table.getModel()).setDataVector(data1,columnNames);
//DefaultTableModel model = new DefaultTableModel(data1,columnNames);
//table.setModel(model);
//rs.close();
//st.close(); */
catch(SQLException ex)
ex.printStackTrace();
}Please help me Friends. I am very new to java. otherwise give me some suggestion to implement this idea in effective manner.
Thank you for your service
CheersHi
Here i am Posting My programs code
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.DefaultComboBoxModel.*;
import javax.swing.table.*;
import java.sql.*;
import java.util.*;
public class SearchBook extends JDialog implements ActionListener
private JComboBox comboCategory,comboAuthor;
private JSplitPane splitpane;
private JTable table;
private JToolBar toolBar;
private JButton btnclose, btncancel;
private JPanel panel1,panel2,panel3,panel4;
private JLabel lblCategory,lblAuthor;
private Container c;
//DefaultTableModel model;
Statement st,st1;
ResultSet rs,rs1,rs2;
Vector v = new Vector();
public SearchBook (Connection con)
// Property for JDialog
setTitle("Search Books");
setLocation(40,110);
setModal(true);
setSize(750,450);
// Creating ToolBar Button
btnclose = new JButton(new ImageIcon("Images/export.gif"));
btnclose.addActionListener(this);
// Creating Tool Bar
toolBar = new JToolBar();
toolBar.add(btnclose);
try
st=con.createStatement();
rs =st.executeQuery("SELECT BCat from Books Group By Books.BCat");
while(rs.next())
v.add(rs.getString(1));
catch(SQLException ex)
System.out.println("Error");
panel1= new JPanel();
panel1.setLayout(new GridBagLayout());
GridBagConstraints c = new GridBagConstraints();
c.fill = GridBagConstraints.HORIZONTAL;
lblCategory = new JLabel("Category:");
lblCategory.setHorizontalAlignment (JTextField.CENTER);
c.gridx=2;
c.gridy=2;
panel1.add(lblCategory,c);
comboCategory = new JComboBox(v);
comboCategory.addActionListener(this);
c.ipadx=20;
c.gridx=3;
c.gridwidth=1;
c.gridy=2;
panel1.add(comboCategory,c);
lblAuthor = new JLabel("Author/Publisher:");
c.gridwidth=2;
c.gridx=1;
c.gridy=4;
panel1.add(lblAuthor,c);
lblAuthor.setHorizontalAlignment (JTextField.LEFT);
comboAuthor = new JComboBox();
comboAuthor.addActionListener(this);
c.insets= new Insets(20,0,0,0);
c.ipadx=20;
c.gridx=3;
c.gridy=4;
panel1.add(comboAuthor,c);
comboAuthor.setBounds (125, 165, 175, 25);
table = new JTable();
JScrollPane scrollpane = new JScrollPane(table);
//panel2 = new JPanel();
//panel2.add(scrollpane);
splitpane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,panel1,scrollpane);
splitpane.setDividerSize(15);
splitpane.setDividerLocation(190);
getContentPane().add(toolBar,BorderLayout.NORTH);
getContentPane().add(splitpane);
public void actionPerformed(ActionEvent ae)
Object obj= ae.getSource();
if(obj==comboCategory)
String selecteditem = (String)comboCategory.getSelectedItem();
displayAuthor(selecteditem);
System.out.println("Selected Item"+selecteditem);
else if(obj==btnclose)
dispose();
else if(obj==comboAuthor)
String selecteditem1 = (String)comboAuthor.getSelectedItem();
displayavailablity(selecteditem1);
//System.out.println("Selected Item"+selecteditem1);
System.out.println("Selected Author"+selecteditem1);
private void displayAuthor(String selecteditem)
try
{ Vector data = new Vector();
rs1= st.executeQuery("SELECT BAuthorandPublisher FROM Books where BCat='" + selecteditem + "' Group By Books.BAuthorandPublisher");
System.out.println("Executing");
while(rs1.next())
data.add(rs1.getString(1));
//((DefaultComboBoxModel)comboAuthor.getModel()).setVectorData(data);
comboAuthor.setModel(new DefaultComboBoxModel(data));
catch(SQLException ex)
System.out.println("ERROR");
private void displayavailablity(String selecteditem1)
try
Vector columnNames = new Vector();
Vector data1 = new Vector();
String bname,bauthor,bcategory,bref1,bavail,bid;
int bref,mid,num;
//rs2.Open();
rs = st.executeQuery("SELECT * FROM Books where BAuthorandPublisher='" + selecteditem1 +"'");
boolean tr=true;
while(rs.next())
if(true)
bname = rs.getString("BName");
bauthor = rs.getString("BAuthorandPublisher");
bcategory = rs.getString("BCat");
bref = rs.getInt("BRef");
if(bref==1)bref1="Yes";
else bref1 = "No";
mid = rs.getInt("Mid");
if(mid==0)bavail="Available";
else bavail="Issued To:"+mid;
bid = rs.getString("BId");
System.out.println("Book Name is::"+bname);
System.out.println("Book Availabilty::"+bavail);
num = st1.executeUpdate("insert into BSearch Values('"+bid+"','"+bname+"','"+bcategory+"','"+bauthor+"','"+bavail+"','"+bref1+",')");
System.out.println("Inseted in the table");
catch(SQLException ex)
ex.printStackTrace();
}Thank you for your service -
ADF: any good examples on inserting a new record
Hi, I'm currently developing a
web based application (using jsp + struts on top of ADF)
and I've seen many many demos and viewlets on
how to create a page that reads a list of employees
or master-detail relationship of records.
However, when I try to make a page which can insert
a new record (ex. new employee, new department, etc),
I am baffled, because I couldn't find a good example
that showed me how to do it.
Has anyone have a good example?
thank you.Did you check the tutorials page?
For example:
http://otn.oracle.com/products/jdev/collateral/tutorials/9050/bizcomp_jsp_tut.html -
I can do this in Word, but not Pages. I'm using Pages '09 Version 4.1. Any help would be appreciated.
Thank-you!You can also click at the end of a section and insert a new section from the Sections link on the toolbar.
Basic rule is if you are clicked in the text, then the new section will go after the current section.
If you are not clicked in the text then the new section will be at the end of the document.
A section obviously does not fit inside an existing section.
Peter -
BAPI to insert a new row in the MCHA table
Hi all,
I am in search of a BAPI to insert a new row in the MCHA table... with the fields of the materail, plant and batch values.
Any inputs on this..is highly appreciable...
thanks in advance...
regards..
prathima.explore BAPI_BATCH_CREATE
Maybe you are looking for
-
I have bought an album off itunes and having trouble syncing to my iphone 3gs. First of all, all songs from the album were synced twice and would some would not play. I finally managed to remove the duplicates and now most of the songs on the album
-
How can i access my icloud online?
I want to see if my pictures got backed up, if anyone is help let me know.
-
PDF preview using SSFCOMP_PDF_PREVIEW in full screen
Dear Friends, I am using SSFCOMP_PDF_PREVIEW Function Module to display a PDF preview. For this i have designed a Smartform and capturing the JOB_OUTPUT_INFO from FM that i get dynamically and using that as export parameter for SSFCOMP_PDF_PREVIEW. I
-
Regarding assigning gateway for owsm
hi friendz i have to assign a gateway to my webservice using webservice manager but the problem is its asking the component url. which url i have to specify for this.
-
Turn off reminders for an account but not calendar events
I sync my work calendar and email on my personal Mac, but I do not want to see my long list of tasks and reminders. I can't discover how to achieve that. When I go into the "Mail, Contacts & Calendars" setting panel, the two are lumped as "Calendars