quinta-feira, 11 de outubro de 2007

Delphi 2007 + Oracle + BDE

Hello guys,

Today I`ve to solve a problem to a friend mine. The problem was stabilish an oracle connection usins bde synce he was migrating his application from Delphi 7 to Delphi 2007.

1º: Be sure that your Delphi 2007 is not the professional version, becuse the professional doesnt allows connections with oracle database.

2º: Install the oracle client.

3º: Copy the file -> C:\oracleexe\app\oracle\product\10.2.0\server\network\admin\tnsnames.ora that is located on the machine that has the oracle server installed to the folder C:\XEClient\Network\admin\tnsnames.ora of the client machine.

4º: if your bdeadmin doesnt show the native oracle driver (Configuration->Native Drivers->ORACLE), reinstalle your BDE and it will show.

5º: Open your delphi 2007 and drop a TDatabase component in your form, rigth click it and select the option Database Editor...

6º: Fill the field name with the name of your oracle database. Ex.: DBSystem

7º: Select the ORACLE on the combobox Driver name:.

8º: Fill the field parameter override like bellow:
USER NAME=your_db_username

9º Uncheck the option login prompt of the TDatabase and Connect.

If the TDatabase doesnt connect then reboot your machine. That is BDE :P.

If you are doing this on Windows vista then allways run the bdeadmin with administrator permissions.

Hope it helps someone ;)

Diego M. Garcia.

Nenhum comentário: