码迷,mamicode.com
首页 > 数据库 > 详细

How To Use DBLink In Oracle Forms 6i

时间:2016-12-25 23:26:00      阅读:332      评论:0      收藏:0      [点我收藏+]

标签:oat   try   top   drop   bre   com   ase   webkit   can   

You want to connect multiple databases in oracle forms to perform certain tasks, for example you need to execute ddl or dml statements against databases but when you try to use dblink it gives you error or suddenly quits from the oracle forms. 

Solution - 1


You can create Database Synonyms for the objects which you want to access through dblink in oracle forms. Suppose you want to execute a procedure from another database, create a synonym for that procedure in current database and access it in oracle forms.

Solution - 2

Use Exec_Sql package in oracle forms to access multiple database and to execute any ddl and dml statements. A simple example is given below:

declare
    cid exec_sql.conntype;
    cursorid exec_sql.curstype;
begin
    cid := exec_sql.open_connection(‘scott/tiger@db3‘);
     cursorid := exec_sql.open_cursor(cid);
     exec_sql.parse(cid, cursorid, ‘drop table emp2 ‘, exec_sql.v7);
     exec_sql.close_cursor(cid, cursorid);
     exec_sql.close_connection(cid);
end;


技术分享

How To Use DBLink In Oracle Forms 6i

标签:oat   try   top   drop   bre   com   ase   webkit   can   

原文地址:http://www.cnblogs.com/quanweiru/p/6220598.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!