How To Use DBLink In Oracle Forms 6i
2016-12-25 21:29
1901 查看
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.
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;
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;
相关文章推荐
- Know How To Use ID_NULL Function To Search An Object In Oracle Forms
- How To Use FETCH_RECORDS In Oracle Forms
- Know How To Use Check Box Mapping Of Other Values Property In Oracle Forms
- How To Use RUN_PRODUCT In Oracle Forms
- Know How And When To Use System.Message_Level To Control Messages In Oracle Forms
- (转)How to use udev for Oracle ASM in Oracle Linux 6
- How to use Oracle Instant Client in Mac OS X Lion
- Learn How To Create Trigger In Oracle Forms
- How to use Oracle 11g ODP.NET UDT in an Oracle Stored Procedure's Where clause
- How To Commit Just One Data Block Changes In Oracle Forms
- How to use udev for Oracle ASM in Oracle Linux 5
- How to use forms in Tapestry 5.
- How To Use a DataReader Against an Oracle Stored Procedure in Visual C# .NET
- How to Use Oracle Restart in Oracle 11gR2
- Shell: how to list all db links in oracle DB to generate a flat file (生成dblink列表文件)
- ACC97: How to Use Percent, Plus, and Caret Symbols in ASP Forms
- How to use udev for Oracle ASM in Oracle Linux 6
- Learn How To Attach PL/SQL Library In Oracle Forms
- Why And When To Use Pre-Update and Pre-Insert Triggers In Oracle Forms
- How To Access Forms Directly In Oracle Applications R12 [ID 552301.1]