Posts

Showing posts with the label ajax

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, ...

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...