Hi,
I need to connect to SQL Server database from Oracle Forms. I tried using the ODBC data source and the connection established successfully, but I was not able to connect to the database from just inside the Oracle Forms.
Should I have Open Client Adapter to be installed on my machine, if so, please direct me to the website so I can download it as I was not able to find it.
Below is the code I use in Oracle Forms to connect to the database.
Declare
Connection_id EXEC_SQL.ConnType;
Begin
connection_id := EXEC_SQL.OPEN_CONNECTION(username/password@ODBC:data_source_name);
if EXEC_SQL.IS_CONNECTED(connection_id) then
msgbox('Connected');
else
msgbox('ERROR: No connection established');
end if;
Exception
when others then
msgbox(sqlerrm);
msgbox('ERROR: No connection established');
end;
Thank you and appreciate your help.