Posts

Showing posts with the label apex4

Remote MCP Server to access an Oracle database in Claude on iOS

Image
Think of MCP ( Model Context Protocol ) as the universal adapter for AI assistants. Just like USB-C promised to connect any device to any port, MCP lets AI models connect to virtually any data source, application, or service through a standardized protocol. Whether it's a company database, a cloud service, or a local file system, MCP bridges the gap between AI and the tools you use. The buzz around MCP isn't just hype—it's solving a real problem. Until recently, getting AI to work with your specific data and workflows meant custom integrations, API wrangling, and a lot of developer headaches. MCP changes that by creating a common 'language' that AI models can use to communicate with external systems securely and efficiently. Although MCP is relatively new (created by Anthropic in November 2024), all major players are backing the protocol.  With developers rapidly building MCP servers for everything from databases to development tools, we're witnessing the birt...

Fun with Bubbles - Part 2

Image
In my previous  post a couple of days back, I demonstrated a simple APEX demo with D3 pulling dynamic data from the database in the form of a bubble chart.  I promised to share the code so here it is. It's really quite simple.  In short, i've created a table, D3_COUNTRIES, which contains 10 sets of rows each with a country code, name and a value.  The Javascript code on the page has an interval that runs every 2 seconds, and each time calls an Ajax callback process to get another set of country data.  The code then uses D3 to create a bubble chart for that data, using a nice transition between each set. First of all create the table and upload the data.  Here's the DDL to create the D3_COUNTRIES table. CREATE TABLE "D3_COUNTRIES" ( "ID" NUMBER(10,0), "COUNTRY_CODE" VARCHAR2(2) NOT NULL ENABLE, "COUNTRY_NAME" VARCHAR2(100) NOT NULL ENABLE, "CREATED_DATE" DATE, ...

Oracle 12c Database finally lands.....

It's finally here, for Linux & Solaris at least: Oracle 12c Database

APEX and Graph Visualisation Libraries

Image
I was recently asked by a client to create a quick POC in APEX to demonstrate how relationships between physical assets (in this case oil refineries) could be maintained using a graphical tool.  So I looked at a number of different Javascript graphing libraries  and chose MXGraph from JGraph  which seemed to have the most features and looked relatively easy to integrate.   It's worth mentioning that it is not Open Source and has a fairly hefty licence fee. The requirement was to be able to show the process flow between units in a particular oil refinery with relationships representing the refined output from one processing unit and the input into another.  The idea is to build out quite detailed maps of the process flows within refineries and then use this with other 3rd party outage data to predict the affect on production and thus ultimately the change in price of crude and refined oil products. The POC was quite simple, as you can see from the scree...

APEX 4.0: SQL in Plugins and seeing Stars.....

Image
This is my first post in a few weeks as I've been a little busy with work recently, which is just criminal as I really just want to play with APEX 4 EA2.  Oh well, bills have to be paid and children fed I suppose. Anyway, let's cut to the chase.  There is a nice feature of APEX 4 plugins (which I'm pretty sure wasn't working correctly in EA1) where you can create a custom attribute of type 'SQL Query'.  I've added this to the Range Slider plugin I use on my Online Store demo for the min and max default range values, as you can see below: Anyone using the plugin can write SQL statements for these attributes, and the good part is that they will be parsed when the changes are saved.  You can see in the screenshot below that I have set the Default Range Min Value to the mimimum selling price and the Default Range Max Value to maximum selling price.  I should, of course, set the Minimum Value and Maximum Value to also be 'SQL Query' attribute types a...

APEX EA2 update

To see the new style Plugins use this link to the Plugins Application provided by Patrick Wolf: Plugins Application I've managed to copy the syntax used in some of these plugins to update those on my Online Store demo. I've still need to upload some images and it looks like there are a few issue with my schema, but generally the app appears to be working.  So, in general it looks like EA1 apps can be imported into EA2 with little need to change anything.

APEX EA2 is now available

The good news is that it appears that applications exported from Early Adopter Phase 1 import ok in the new EA2. The bad news is that plugins have had a bit of an overhaul. It looks like the PL/SQL code used to construct a plugin now uses functions rather than procedures. So back to the drawing board for some of my online store demo plugins! Can anyone from the team shed some light on what I do with 'apex_plugin.t_page_item_render_result' or 'apex_plugin.t_page_item_validation_result', please?

Static Region Id's and Ajax Fun

More Online Store demo shenanigans for you. A bit dry this one I'm afraid. A couple of days back I decided to export/import my Online Store demo, and whilst viewing the new imported version of the application found it to be completely kaput.  It didn't take long to realise that I had made the mistake of hard coding region id's in some of the Javascript.  Well, I thought this will be easy to fix as I can just utilise Static id's instead in my regions and in place of #REGION_ID# in templates.  So far, so good, but then I realised that the Ajax refreshing of the Products and Shopping Basket regions is done using calls to html_PPR_Report_Page and $a_report, and both these require the internal numeric region id as a parameter.  As far as I know neither recognises the Static id (please correct me if I am wrong).  Doh! I get around this by creating hidden items (i.e. P1_PRODUCT_REGION_ID) based on a SQL query that uses the Static id to get the 'real' internal num...