Oracle 01g and forms 6i with BLOB Data type
Dear All,
I have upgraded my database from oracle 9i R2 to oracle 10g R2. i have an application developed using oracle forms and reports 6i. this application have a form where it stores and retirive an image from the database, this image is stored in a table with a BLOB data type, it was being retrieved fine until we did the upgrade and now it is impossible for me to see the image and i am getting an error every time i retrive the data. it always pop a message saying that "INCONSISTENT DATA TYPE"
please guys help.
Regards
you can try this procedure
DECLARE
t_blob BLOB;
t_len NUMBER;
t_file_name VARCHAR2(100);
t_output UTL_FILE.file_type;
t_TotalSize number;
t_position number := 1;
t_chucklen NUMBER := 4096;
t_chuck raw(4096);
t_remain number;
BEGIN
-- Get length of blob
SELECT DBMS_LOB.getlength (PHOTO), ename || '_1.jpg'
INTO t_TotalSize, t_file_name FROM DEMO WHERE ENAME ='moon';
t_remain := t_TotalSize;
-- The directory TEMPDIR should exist before executing
t_output := UTL_FILE.fopen ('TEMPDIR', t_file_name, 'wb', 32760);
-- Get BLOB
SELECT PHOTO INTO t_blob FROM DEMO WHERE ENAME ='moon';
-- Retrieving BLOB
WHILE t_position < t_TotalSize
LOOP
DBMS_LOB.READ (t_blob, t_chucklen, t_position, t_chuck);
UTL_FILE.put_raw (t_output, t_chuck);
UTL_FILE.fflush (t_output);
t_position := t_position + t_chucklen;
t_remain := t_remain - t_chucklen;
IF t_remain < 4096
THEN
t_chucklen := t_remain;
END IF;
END LOOP;
END;
it will work
Similar Messages
-
Problem with BLOB data type and acute characters
Hi all, I have an issue related with BLOBS cols:
I have table A with a BLOB column and I need to insert that data into another table B, the thing is I use dbms_lob.read() that returns data into a RAW variable and then I convert it to a varchar2(with utl_raw.cast_to_varchar2) and it works ok if I have no "acute characters" on it, e.g Québec.
If I have acute characters, the "é" is inserted wrongly with an "¿" character on the table B. I tested the BLOB on the table A to check the data and the BLOB is showing correctly the "é" character, it seems that the dbms_lob.read() funct cannot handle accute characters and replace them with "¿".
How can I replace acute characters when I use the dbms_lob.read functionality?
Thank you!what's the OS of the db server? is this code an anonymous pl/sql block, or stored pl/sql? does it run on the server or a client? if it's on the client, what's the o/s of the client?
you might want to look at the following, plus the first 3 notes in it's reference section
https://metalink.oracle.com/metalink/plsql/f?p=130:14:3038746456038321058::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,264157.1,1,1,1,helvetica -
Dear all
I am using APEX 4.0, to show an image in my report I have this sql statement (built by using wizard) :
SELECT ProductID, Pro_Name, Pro_Description, Pro_Quantity, Pro_SerialNo, Pro_ModelName, Pro_ModelNo, Pro_Retail, dbms_lob.getlength(Pro_Image)
FROM Products
but for the Image column in the report it only shows the numbers!
any help?
thanks
MazCheck the Format-Mask of your image report column. To display images there should be a small link next to the format mask input item, where you can specify where to read the image from.
See this documentation for some explanation: http://www.oracle.com/technology/obe/apex/apex31nf/apex31blob.htm
brgds,
Peter
Blog: http://www.oracle-and-apex.com
ApexLib: http://apexlib.oracleapex.info
Work: http://www.click-click.at
Training: http://www.click-click.at/apex-4-0-workshops -
Hi All
i want to create 1 simple table with BLOB data types
now i after this i want to insert 25,000 characters through insert query from oracle
could u give me 1 simple example creation n insertion of data
i have tried this but i m getting problem if i m inserting more than 4,000 character.
Pls any one help me or suggests me how can i do this
Thanks All
Regards,
AjayHi
Edited by: user10717753 on Dec 16, 2008 3:53 AM -
Error ORA-01426: numeric overflow when Creating table with double data type
Hi,
I am using ODP.NET to create a table with data from SQL to Oracle. The problem is with double data type fields that is equivalent to FLOAT(49) in Oracle. My syntax is:
CREATE TABLE SCOTT.ALLTYPES
F1 NUMBER(10),
F10 DATE,
F2 NUMBER(10),
F3 NUMBER(5),
F4 NUMBER(3),
F5 FLOAT(23),
F6 FLOAT(49),
F7 NUMBER (38,5),
F8 NVARCHAR2(500),
F9 NVARCHAR2(500)
Th error is with field F6 but I am not sure what is the correct type equivalent to double in SQL.
I woul appreciate if anyone can help me with this problem.
SunnyDoes this simple test work for you?
In database:
create table float_test
f1 float(49)
);C# code:
using System;
using System.Data;
using System.Text;
using Oracle.DataAccess.Client;
using Oracle.DataAccess.Types;
namespace FloatTest
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
// connect to local db using o/s authenticated account
OracleConnection con = new OracleConnection("User Id=/");
con.Open();
// will hold the value to insert
StringBuilder sbValue = new StringBuilder();
// create a string of 49 number 9's
for (int i = 0; i < 49; i++)
sbValue.Append("9");
// command object to perform the insert
OracleCommand cmd = con.CreateCommand();
cmd.CommandText = "insert into float_test values (:1)";
// bind variable for the value to be inserted
OracleParameter p_value = new OracleParameter();
p_value.OracleDbType = OracleDbType.Double;
p_value.Value = Convert.ToDouble(sbValue.ToString());
// add parameter to collection
cmd.Parameters.Add(p_value);
// execute the insert operation
cmd.ExecuteNonQuery();
// clean up
p_value.Dispose();
cmd.Dispose();
con.Dispose();
}SQL*Plus after executing above code:
SQL> select * from float_test;
F1
1.0000E+49
1 row selected.- Mark -
Define variable with void data type.
Hi,
I would like to define a variable and a structure with void data type.
How could I define it?
regards.HI SijinK,
Thanks for the reply.
I want to call some "dll" in the TestStand. In this "dll", function requires some variable of void data type as input.
e.g. dll - Test.dll
Function - short int Func_a (void var_a, long var_b, void *var_c, custom_struc *var_d)
I want to call this function in the TestStand. Using "C/C++ Dll" adapter module and "Action" step type, I will call this dll and its function.
For passing values to this function, I need to define some variable with respective data type.
Please let me know how could I do this.
Regards. -
How to store and retrieve blob data type in/from oracle database using JSP
how to store and retrieve blob data type in/from oracle database using JSP and not using servlet
thanksJSP? Why?
start here: [http://java.sun.com/developer/onlineTraining/JSPIntro/contents.html] -
Is there any difference in oracle database and forms database
i want to know is there any difference in oracle database and forms 6i database
,if i import some file through oracle database then same data will exist in forms database or not
thanksOracle Forms is a Rapid Application Development (RAD) tool not a database. With Forms, you connect to an Oracle database to query and display data from the database as well as insert new or update existing data. Consequently, if exists in the database - you should be able to display it in a Form.
Craig... -
Pdf file stored as BLOB data type on Oracle
I store PDF file as BLOB data type on Oracle. There are cases
where I get multiple records from the database, that means I get
multiple PDF files. They have to be merged and displayed on the web
page. I tried CFContent which can display only one PDF file at a
time but not more than one, whereas cfdocument is having problem
converting binary data to string. I am kind of stuck.
Can you anybody please help me out? Please let me know if you
have any questions or this does not make sense to you.
Thank you in advance.BALAJI_JAY wrote:
> Can you anybody please help me out? Please let me know
if you have any
> questions or this does not make sense to you.
if by "merge" you mean 3 pdf into 1 pdf, try cfpdf (if on
cf8) or see this
thread if cf version less than 8:
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=1&catid=7&threadid=11 14635&messageid=4032202 -
Performance of WEB enabling ( Converting to Oracle 8i and Forms 6i)
We are working on a project to convert a forms 4.5 and Oracle 7.3.4 application to a web based app ( Oracle 8i and Forms 6i). I want to know if there will be a performance hit (improve or decrease) as a result of this.
Please helpSatish - concerned about your statement that you have not used in in production but you think its not the good. If you can quantify your statement I will address is.
As for Bobs points - check out http://forums.oracle.com/forums/message.jsp?id=836060
This probably addresses Bobs concerns.
If you are concerned - take a look at the testimonials. Go to otn.oracle.com/products/forms and click on the Testimonials link.
Believe it or not we actually have people who are running FASTER on the Web - How can that be!!! - well the reason is that the have uses on slow links - when running client server there database access is across these links and since they had database intensive application they found it could be slow. On the web the data trasfer between the app server and the database was on a fast link and the client (who are still on the slow link) are getting only screen draw information which is alot less than the database traffic.
Hope this helps
Grant -
Tg4msql - Blob Data Type Support(Oracle 8i - sql server 2000)
hi,
We are trying to replicate the data from oracle 8i to sql server 2000 through tg4msql.if we want to replicate the data thet contains the blob field , we are getting invalid expression in the procedure marked with error line.
the procedure i am using is as follows
CREATE OR REPLACE PROCEDURE INSERT_SQL
AS
BEGIN
FOR VAL_CURSOR IN
--Get the Data from the table with status 0
SELECT rs_report_rowid FROM BIJU.rs_report where rs_report_status = 0
LOOP
for new_cursor in
--get the details of the record with the row id
select id ,name,DOB from biju.sample where rowid = val_cursor.rs_report_rowid
LOOP
---insert the data from oracle to sql where the oracle data type contains blob(here photo field data type is blob).
Error Line: insert into [email protected](id,name,photo) values(new_cursor.id,new_cursor.NAME,new_cursor.DOB);
END LOOP;
END LOOP;
COMMIT;
END;
i want to know that tg4msql won't support the blob data type on the oracle end?we configured blob eqivalent in sql server as binary.Any help or suggestion regarding this are welcome..
regards
SriniSrini,
Support for LOB was added in v9.2. It is not supported in 8i. -
How to HIDE URL in oracle 9i and form 6i
hello and hi all,
me using oracle database 9i and form 6i with application server 9i
when me run my form at web me see
http://hrtest/dev60cgi/ifcgi60.exe?form=login_form.fmx&width=1000&height=700&userid=*user/password@sid*
me want to hide that url
any body can help me
Mahr haider iqbalopen the frmweb.cfg file
copy the existing configuration and paste it with new name
there is a sepwindow seeting is there copy that setting in your configuration.
now run the application with the url and config setting.
it will come in seperate window without url... here is the example..
[myconfig]
userid=
host=
port=
#other seetings
#sep window setting
separateFrame=True
lookandfeel=Generic
----------------------------------------------------- -
How to migrate SQL Server image data type to Oracle 8 BLOB data type?
Hi,
I have to migrate data from sql server to Oracle 10 g.
I am unable to migrate image data type from sql server to blob data type in oracle.
Iam using Oracle Heterogenous Services to migrate the data,Using Merge statement and database link.
I am getting the following error-
ERROR at line 7:
ORA-00932: inconsistent datatypes: expected BLOB got LONG BINARY
Can any one suggest me how to migrate Image datatype to BLOB???Hi you might want to post your question in General Forum.
General Database Discussions
There's very few users visit this forum. -
Create prompt with date-filter and initialize it with current date
Oracle BI 11 g
Hi!
I need to create dashboard prompt with date-filter and initialize it with current date. How can I do that?
I tried to create repository initialization block and add variable. But I don't know what should I write to DataSource? I tried to use functions Now(), Current_Date, sysdate (for example, SELECT Now() FROM tbl_Calendar) but without results - when I pressed "Test..." button I got errors - something like "Now() is unknown function" or "Incorrect syntax near key word Current_Date".
After that I tied to use Presentation Variable in Prompt, but also without success ((
Please, help me.I've created Repository Variable "CurrentDate", using SQL-query like this "select convert(varchar(10), getdate(), 104)" and now this variable is being initialized by value "07.04.2011". But I don't understand how to use this varible in DashboardPrompt! What item in list "Default selection" I should choose - "Variable Expression", "Server Variable" or something else? When I chose "Variable Expression" and write "CurrentDate" I got just string "CurrentDate" when preview Prompt. @{CurrentDate} gave me the same result.
-
Oracle 10gR2 and Forms 6i Combination
One of my company's division after suffering skill gap for many years decided finally to turn their system under my care. This means more work for me but it would be a welcome change since it will give back some exposure from my past life using SQLForms, CDE and Designer 2000 etc.
As a prerequisite I got involved to provide technical direction to a project to "modernize" their system with the "almost" current version that is still supported or "almost" supported by Oracle.
My question is this : ( In reference to Note 229929.1 Stating that Oracle 10GR2 and Form 6i combo is not supported as a combination ( because Form 6i is already desupported ) Is there anyone here have that combination running on production ?
Was there any problem ?
At the back of my mind I am very confident that I can make this combination work .
It would be useful if someone can confirm this combo. (ie 10gR2 and Forms 6i).
You may ask "Why not go with the latest ? ".This was for many reasons. I don't want to introduce shocking changes to the developers (they are already behind on technology and skillset), also Forms 6i is still Client-server which where they want to remain at the moment. The project was given a very short time to convert the system.
Introducing a new architecture will definitely introduce more task than these guys can handle in such short period.
Feedback for any real life experience on this combo is appreciated .
Thanks in advance.Go to Community Discussion Forums » Developer Tools » Forms and post your question there.
Maybe you are looking for
-
Multiple Macs... sharing same iTunes folder....
Not sure if there's a solution or not.... I have an external drive hooked up to my Airport Extreme. it's a shared drive for 3 of my Macs. That's where the iTunes folder is located for all machines as well (The drive is specifically for shared media).
-
I can't send email with Adobe acrobat 9.2.0 and Windows mail
Hi, I have the problem mentioned in the subjet: I can't send e-mail with pdf attached from Acrobat 9.2.0...when I click on the envelope acrobat tells me it can't estabilish a link to Windows Mail (latest version). Any idea? Thanks in advance. Massimo
-
Bitlocker TPM + PIN on MS Surface Pro 3 using MDT
We are new to MDT 2012 and are trying to create a task sequence for Surface Pro 3 Tablets. Everything is going OK apart from Bitlocker. We are required to enable TPM + PIN (yes I've read the articles saying PIN isn't necessary on tablets, but securit
-
AM is not retained after deployed the custom pages
Hi, I have two custom pages, Create(page1) and Select Jobs(page2) pages. In Create page I've a button called Populate Jobs, Once I click the populate jobs button it will navigate to another page. In page2 I'll select list of jobs using multiple selec
-
User-friendly name for Panel Which Does Not Appear in the Extensions Menu
We are developing various Extensions panels for CS5 using ActionScript. We only want a single Extension, our Main panel, to appear in the Windows>Extensions menu. Once that Panel is opened, it would open other extensions, as required. The problem is,