Forms Do Insert in MySQL Database Without DBLink

Dicas do Oracle Forms Builder - Blocos, Itens, LOV, Canvas, Triggers, comandos, PLL, d2kwutil, FMB, Alert, menus, etc
Post Reply
BCR
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 25
Joined: Thu, 22 Nov 2012 1:40 pm
Location: Patos de Minas
Breno Cristovão Rocha.

Good morning Glufke's guys!

Good, first I'm creating this topic because I did not find anything like it.

Personal what I need is the following.

I have an application in Oracle Forms 11g running beleza and etc .... I have a module here where I need to get the information that is saved in the Oracle database, but I need to create a button where I make a SELECT and the return of this SELECT Make an insert in a MySQL database on the web.

I would like to know the best way to accomplish this insert, I know I can do this by dblink but I would like to do inside the same forms ... is it possible?
User avatar
stcoutinho
Moderador
Moderador
Posts: 850
Joined: Wed, 11 May 2011 5:15 pm
Location: são Paulo - SP

Hello BCR,

I do not know anything about Forms, but see if this link helps you:
http://www.oracle.com/technetwork/devel ... 133585.pdf
Good luck,

Sergio
BCR
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 25
Joined: Thu, 22 Nov 2012 1:40 pm
Location: Patos de Minas
Breno Cristovão Rocha.

beleza, I'll take a look ...

But I left for DBLink

I have two errors:

Select all

ORA-28545: erro diagnosticado pelo Net8 ao conectar com um agenteUnable to retrieve text of NETWORK/NCR message 65535 
ORA-02063: precedendo 2 lines a partir de MYSQL
I installed the MySQL driver ...

where I created the ODBC connection in the operating system, I can test it! This OK

Then I created in the directory:

Select all

 D:\oracle11gr2One\product\11.2.0\dbhome_1\hs\admin 
The initmysql.ora file

with content

Select all

HS_FDS_CONNECT_INFO = mysql 
HS_FDS_TRACE_LEVEL = 0

In the Listener file.

Add

Select all

 
SID_LIST_LISTENER = 
  (SID_LIST = 
    (SID_DESC = 
      (SID_NAME = PLSExtProc) 
      (ORACLE_HOME = D:\oracle11gr2One\product\11.2.0\dbhome_1) 
      (PROGRAM = extproc) 
    ) 
    (SID_DESC = 
      (SID_NAME = CLRExtProc) 
      (ORACLE_HOME = D:\oracle11gr2One\product\11.2.0\dbhome_1) 
      (PROGRAM = extproc) 
    ) 
    (SID_DESC = 
      (SID_NAME = mysql) 
      (ORACLE_HOME = D:\oracle11gr2One\product\11.2.0\dbhome_1) 
      (PROGRAM = dg4odbc) 
    ) 
  )

and in the tnsnamese file.ora

the content

Select all

mysql = 
        (DESCRIPTION= 
        (ADDRESS=(PROTOCOL=tcp) (HOST= 192.168.0.210) (PORT=1521)) 
        (CONNECT_DATA=   (SID=mysql)   ) 
               (HS=OK) 
        ) 
knows about dblink to give me a help ... I'm making an oracle connection to mysql

I used this youtube link as help ...
if any knew how to give a help aí! please !!
Hugs
User avatar
stcoutinho
Moderador
Moderador
Posts: 850
Joined: Wed, 11 May 2011 5:15 pm
Location: são Paulo - SP

BCR,

View this link, maybe can help you:


Fábio Prado also has an interesting article explaining how to create a dblink:
http://www.fabioprado.net/2013/12/crian ... essar.html
Hugs,

Coutinho
BCR
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 25
Joined: Thu, 22 Nov 2012 1:40 pm
Location: Patos de Minas
Breno Cristovão Rocha.

I got the Oracle DBLink connection with mysql!

Only the connection is instable ... She gets lost!

Select all

ora-28500: conexão do Oracle com um sistema não Oracle retornou esta mensagem:  
ora-02063: precedendo line a partir de MYSQL

Searching deeper, I saw that it may be the parameter

Select all

 DISTRIBUTED_TRANSACTIONS 
I could not identify where I change the distributed_transactions ... Where do I find it?

Hugs Galera and Thanks for the Help!
BCR
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 25
Joined: Thu, 22 Nov 2012 1:40 pm
Location: Patos de Minas
Breno Cristovão Rocha.

The link where I found professionals reporting the same problem is this here.:

http://profissionaloracle.com.br/gpo/se ... t&type=raw
User avatar
stcoutinho
Moderador
Moderador
Posts: 850
Joined: Wed, 11 May 2011 5:15 pm
Location: são Paulo - SP

BCR,

I have consulted some notes. The reasons can be several.

Something:

- Use of alias in the update / delete commands
ex:

Select all

DELETE FROM "NOME_BANCO".TABELA A1);
- I do not identify the MySQL Bank where the table (syntax would be "name_banco" .nome_tabela, with double quotation marks);

If you can not solve the problem, then post here the command you are trying to run and that you are returning with error.

at

Sergio
BCR
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 25
Joined: Thu, 22 Nov 2012 1:40 pm
Location: Patos de Minas
Breno Cristovão Rocha.

beleza ...

The code I try to execute is.:

Select all

select * from "newsletter"@mysql
I can return values ??with this select normally ... only from here a 1 if you run it again the error occurs

Select all

 
ora-28500: conexão do Oracle com um sistema não Oracle retornou esta mensagem:  
ora-02063: precedendo line a partir de MYSQL
in SQL * plus soon again and presents following message.:

Select all

 
ERROR: ORA-28500: conexão do ORACLE com um sistema não Oracle retornou esta mensagem: [MySQL][ODBC 5.3(a) Driver] MySQL server has 
gone away{HY000,NativeErr = 2006} ORA-02063: precedendo 2 lines a partir de MYSQL
Then I perform Connection again: Conn Name / Password
AI Returns me that I am connected ...

beleza ... As soon as you return me that I am connected if you run the select I described above ... the return is perfect without any problem ...

only from here 1 min, 2 min I have to ask for connection again ...

If you have not explained clearly .... let me know that I try to clarify better!
Bratis
BCR
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 25
Joined: Thu, 22 Nov 2012 1:40 pm
Location: Patos de Minas
Breno Cristovão Rocha.

After much try ...

I was able to improve and much the connection ...

in the ODBC data source administrator, when requesting to set up your Connection already configured previously ... There is a button named "Details"

On the Connection tab I marked three options.:

Select all

Enable automatic reconnect  
Don't prompt when connecting 
Allow multiple statements

After marking these three options, the connection does not fall as quoted above! : -The

I hope you can help someone who needs this solution ...

Thanks to everyone who tried to help!
Bratis !!!
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 7 guests