Dear All,
I had a problem retrieving a clob from the database and displaying it in an apex Check box. The reason for this is it is a very large clob and Apex item have a 32k character (byte) limit. This is because PL/SQL treats oracle apex page items as varchars not clobs and varchars have a maximum size. Anything over that size will not be displayed.
I checked one blog about these problem and also applied but problem is not solved.
[http://mayo-tech-ans.blogspot.com/2013/06/displaying-large-clobs-in-oracle-apex.html][1]
Database Version ::: 12.1.0.2.0
Apex Version ::: 5.1.4
Thanks in advance
Regards,
Sultan
Apex items can never be over 32 KB, that's the PL/SQL limit and there's not much you can do about that.
I question whether you really need a checkbox that has a value of > 32 KB. Could you use some other value like the primary key of the row for the CLOB, or an MD5 hash of it?
If you need to display some large content, like some large amount of text in a region, there is the OraOpenSource clob-load plugin.
You can also take a CLOB and chunk it up and write it out as HTML using the htp package. I gave an example in this answer.
Related
I am currently using Oracle APEX version 18.2.0.00.12 on Internet Explorer 11 and I am experiencing problems with getting my interactive grids to render correctly with regards to the widths of the columns.
I created an Interactive Grid on my page with the following query:
SELECT * FROM TABLE_NAME;
I did not change any of the default settings for the region; all I did was create the IG and then run the page.
When I run the page in IE, this is what I see:
Note: I have not yet added any data to the table.
The problem is that all of the columns are too narrow. However, when I run the same page in Google Chrome, this is what I see:
The columns are all sized proportionally in order to take up the full width of the IG, which is what I want.
I do not understand why the IG is rendered differently in IE versus Chrome. I know that I can set the Minimum Column Width for each column in the IG, but I would hate to do that every time I create an IG. Is there a different solution that would make the IG render in IE the same way that it does in Chrome?
Thank you in advance.
Actually remembered a solutuion. I cannot explain to you why this works, or how best to use it. But when I had this problem I sort of patched it by saving a default report.
But the strange thing, you had to manually adjust every column, even if it was to the same size as before, it just had to have been adjusted before the default report was saved. Then the grid would show as it should, but this isnt that good a solution since its only ok if everybody uses the same size display,..
We're looking at options to store our site's media (primarily images at this point) on some sort of cloud service. However, we'd like to get an idea of how much it might cost.
As part of this we need to get transfer (which wasn't enabled in IIS for logging, but now is) as well as the total amount of images we'd be storing on the server.
I've written a LINQ query against the database, but I'm wondering if there's a better way to handle this.
Checking the App_Data\MediaCache directory as the accepted answer to Sitecore Database and App_Data Size suggests shows a number of configuration and other documents in it as well, so might not be ideal.
Any suggestions? Thanks!
If all your media is stored in the db, you can get a pretty good approximation from looking at the Blobs table on your master database.
EXEC sp_spaceused N'dbo.Blobs';
If you've got a mix, you'll have to look at that plus what ever location is configured on the Media.FileFolder Sitecore setting (this defaults to /App_Data/MediaFiles).
Here is an addition to what #ddysart suggested. You can run the following query to find out number of media contents over a certain size.
SELECT DATALENGTH([Data]) FROM [Sitecore_DatabaseName].[dbo].[Blobs]
WHERE DATALENGTH([Data]) > <size_in_bytes>
Sitecore stores the size of the Media file in bytes in the Size field of the Media Item definition when you create or update a media item, regardless of whether the Item is stored in the database or on disk. You can SUM these values to give you the total.
The media with Unversioned template is stored in SharedFields table:
SELECT SUM(CAST([Value] as INT))
FROM [SharedFields]
WHERE FieldId = '6954B7C7-2487-423F-8600-436CB3B6DC0E'
And Versioned media is stored in VersionedFields table. You are probably only interested in the latest version of the uploaded media to reduce the amount stored in your CDN/Cloud:
SELECT SUM(CAST(vf.[Value] as INT))
FROM [VersionedFields] AS vf
INNER JOIN (
SELECT [ItemId], MAX([Version]) AS [Version]
FROM [VersionedFields]
GROUP BY [ItemId]) AS [vf1]
ON vf.ItemId = vf1.ItemId
AND vf.[Version] = vf1.[Version]
WHERE vf.FieldId = '5BE6C122-84C9-4661-A0C9-3718909C8DAD'
Note that the returned size is in bytes.
Suppose we have a existing siebel column and this column has corresponding mapped eim column also. If I change the length of this siebel base table's column from 100 to 200varhcar by running alter query from backend. How it will impact on the EIM process? Will import process be successful?
Regards,
Robin
If you are interested in knowing conceptually, here are the implications that i can foresee.
a) Table column added using alter table is virtually useless as the application wont be able to use it because its definition is missing from Siebel Repository.
b) If you change the length of an existing column, application would still be using the length mentioned in Siebel Repository.
c) EIM process will ignore your new column length as it loads data dictionary before running the job.
d) And finally, during code migration you have to do the alter table every time since DDLSync process cannot take care of your scenario.
I would advise you not to alter the length of an existing vanilla table column, and instead extend the database table to add a new column. Just as the other poster mentioned, you should do this using Siebel Tools. You will then need to also add reference for this new field into the EIM components (this you also do using Siebel Tools).
This is a best-practice. If your client ever had an Siebel code review done by Oracle, you would be told to do what I described above (not what you were considering doing).
Changing the column length using the alter table command will only change it in the database layer, which will have no repercussions with a siebel standpoint. The EIM tables will still be valid as they will be using the column length mentioned in the repository sent in by tools. If you dont change it in the tools and apply the table, I dont think the changes will work.
I would not recommend that you do this. In this case, probably nothing will go wrong. EIM columns will load data that are upto 100 characters long but from the gui, you could insert upto 200 characters. Something unexpected can go wrong, we would need to know your application better to answer this question.
I was wondering if you can help me out with my current problem which is to insert data into multiple tables in my relational database using a single form. I am fairly new to APEX but do have a little bit of background on mysql and php programming. In the past, I normally achieve such task by creating a view of all the columns from different table that I want to populate and using a simple insert commands but doing the same thing in apex gives me and error stating that "ORA-01779: cannot modify a column which maps to a non key-preserved table".
In Oracle you can not just update a view which has eg a JOIN clause. Oracle will not map all columns back to the source tables: one table might while the others won't. This isn't an apex problem: if you were to run an update against your view in the db you would get this error just as well.
If you want to have your apex screen remain as transparent as possible, then you may want to consider user an instead-of trigger on the view. You will have to write the correct dml statements in this trigger though in order to ensure your data is pushed through correctly to all tables.
Another option is to use the view only to fetch, and use different processes to push the data to the correct tables. Using data-layer packages might alleviate the use of code stored in apex (eg having a lot of plsql code in apex itself is usually not favored and is rather stored in packages).
Create items and get all the items values and use PL/SQL on submit button.
Eg: p1_party_Name, p2_Service_Name
BEGIN;
INSERT INTO par VALUES(par_party_uid_seq.nextval,:p1_Party_name);
INSERT INTO par VALUES(ser_service_uid_seq.nextval,:p2_Service_name);
END;
I need to create a tag cloud based on certain tag/keyword which indexed by lucene .
I noticed that, Luke (a toolbox to peek into lucene index) has the features of counting the term frequecy/count.
is the current ADC in sitecore able to retrieve the term frequency?
if not, can i directly access to the index files? If so, what is the format for the index file?
It is possible for me to manually calculate the term frequency, but the performance will be very terrible as I got millions of records.
If you're on sitecore 7, you can use the facet logic for this. Use one field to store the wordt that should appear in the cloud.
Do a facet on that field and use the count of each facet-item to determine the size of the item.