- Previous thread: Shutting down a database that is already shut down
- Next thread: update auto-generated pk before insert
- Threads sorted by date: db-derby-user 201008
hi,
I need to determinate the value of an auto-generated PK before the
INSERT statement. I'm trying to use
this SQLs:
1) LOCK TABLE sys.
columns FOR EXCLUSIVE READ
2) SELECT referenceid,
autoincrementvalue+autoincrementinc FROM sys.syscolumns AS sc INNER
JOIN sys.systables AS st ON sc.referenceid=st.tableid WHERE
tablename='EMAIL2FOLDER' AND columnname='ID';
3) UPDATE sys.syscolumns
SET autoincrementvalue=autoincrementvalue+autoincrementinc WHERE
tableid='f91a0030-0129-e07e-88ec-0000016e72a0' AND idColumnName='ID';
4) use autoinc value, from step-4 select, in my INSERT on the
destination table
but I obtain an error due to the insufficient
permission of the connected user (derby is used in embedded mode)
for
the statement 1 and 3.
Is there any way to escale privileges or to
create a special permission user-function?
TIA
Risparmia con Tutto Incluso Light: telefono + adsl 8 mega a soli 19,95 € al mese per un anno!
SCONTO DI 120 EURO!
L’offerta è valida solo se attivi entro il 29/07/10
http://abbonati.tiscali.it/telefono-adsl/prodotti/tc/tuttoincluso-light/?WT.mc-id=01fw
I need to determinate the value of an auto-generated PK before the
INSERT statement. I'm trying to use
this SQLs:
1) LOCK TABLE sys.
columns FOR EXCLUSIVE READ
2) SELECT referenceid,
autoincrementvalue+autoincrementinc FROM sys.syscolumns AS sc INNER
JOIN sys.systables AS st ON sc.referenceid=st.tableid WHERE
tablename='EMAIL2FOLDER' AND columnname='ID';
3) UPDATE sys.syscolumns
SET autoincrementvalue=autoincrementvalue+autoincrementinc WHERE
tableid='f91a0030-0129-e07e-88ec-0000016e72a0' AND idColumnName='ID';
4) use autoinc value, from step-4 select, in my INSERT on the
destination table
but I obtain an error due to the insufficient
permission of the connected user (derby is used in embedded mode)
for
the statement 1 and 3.
Is there any way to escale privileges or to
create a special permission user-function?
TIA
Risparmia con Tutto Incluso Light: telefono + adsl 8 mega a soli 19,95 € al mese per un anno!
SCONTO DI 120 EURO!
L’offerta è valida solo se attivi entro il 29/07/10
http://abbonati.tiscali.it/telefono-adsl/prodotti/tc/tuttoincluso-light/?WT.mc-id=01fw
Related Threads
- WSDL2java CXF APIs - cxf-users
- 2010-03-11 webcam Test Day recap - fedora-389-devel
- Call for translations - postgresql-hackers
- Ruby sound library RUDL and ruby 1.9 - ruby-talk
- Vala - Vala does not register string - properties - vala-list
- gentoo-user - do we have gst-plugins-really-bad or equivalent? - gentoo-user
- android-developers - How access restricted contacts in third party app - android-developers
- ORDER_LIST_DESC_EXTRACT - UDF required or can be done in nested FOREACH? - hadoop-pig-user
Related Lists
- activemq-users
- ant-ivy-user
- ant-user
- axis-c-user
- axis-java-user
- buildr-users
- camel-users
- cayenne-user
- click-user
- cocoon-users
- commons-user
- continuum-users
- cxf-users
- db-derby-user
- directory-users
- felix-users
- geronimo-user
- hadoop-chukwa-user
- hadoop-common-user
- hadoop-general
- hadoop-hbase-user
- hadoop-hive-user
- hadoop-mapreduce-user
- hadoop-pig-user
- hadoop-zookeeper-user
- harmony-dev
- hc-httpclient-users
- httpd-users
- ibatis-user-java
- incubator-general
- jackrabbit-users
- jakarta-jmeter-user
- james-server-user
- logging-log4j-user
- lucene-general
- lucene-java-user
- lucene-lucene-net-user
- lucene-mahout-user
- lucene-nutch-user
- lucene-solr-user
- lucene-tika-user
- maven-users
- mina-ftpserver-users
- mina-users
- myfaces-users
- ode-user
- ofbiz-user
- openejb-users
- openjpa-users
- pdfbox-users
- perl-modperl
- pivot-user
- poi-user
- portals-jetspeed-user
- qpid-users
- servicemix-users
- sling-users
- spamassassin-users
- struts-user
- subversion-users
- synapse-user
- tapestry-users
- tomcat-users
- tuscany-user
- wicket-users
- xerces-c-users
- xmlgraphics-fop-users