Home » Developer & Programmer » Forms » Run from Forms 6i, an procedure store the database.
Run from Forms 6i, an procedure store the database. [message #153478] Mon, 02 January 2006 16:48 Go to next message
jota27
Messages: 1
Registered: January 2006
Location: bogota
Junior Member
I am using Forms 6i & Oracle 8i. But I need run from form 6i, an procedure store the database with an default connection
I have written like this:
Declare
  connection_id EXEC_SQL.CONNTYPE;
  bIsConnected BOOLEAN;
  cursorID EXEC_SQL.CURSTYPE;
  sqlstr VARCHAR2(1000);
  nIgn PLS_INTEGER;
  nRows PLS_INTEGER := 0;
  nTimes PLS_INTEGER := 0;
  mynum NUMBER;
  mi_cadena_ejecucion VARCHAR2(200);
  
BEGIN
  -- 
  -- obtain the default connection and check that it is valid
  --
  connection_id := EXEC_SQL.DEFAULT_CONNECTION;
  --conn := EXEC_SQL.OPEN_CONNECTION(conn_str);
  bIsConnected  := EXEC_SQL.IS_CONNECTED;
  IF bIsConnected = FALSE THEN
    TEXT_IO.PUT_LINE('No primary connection. Please connect before retrying.');
    RETURN;
  END IF;
  --
  -- subsequent calls to EXEC_SQL.Open_Cursor, EXEC_SQL.Parse, EXEC_SQL.Define_Column,
  -- EXEC_SQL.Execute, EXEC_SQL.Fetch_Rows, EXEC_SQL.Column_Value,
  -- EXEC_SQL.Close_Cursor, EXEC_SQL.Close_Connection all use this connection 
  -- implicitly from the cache
  --
  cursorID := EXEC_SQL.OPEN_CURSOR;
  mi_cadena_ejecucion := :procedimiento_pr.procedimiento_ejecutar||(''||:barrio_siic.codigo_barrio||'');
  EXEC_SQL.PARSE(cursorID, mi_cadena_ejecucion , exec_sql.v7);
  EXEC_SQL.DEFINE_COLUMN(cursorID, 1, mynum);
  nIgn := EXEC_SQL.EXECUTE(cursorID);
/*
  LOOP
    IF (EXEC_SQL.FETCH_ROWS(cursorID) > 0) THEN
      EXEC_SQL.COLUMN_VALUE(cursorID, 1, mynum);
     ...
    ELSE
      exit;
    END IF;
  END LOOP;*/
  EXEC_SQL.CLOSE_CURSOR(cursorID);
  EXEC_SQL.CLOSE_CONNECTION;
 End;


But FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-306500.
Help Me.
Upd-mod: Add code tags.

[Updated on: Tue, 03 January 2006 17:28] by Moderator

Report message to a moderator

Re: Run from Forms 6i, an procedure store the database. [message #153701 is a reply to message #153478] Tue, 03 January 2006 17:35 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
From the Advanced Search page use the Google engine against Orafaq with a search term of '306500'. Please check http://www.orafaq.com/forum/?t=msg&th=32615/0/

Does this help?

David

[Updated on: Tue, 03 January 2006 17:36]

Report message to a moderator

Previous Topic: Forms-Reports Background Engine Errorstring
Next Topic: how to display BLOB on a form using OLE?
Goto Forum:
  


Current Time: Fri Sep 20 02:28:17 CDT 2024