Home » Developer & Programmer » Forms » How to get data from different database in form (Form)
How to get data from different database in form [message #329268] Tue, 24 June 2008 16:40 Go to next message
zhou6712
Messages: 1
Registered: May 2008
Location: Dallas TX
Junior Member
Hello,
I have following codes in my form any try to get data from a different database. It turns to not form_success. The same statement execute well in pl/sql. how can I make it work in the from?

Thanks,
Joe



Declare
v_stmt varchar2(500);
v_from_login varchar2(100):='abc/logmein@dald';
v_this_login varchar2(100);='abc/letmein@dalt';
Begin
v_stmt := 'copy from '||v_from_login ||' to '||v_this_login||' insert joe_test using select * FROM joe_test; ';
forms_ddl(v_stmt);
IF NOT Form_Success THEN
message('v_error = '||sqlerrm);
else
message('Copy date successfully.');
end if;
End;
Re: How to get data from different database in form [message #329274 is a reply to message #329268] Tue, 24 June 2008 21:53 Go to previous messageGo to next message
mm_kanish05
Messages: 493
Registered: January 2007
Location: Chennai
Senior Member

please take a look before you post that OraFAQ Forum Guide on this link http://www.orafaq.com/forum/t/88153/0/

kanish


Re: How to get data from different database in form [message #329442 is a reply to message #329268] Wed, 25 June 2008 07:42 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Why would you want to do that using SQL*Plus COPY command, which forces you to use FORMS_DDL? What's wrong with creating a database link and manipulate data over it? I'd say that such a solution is far simpler and easier to maintain (i.e. what will you do once password(s) change? Edit your form in order to fix hard-coded "v_from_login" and "v_this_login"?).
Re: How to get data from different database in form [message #329455 is a reply to message #329268] Wed, 25 June 2008 08:35 Go to previous message
cjack
Messages: 22
Registered: June 2008
Junior Member
Hi
Usually we create synonym to translate different database table , view or any other objects, then use synonym to replace the objects in developing form. If we need do any changes about these objects, we only need modify the synonym.

Jack
Previous Topic: Master/detail tables, problem interconnecting with an id
Next Topic: Query LOV and how to display the LOV back in the Text item.
Goto Forum:
  


Current Time: Thu Dec 05 08:05:50 CST 2024