[Solved] TOracleConnection: how to set SERVICE NAME lazarus / 16-Databases ---------------------------------------------------------------------- dokhebi · 2012-12-26 23:47 I'm rather new to Lazarus/FPC and I'm trying everything I can to get a handle on this RAD tool.  I'm stumbling over a lack of good documentation so please be patient. I want to connect to an Oracle database (10g, I think) with all of the drivers already installed on the PC.  I set the DatabaseName and HostName properties, but I can't find any place to set the SERVICE NAME.  I tried copying the entire contents of tnsnames.ora (stolen from a VB app) into Params but when I set Connected to TRUE I get the following error message QuoteOracleConnection1 : ORA-12154: TNS:could not resolve service name I've done a search on this site and the web in general looking for help but all I find are either messages like "Examples exist" and no examples or places where people have a connection already and are having other issues. I am using: WinXP Pro (SP3) / Lazarus 1.0.4 / FPC 2.6.0 ---------------------------------------------------------------------- dokhebi · 2012-12-27 00:46 Through trial and error I found out that the HostName property is the place to put this information.  The property should be set like this: hostname:port/servicename Are the available docs end-user editable?  I want to make changes as I find answers. ---------------------------------------------------------------------- otorres · 2012-12-27 03:47 This component to connect with Oracle works very good, i was test it 6 monts ago, but is very difficult configurate TNS names in the Oracle Client Libraries, you need download OCI from here and config Oracle TNS Name here, you need make a lot of steps for use it, i think is better use AnyDAC for Access to Oracle, these components have direct access with out configuration or any external libraries. Regards, PD: Sorry for my bad english. ---------------------------------------------------------------------- BigChimp · 2012-12-27 07:53 Quote from: dokhebi on December 27, 2012, 01:46:26 amThrough trial and error I found out that the HostName property is the place to put this information.  The property should be set like this: hostname:port/servicename Are the available docs end-user editable?  I want to make changes as I find answers. Yes, thank you; please edit the wiki page on the Oracle connector: http://wiki.lazarus.freepascal.org/oracle (You could just add some text with the info above which would already be very helpful indeed) ---------------------------------------------------------------------- BigChimp · 2012-12-27 07:54 Quote from: otorres on December 27, 2012, 04:47:25 amThis component to connect with Oracle works very good, i was test it 6 monts ago, but is very difficult configurate TNS names in the Oracle Client Libraries, you need download OCI from here and config Oracle TNS Name here, you need make a lot of steps for use it, i think is better use AnyDAC for Access to Oracle, these components have direct access with out configuration or any external libraries. No, you don't need to config Oracle TNS names; you can specify service name dynamically as dokhebi demonstrates. No need to get AnyDAC for that. Tested it myself with Oracle instant client.