Reading BFile datatype value to insert corresponding value into blob
Hi,
I have oracle 10.2.0 database.
I have this table with 3 columns of datatypes
TableA(id, Blob, BFile)
now i have pdf files stored in a directory for every id which ranges from 1 till 100.
for example for id=10, the pdf file name is cr10.pdf
except that for some id there is no correpsonding pdf's.
and i have a written a query where for a particular id, i link the corresponding pdf into the BFile. now is there a way where i can view the value of the bfile locator and find whether the bfile is null or not(i mean whether there is a pdf or not existing for that particular id)
what i need to do is, based on the bfile value i will insert the pdf into the blob column.
so based on the bfile value(ie whethe rthe pdf exisit or not) i will open the pdf and read the contents into the blob column.
and somehow i have figure out that a pdf is not exisiting based on the bfile value and then insert a null into the blob column instead of getting an error by trying to read a pdf which doesn't exist.
Can someone help me, how to find out existance of a file based on bfile value and insert value into blob.
I want this is script to be automated instead of checking manually a file exists or not.
Thanks,
Philip.
Hi,
I have oracle 10.2.0 database.
I have this table with 3 columns of datatypes
TableA(id, Blob, BFile)
now i have pdf files stored in a directory for every id which ranges from 1 till 100.
for example for id=10, the pdf file name is cr10.pdf
except that for some id there is no correpsonding pdf's.
and i have a written a query where for a particular id, i link the corresponding pdf into the BFile. now is there a way where i can view the value of the bfile locator and find whether the bfile is null or not(i mean whether there is a pdf or not existing for that particular id)
what i need to do is, based on the bfile value i will insert the pdf into the blob column.
so based on the bfile value(ie whethe rthe pdf exisit or not) i will open the pdf and read the contents into the blob column.
and somehow i have figure out that a pdf is not exisiting based on the bfile value and then insert a null into the blob column instead of getting an error by trying to read a pdf which doesn't exist.
Can someone help me, how to find out existance of a file based on bfile value and insert value into blob.
I want this is script to be automated instead of checking manually a file exists or not.
Thanks,
Philip.
Similar Messages
-
Hi,
I have Performance Point Analytic Chart.
I am doing drill down the bar with one of dimension. System showing all the dimension values instead of correspond values.
Unwanted dimensions are showing like blank in the chart.
How to over come this.
Thanks & Regards
Poomani SankaranHi Poomani,
According to your description, my understanding is that you want the drill down to show only the required dimensions.
Here is an article about this issue, please check if it is useful:
http://denglishbi.wordpress.com/2012/03/28/using-perspectives-with-performancepoint-services/
In addition, as this issue is related to SSAS, I suggest you create a new thread on SQL forum, more experts will assist you with this issue.
SQL forum:
http://social.technet.microsoft.com/Forums/sqlserver/en-US/home?category=sqlserver
I hope this helps.
Thanks,
Wendy
Wendy Li
TechNet Community Support -
Acrobat form field that allows Reader user to browse and insert a picture into a predefined area
Is there a way to do insert a form field into an AcroForm that allow Reader users to browse and insert a picture into that form field?
I know that LiveCycle can do this, but I need to do this using an AcroForm. Or maybe there's a third-party plug-in that can be used in an AcroForm to do this?Jay,
The new version of Reader, which was announced today (see AcrobatUsers.com), will now allow you to use the field.buttonImportIcon method: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.737.html
For a bit more information, see: http://forums.adobe.com/thread/743823
Here's the minimum code that can be used in the Mouse Up event of a button that's configured with a layout that's something other than "Label only":
// Mouse Up script for a button
event.target.buttonImportIcon();
Since this isn't backwards compatible with Reader, you'll probably want to add additional code to test what version is being used and alert the user if it's pre-11. You should also check the return value to see if anything went wrong. The hard part is getting everyone to upgrade, but this and a number of other features should make it worth it. -
Inserting a filename into BLOB
There is a lot of talk about inserting a file into BLOB or
just the file path and storing the file locally. I've decided to
store the file on the server but what I don't know is how to
capture that path and file name so I can insert it into the MySQL
database and later retrieve it when the display page is loaded.
Also, what is the download side of this? When the page is
called is there a 'best way' to serve up the file to the user?
Any sample code for this type of thing would really help me
get past this sticking point.
Thank you in advance.
I'm using a CF8/MySQL 5.x setup. Attached is my upload
code...Bob,
Thanks for the code, but won't that actually store the
document in the database rather than just storing the file path? I
guess I was thinking it would be smarter to store the path in the
DB rather than the actual file itself. I know this is an invitation
to a heated discussion as I've found many examples of it here in
the forums...
Maybe I'm just misreading the code. And, yes, the intent is
to store PDF files for the client's app.
The intent is that when a user visits page 'x' they see a
short description of a lesson then click on a link to download the
pdf resource for that particular lesson. Maybe there is a better
way to do this, I don't know. I'm relatively new at this type of
situation.
Thank you for your quick reply! -
Inserting blank values and retrieving blank values
I really want to Insert blank values into Oracle database,and also want to retrieve blank values from table.
When I try to insert blank values ,Its inserting null values.
I don't want to insert null for blank.
Please provide me solution for this.
Thank youuser631179, logically if you have a descrition or other printable
character column where the value is blanks you do not have a value.
The data item is logically unknown or non-existent, hence NULL.
You can assign blanks (spaces) for NULL in the querying program
like SQLPlus does on display. The Pro*C and other language tools
provides null indicator bytes for this purpose.
UT1 > l
1 select fld1, fld2, rpad(nvl(fld4,' '),10,' '), length( rpad(nvl(fld4,' '),10,' '))
2* from marktest
UT1 > /
FLD1 FLD2 RPAD(NVL(F LENGTH(RPAD(NVL(FLD4,''),10,''))
one 1 10
TWO 2 USER51 10
4 USER51 10HTH -- Mark D Powell --
Message was edited by: Mark to try to keep the test from requiring scrolling
mpowel01 -
Inserting String data to BLOB column
Hi All
I want to insert String data into BLOB column using DBAdapter - through database procedure.
anybody can help?
Regards
Albin IssacI have used utl_raw.cast_to_raw('this is only a test')).But for bigger string I get the error as "string literal too long" do we have any similar function for longer string.
Thanks,
-R -
NULL values are inserted into interface table for read only columns
Hi, I developed a custom Integrator where some of the columns has to be displayed as read only in the layout. I am using SQL content to populate the data. When I upload the data NULL values are inserted into table interface? Is there any work around for this?
Thanks
Edited by: user593879 on Jan 12, 2010 7:21 PMDoesn't WebADI drive you insane at times?
I must say, when it's all working it looks great and it is very user friendly (end-user that is, NOT for developers!) but before you get to that stage… please please Oracle invest some time making Web ADI a bit more logical an coherent, get the obvious bugs out, please let us not have to update BNE tables anymore to get things done.
Anyway, I sorted this one out by setting the Width to zero (0) in the Layout. HTH. -
Reading Excel sheet the corresponding value
the corresponding value of another colum should be read from excel sheet .
soppose there are 4 coloumns and i enter the value of column one then colun 2,3,4 value should be read
Thanks
Sharad.Duplicate post.
-
I have been looking at my code for hours now and cant figure out what is wrong. The error has kept popping up even when i thought i had fixed everything. maybe a second set of eyes could help me out here. If you could help me out it would be much appreciated.
USE [ConorsSetKits]
GO
CREATE TABLE Customers (
CustomerID Int NOT NULL IDENTITY(1000,1),
LastName NChar(30) NOT NULL,
FirstName NChar(30) NOT NULL,
Address NChar(50) NOT NULL,
City NChar(30) NOT NULL,
State NChar(2) NOT NULL,
Zip Numeric(5) NOT NULL,
Email NVarChar(50) NOT NULL,
DateOfBirth Numeric (4) NOT NULL,
CONSTRAINT CustomersPK PRIMARY KEY(CustomerID),
CONSTRAINT ValidZip
CHECK ( [Zip] LIKE '[0-9][0-9][0-9][0-9][0-9]' ),
CONSTRAINT ValidState
CHECK( LEN([State]) = 2),
CONSTRAINT DateOfBirth
CHECK ([DateOfBirth] BETWEEN '1920-01-01' AND getdate() - 5844));
CREATE TABLE Sets (
SetID Int NOT NULL IDENTITY(1000,1) Primary Key,
SetName NChar(20) NOT NULL,
SetType NChar (20) NOT NULL,
Price Numeric (20) NOT NULL,
Quantity Numeric (50) NOT NULL,
CONSTRAINT SetTypeCheck
CHECK (SetType IN ('Planes','Tanks','Robots','Cars','Helicopters','Boats','Trains','Motorcycles','Jets')),
CONSTRAINT ValidQuantity
CHECK (Quantity >= 0)
CREATE TABLE Orders (
OrderID Int NOT NULL IDENTITY(1000,1),
CustomerID Int NOT NULL,
OrderDate Date NOT NULL,
CONSTRAINT CAIntPK PRIMARY KEY(OrderID, CustomerID),
SET IDENTITY_INSERT dbo.CUSTOMER OFF
SET IDENTITY_INSERT dbo.Sets OFF
SET IDENTITY_INSERT dbo.Orders OFF
SET IDENTITY_INSERT dbo.CUSTOMER ON
INSERT INTO Customers
(CustomerID, LastName, FirstName, Address, City, State, Zip,
Email, DateOfBirth)
VALUES (
1000, 'Janes', 'Jeffrey', '123 W. Elm St', 'Renton', 'WA', '98055',
'[email protected]',1985);
INSERT INTO Customers
(CustomerID, LastName, FirstName, Address, City, State, Zip,
Email, DateOfBirth)
VALUES (
1001, 'Smith', 'David', '813 Tumbleweed Lane', 'Loveland', 'CO', '81201',
'[email protected]',1992);
INSERT INTO Customers
(CustomerID, LastName, FirstName, Address, City, State, Zip,
Email, DateOfBirth)
VALUES (
1015, 'Twilight', 'Tiffany', '88 1st Avenue', 'Langley', 'WA', '98260',
'[email protected]',1972);
INSERT INTO Customers
(CustomerID, LastName, FirstName, Address, City, State, Zip,
Email, DateOfBirth)
VALUES (
1033, 'Smathers', 'Fred', '10899 88th Ave', 'Bainbridge Island', 'WA', '98110',
'[email protected]',1980);
INSERT INTO Customers
(CustomerID, LastName, FirstName, Address, City, State, Zip,
Email, DateOfBirth)
VALUES (
1034, 'Frederickson', 'Mary Beth', '25 South Lafayette', 'Denver', 'CO', '80201',
'[email protected]',1970);
INSERT INTO Customers
(CustomerID, LastName, FirstName, Address, City, State, Zip,
Email, DateOfBirth)
VALUES (
1036, 'Warning', 'Selma', '205 Burnaby', 'Vancouver', 'BC', '80201',
'[email protected]',1981);
INSERT INTO Customers
(CustomerID, LastName, FirstName, Address, City, State, Zip,
Email, DateOfBirth)
VALUES (
1037, 'Wu', 'Susan', '105 Locust Ave', 'Atlanta', 'GA', '30322',
'404', '653-3465', '[email protected]',1971);
INSERT INTO Customers
(CustomerID, LastName, FirstName, Address, City, State, Zip,
Email, DateOfBirth)
VALUES (
1040, 'Gray', 'Donald','55 Bodega Ave', 'Bodega Bay', 'CA', '94923',
'[email protected]',1985);
INSERT INTO Customers
(CustomerID, LastName, FirstName, Address, City, State, Zip,
Email, DateOfBirth)
VALUES (
1041, 'Johnson', 'Lynda', '117 C Street', 'Washington', 'DC', '20003',
'[email protected]',1969);
INSERT INTO Customers
(CustomerID, LastName, FirstName, Address, City, State, Zip,
Email, DateOfBirth)
VALUES (
1051, 'Wilkens', 'Chris', '87 Highland Drive', 'Olympia', 'WA', '98508',
'[email protected]',1994);
SET IDENTITY_INSERT dbo.CUSTOMER OFF
SET IDENTITY_INSERT dbo.Sets ON
INSERT INTO Sets
(SetID, SetName, SetType, Price, Quanity)
VALUES (
1000, 'MysterySet1','Planes',$29.99,10);
INSERT INTO Sets
(SetID, SetName, SetType, Price, Quanity)
VALUES (
1001, 'MysterySet2','Planes',$19.99,10);
INSERT INTO Sets
(SetID, SetName, SetType, Price, Quanity)
VALUES (
1002, 'MysterySet4','Tanks',$39.99,10);
INSERT INTO Sets
(SetID, SetName, SetType, Price, Quanity)
VALUES (
1003, 'MysterySet3','Robots',$19.99,10);
INSERT INTO Sets
(SetID, SetName, SetType, Price, Quanity)
VALUES (
1004, 'MysterySet5','Cars',$29.99,10);
INSERT INTO Sets
(SetID, SetName, SetType, Price, Quanity)
VALUES (
1005, 'MysterySet6','Boats',$29.99,10);
INSERT INTO Sets
(SetID, SetName, SetType, Price, Quanity)
VALUES (
1006, 'MysterySet7','Trains',$39.99,10);
INSERT INTO Sets
(SetID, SetName, SetType, Price, Quanity)
VALUES (
1007, 'MysterySet8','Motorcycles',$9.99,10);
INSERT INTO Sets
(SetID, SetName, SetType, Price, Quanity)
VALUES (
1008, 'MysterySet9','Helicopters',$29.99,10);
INSERT INTO Sets
(SetID, SetName, SetType, Price, Quanity)
VALUES (
1009, 'MysterySet10','Jets',$29.99,10);
SET IDENTITY_INSERT dbo.Sets OFF
SET IDENTITY_INSERT dbo.Orders ON
INSERT INTO Orders
(OrderID, OrderDate)
VALUES
(1000, '2012-12-12');
INSERT INTO Orders
(OrderID, OrderDate)
VALUES
(1000, '2013-12-30');
INSERT INTO Orders
(OrderID, OrderDate)
VALUES
(1005, '2013-08-30');
INSERT INTO Orders
(OrderID, OrderDate)
VALUES
(1004, '2013-12-30');
INSERT INTO Orders
(OrderID, OrderDate)
VALUES
(1004, '2013-08-31');
INSERT INTO Orders
(OrderID, OrderDate)
VALUES
(1004, '2014-03-25');
INSERT INTO Orders
(OrderID, OrderDate)
VALUES
(1002, '2012-11-14');
INSERT INTO Orders
(OrderID, OrderDate)
VALUES
(1001, '2012-11-14');
INSERT INTO Orders
(OrderID, OrderDate)
VALUES
(1001, '2013-01-05');
INSERT INTO Orders
(OrderID, OrderDate)
VALUES
(1006, '2012-06-22');
SET IDENTITY_INSERT dbo.Orders OFFPrice Numeric (20) NOT NULL,
I do not think you understand this datatype? Go look at the values you are attempting to insert into this column. For example, "$29.99". After the insert, what value is actually stored in that column?
DateOfBirth Numeric (4) NOT NULL,
No. Just No. Either change the column name to faithfully represent what values you intend to store (and apply the appropriate constraints) or change the datatype and the values that you intend to store to match the column name. And the constraint
that you do have:
CONSTRAINT DateOfBirth
CHECK ([DateOfBirth] BETWEEN '1920-01-01' AND getdate() - 5844));
is both logically suspect and syntactically wrong. First, the upper boundary will be computed as 1999-04-29 15:50:21.670. But, of course, your column is a whole number of no more than 4 digits. The same issue applies to your lower boundary.
A simple select statement will show you those errors
select cast('1920-01-01' as numeric(4)), getdate() - 5844, cast(getdate() - 5844 as numeric(4));
An insert statement fails with the same error. Because, of course, your boundary values must actually be converted to numeric(4) in order to compare them against the value contained in the column. Generally, you can convert from
string to numeric - IF the content of the string actually contains a value that is numeric and can be converted into the specific type needed. Not so in this case. Is this 16 year period (5844 days) significant for some reason? You should
document it here in your DDL with a comment, because it is unlikely to be documented (and kept current) anywhere else.
And lastly, your script has:
SET IDENTITY_INSERT dbo.CUSTOMER OFF
That is not the name of your table, and therefore that statement also fails. The table name you used is plural. -
How to insert the value axis in a EXCEL graph
Hello,
how can I do to insert the value axis (name) and graph tilte in a EXCEL graph using report generation in LabVIEW??
I'm using excel specific functions, but I don't find it anywhere.
THANKS.Hi,
the function Excel Set Graph Font.vi has an input parameter called Title that corresponds to the name of the axis selected through Axis Type parameter.
And the funtion Excel Insert Graph.vi has an input parameter called Graph Title.
You can see an example called Column Graph (Excel).vi in Find Examples>Toolkits and Modules>Report Generation. -
Hi,
I want to know two things
*1-* If I insert a lob value say blob through sql stament as shown below
insert into employee(id,name,picture) values('101','Peter',pic );
Now how value will insert into Oracle table i.e. lob pointer in original table and lob value in either other segment of same tablespace or in segment of different tablespace. I mean is there any internal mechanism which Oracle handles or developer/dba has to take care of it. Like I want to create a separate Lob segment for picture and want to insert original lob value in it. How can I achieve this.
*2-*If I'm using DBMS_LOB package for insertind data in ltable containg lob clolums. Then is it necessary to first initialize lob cloumn and then insert value in it.
Looking for guidence .
Regards,
AbbasiYou can NOT insert a BLOB like insert into employee(id,name,picture) values('101','Peter',pic );, You can try it yourself and check!.
If the column is of BFILE then atleast you need something like insert into employee(id,name,picture) values('101','Peter',BFILENAME('MY_DIR','pic.jpg' );To load/insert a BLOB you need DBMS_LOB. One example may be....
SQL> CREATE TABLE myblob (id NUMBER(2), my_xls BLOB);
Table created.
SQL> CREATE OR REPLACE DIRECTORY TEST_DIR as 'C:\';
Directory created.
SQL> DECLARE
2 v_src_loc BFILE := BFILENAME('TEST_DIR', 'saubhik.xls');
3 v_amount INTEGER;
4 v_b BLOB;
5 BEGIN
6 DBMS_LOB.OPEN(v_src_loc, DBMS_LOB.LOB_READONLY);
7 v_amount := DBMS_LOB.GETLENGTH(v_src_loc);
8 INSERT INTO myblob VALUES (1, EMPTY_BLOB()) RETURNING my_xls INTO v_b;
9 DBMS_LOB.LOADFROMFILE(v_b, v_src_loc, v_amount);
10 DBMS_LOB.CLOSE(v_src_loc);
11 END;
12 /
PL/SQL procedure successfully completed.
SQL> commit;
Commit complete. -
While inserting values from a xml file into the database.
Dear Forum Members,
While using Samp10.java (given in XSU!2_ver1_2_1/oracleXSU12/Sample)for inserting values from xml file Sampdoc.xml into database table xmltest_tab1,the error shown below appears on the DOS prompt.
The code for sam10 is:
import oracle.xml.sql.dml.*;
import java.sql.*;
import oracle.jdbc.driver.*;
import oracle.jdbc.*;
import java.net.*;
public class samp10
public static void main(String args[]) throws SQLException
String tabName = "xmltest_tab1";
String fileName = "sampdoc.xml";
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn=DriverManager.getConnection("jdbc:odbc:BookingSealinerScott","scott","tiger");
OracleXMLSave sav = new OracleXMLSave(conn, tabName);
URL url = sav.createURL(fileName);
int rowCount = sav.insertXML(url);
System.out.println(" successfully inserted "+rowCount+
" rows into "+ tabName);
conn.close();
}catch (Exception e){e.printStackTrace();}
The Structure of Sampdoc.xml is:
<?xml version="1.0"?>
<ROWSET>
<ROW num="1">
<EMPNO>7369</EMPNO>
<ENAME>SMITH</ENAME>
<JOB>CLERK</JOB>
</ROW>
<ROW num="2">
<EMPNO>7499</EMPNO>
<ENAME>ALLEN</ENAME>
<JOB>SALESMAN</JOB>
</ROW>
<ROW num="3">
<EMPNO>7521</EMPNO>
<ENAME>WARD</ENAME>
<JOB>SALESMAN</JOB>
</ROW>
</ROWSET>
Description of table xmltest_tab1 is:
SQL> desc xmltest_tab1;
Name Null? Type
EMPNO NUMBER(4)
ENAME CHAR(10)
JOB VARCHAR2(9)
Error Displayed is:
A nonfatal internal JIT (3.00.078(x)) error 'Structured Exception(c0000005)' has
occurred in :
'oracle/xml/sql/dml/OracleXMLSave.cleanLobList ()V': Interpreting method.
Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cgi
oracle.xml.sql.OracleXMLSQLException: sun.jdbc.odbc.JdbcOdbcConnection
at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:1967)
at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:1880)
at oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:1013)
at samp10.main(samp10.java:36)
Press any key to continue . . .
Please send me the solution as soon as possible.
Thanks,
Waiting for your Reply,
Bye,
Vineet Choudhary
Email id: [email protected]
nullGo and read about JDBC. You need to know some basics before asking such a st&*id questions.
Paul -
How to insert column values into database as rows
Hi,
I have 8 columns and some not null columns. Based on not null columns I want to insert into table as rows. The 8 columns may contain values or no value. If the first column contains data, then I have to insert into one row. if the second column contains data I have to insert a row and in second column. respectively...So How can I insert column values into rows. Can I write 8 insert statements. (OR) is it possible to insert data from columns using where clause.
Please help me out....
Thanks in AdvanceLines Table:
line_id, orcl_bank_account_num, product_type, service_type, lease_type,
funding_type, cpi, billing_frequency_unit_cd , annual_due_date ,
pricing_start_date, pricing_end_date, install_date, contract_end_date ,
prdct_replacement_cost_amt, cradle_replacement_amt, supranet_contract,
issuance_fee, board_inactive_date, header_id, creation_date, last_modified_date,
created_by_nam, modified_by_nam, activeinactive_flg, prdct_bill_amt_yr1,
prdct_bill_amt_yr2, prdct_bill_amt_yr3, prdct_bill_amt_yr4, prdct_bill_amt_yr5,
prdct_bill_amt_yr6, prdct_bill_amt_yr7, prdct_bill_amt_yr8, activation_fee_yr1,
activation_fee_yr2, activation_fee_yr3, activation_fee_yr4, activation_fee_yr5,
activation_fee_yr6, activation_fee_yr7, activation_fee_yr8,
In this table the columns structure is :
-- PRDCT_BILL_AMT_YR (1 to 8) NUMBER(14,4)
-- ACTIVATION_FEE_YR (1 to 8) NUMBER(8,2)
I have one more table:
PRDCT_INS_AMT NUMBER(14,4)
ACTIVATION_FEE_AMT NUMBER(14,4)
I want to insert prdct_bill_amt_yr (1 to 8) columns data into PRDCT_INS_AMT column. similarly activation_fee (1 to 8) columns data.
But the data should be inserted based product_type, service_type, lease_type columns values. (These 3 columns may contain upto 45 combinations). -
How to insert multiple values from a single LOV box...?(cont)
Hi..I have a medical form and under the conclusions box, I have set up a LOV with various values. That part works fine.
The thing is I do not want to pick a single value. The format which I write in the conclusions in that box is
1. "............"
2. " "
3...etc...
But when I go to choose the 2nd value, it replaces the first one I had inserted. Any tips please??"My way", should have done exactly that. Every time you open the lov and choose a value it should be aapended to the already existing value in the textfield (assuming taht the length of the textfield is long enough)."
-Well thats the thing, If I try to add more than one value into ONE text field when I open up the LOV..it just replaces the first value with teh second value. Right now wihtout the LOV this is the format it gets stored into the database. The conclusions are typed in manually and when i query from sql plus it comes the way I typed it in. For example:
1. Mild concentric LVH
2. Normal LV systolic function ; EF 75 %
3. Diastolic dysfunction
I just copy/pasted that from sql. This is saved in a column in a table named ProcedureSummary. I want to insert values exactly this way into one field. Except when i do that currently with the LOV, it replaces the old value with a new value.
I hope i make sense, sorry for the bother! -
How to get the last inserted Autoincrement value in Java for Pervasive DB
Hi, I need to get the last inserted auto incremented value after the record is inserted IN JAVA For ex. consider we have 4 columns for the myTable in the PERVASIVE DATABASE V10 autoid - identity column (auto increment column) userID userName pageID insertSqlExpression = insert into myTable (userID , userName, pageID) values( ? ,? ,?); prepareInsert = connection.prepareStatement(insertSqlExpression); prepareInsert .excuteUpdate; After inserting the new record how can I get the autoid value (last inserted value) in the Java. Please help me.
Thanks in advance. ArthikJavaArthikBabu wrote:
I dont have privileges to write new stored procedures in database.I need to do in the Java side only. In many databases that irrelevant. The same way you would do it in a proc can be done with the correctly conceived statement (singular.)
For ex – if we insert and then the select record's identity value as a single transaction and would this guarantee that what is returned by the select would not include inserts that another might have made?Please do not take that path unless you are absolutely certain that your database does not support any other way to do it.
Maybe you are looking for
-
Response.sendRequest() question
Hi, My question concerns, the sendRedirect method of the response object. In one of my jsp's I have an if statement that sendRedirect's to another page if it evaluates to true. The odd thing that occurs is when it is supposed to redirect, the rest of
-
How do i change my apple id on my iphone 5
I have created a new apple id but I do not know how to change it on my mobile icloud Please help
-
Uploading to online data storage: Now cannot download songs into iTunes
Hello all. I am not seeing this one on any FAQs, knowledge bases, or discussion boards yet: I am doing my initial upload of files to SugarSync, a highly-recommended online data storage service. Since I started, I cannot download songs into iTunes, ev
-
Opening EXCEL and MS WORD doc requires login to WAS
Hi all, just have a question on when I open an EXCEL or MS Word document in a new window via below html statement, a logon on screen pops up and asking me to logon to the SAP Web Application Server, however, when I cancel, it will open the EXCEL/WORD
-
helloooooooooooo anybody here