<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.aras.com/community/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Implement a method that calls a method in a DLL</title><link>https://www.aras.com/community/f/development/6649/implement-a-method-that-calls-a-method-in-a-dll</link><description>Hi all , 
 Please how to Implement a method that calls a method in a DLL? Thanks .</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: Implement a method that calls a method in a DLL</title><link>https://www.aras.com/community/thread/4192?ContentTypeID=1</link><pubDate>Thu, 16 Jan 2020 06:16:42 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:d920e790-3408-4dce-8ab9-30c106924c9e</guid><dc:creator>Suhas</dc:creator><description>&lt;p&gt;Hi Hammami,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I seen your code and it is &lt;strong&gt;windows forms application&lt;/strong&gt;. You can&amp;#39;t inject Windows Form Application in Aras&amp;nbsp;because Aras is web application(asp application) instead of windows forms application create &lt;strong&gt;Class library&lt;/strong&gt; Project.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " border="0" src="/cfs-file/__key/communityserver-discussions-components-files/3/Class-library.png" /&gt;&lt;/p&gt;
&lt;p&gt;Create one method in your class library as shown in below screen shot&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " border="0" src="/cfs-file/__key/communityserver-discussions-components-files/3/lib-application.png" /&gt;&lt;/p&gt;
&lt;p&gt;Compile your project. OracleDBConnection dll will create.&lt;/p&gt;
&lt;p&gt;1. Copy the &lt;span&gt;OracleDBConnection dll&lt;/span&gt; in server bin folder&amp;nbsp;&lt;span&gt;&amp;nbsp;e.g.(C:\Program Files (x86)\Aras\Innovator\Innovator\Server\bin).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Register your dll in method-config.xml file&amp;nbsp;(C:\Program Files (x86)\Aras\Innovator\Innovator\Server)&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;1. Open&amp;nbsp;method-config.xml file :&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2. Add your dll the namespace under &amp;lt;ReferencedAssemblies&amp;gt; xml tag&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3. Add your dll reference in &amp;lt;Template name=&amp;quot;CSharp&amp;quot;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;4.&amp;nbsp;&lt;/span&gt;&lt;span&gt;Create your method in Aras and call your dll method from aras method.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If you have any doubt in this then please refer my second comments which is mention for calculation.dll&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It is possible in Aras to connect with Oracle database without creating DLL also.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;1. Register&amp;nbsp;System.Data.OracleClient dll in aras. (I already mention how to register dll in Aras)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2. Create server side method in Aras and write your connection code.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Suhas.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implement a method that calls a method in a DLL</title><link>https://www.aras.com/community/thread/4191?ContentTypeID=1</link><pubDate>Wed, 15 Jan 2020 15:03:56 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:dc72ad95-df7b-4a8e-b55f-19c5f5dbdd70</guid><dc:creator>hammami</dc:creator><description>&lt;p&gt;i created method in visuel studio connected the database Oracle&amp;nbsp;this method connect get data from table :&amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;private void button4_Click(object sender, EventArgs e)&lt;br /&gt; {&lt;br /&gt; try&lt;br /&gt; {&lt;br /&gt; OracleConnection conn = new OracleConnection(&amp;quot;DATA SOURCE=localhost:1521/orcl;USER ID=SYSTEM;password=khouloud&amp;quot;);&lt;/p&gt;
&lt;p&gt;OracleCommand cmd = new OracleCommand();&lt;br /&gt; cmd.Connection = conn;&lt;br /&gt; cmd.CommandText = &amp;quot;Select currentstate from xtransfer where articlenumber=15&amp;quot;;&lt;br /&gt; conn.Open();&lt;br /&gt; cmd.ExecuteNonQuery();&lt;br /&gt; OracleDataReader dr = cmd.ExecuteReader();&lt;br /&gt; dr.Read();&lt;br /&gt; textBox3.Text = dr.GetString(0);&lt;br /&gt; conn.Close();&lt;br /&gt; &lt;br /&gt; MessageBox.Show(&amp;quot;ok&amp;quot;);&lt;br /&gt; }&lt;br /&gt; catch (Exception ex)&lt;br /&gt; {&lt;br /&gt; MessageBox.Show(ex.Message);&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;* the project work fine with database&lt;/p&gt;
&lt;p&gt;* i build the project and i configure the DLL&amp;nbsp;&lt;/p&gt;
&lt;p&gt;* i need method aras c# that get this data from the database oracle using this DLL! if it is possible&amp;nbsp; I don&amp;#39;t&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;know .&lt;/p&gt;
&lt;p&gt;* if you have another idea to get data from oracle data base please tell me .&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implement a method that calls a method in a DLL</title><link>https://www.aras.com/community/thread/4190?ContentTypeID=1</link><pubDate>Wed, 15 Jan 2020 14:42:11 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:b49f53fd-6d46-4333-9ed6-4249f60dd5e7</guid><dc:creator>Suhas</dc:creator><description>&lt;p&gt;It means you want to connect Aras &amp;amp; oracle database with the help of DLL? Can you please elaborate your use case?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implement a method that calls a method in a DLL</title><link>https://www.aras.com/community/thread/4188?ContentTypeID=1</link><pubDate>Wed, 15 Jan 2020 11:03:57 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:0d2de9ba-784a-465a-87e8-aa9ac2f981d1</guid><dc:creator>hammami</dc:creator><description>&lt;p&gt;Hi suhas i ask you,&amp;nbsp; have you idea, the DLL work in aras Method with program that connect database oracle in VS? Contact me .&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implement a method that calls a method in a DLL</title><link>https://www.aras.com/community/thread/4114?ContentTypeID=1</link><pubDate>Tue, 17 Dec 2019 09:16:46 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:5c31cecf-51df-4d0e-939c-a6044069055e</guid><dc:creator>Hafedh_Elfaleh</dc:creator><description>&lt;p&gt;i&amp;#39;m really grateful to you ..&lt;br /&gt;thank you Suhas&amp;nbsp;&lt;br /&gt;it works now perfectly&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implement a method that calls a method in a DLL</title><link>https://www.aras.com/community/thread/4095?ContentTypeID=1</link><pubDate>Fri, 13 Dec 2019 12:01:14 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:e5cfdecd-2959-41df-b044-f127efac320c</guid><dc:creator>Suhas</dc:creator><description>&lt;p&gt;Hello Hafedh,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In which .net framework version you compiled your dll?&lt;/p&gt;
&lt;p&gt;Please make sure your dll should be compiled in .net framework 4.0.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Suhas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implement a method that calls a method in a DLL</title><link>https://www.aras.com/community/thread/4094?ContentTypeID=1</link><pubDate>Fri, 13 Dec 2019 10:31:29 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:9911b576-d01f-487f-9bea-fce6061e2a3a</guid><dc:creator>Hafedh_Elfaleh</dc:creator><description>&lt;p&gt;sorry Suhas i get this error&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;/p&gt;
&lt;div class="_1i6a"&gt;
&lt;div class="_4po3 _4poa"&gt;
&lt;div class="_4po5"&gt;
&lt;div class="_4po8"&gt;
&lt;div class="_4po9"&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div class="_4tdt _ua1"&gt;
&lt;div class="_ua2"&gt;
&lt;div class="_4tdv"&gt;
&lt;div class="_5wd4 _1nc7"&gt;
&lt;div class="._1dlq _h8t"&gt;
&lt;div class="_5wd9 direction_ltr clearfix"&gt;
&lt;div class="_1e-x _n4o"&gt;
&lt;div class="_3_bl"&gt;
&lt;div class="_5w1r _3_om _5wdf"&gt;
&lt;div class="_4gx_"&gt;
&lt;div class="_1aa6"&gt;
&lt;div class=""&gt;&lt;span class="_5yl5"&gt;&lt;span&gt;ERROR: 1F64D1109E164634B4EEC722E9053555.&lt;br /&gt;Details in 6 temporary files&lt;br /&gt;D:\git\smartrac\smt_fork_firas\Innovator\Server\dll\dfl3iarj&lt;br /&gt;Line number 7, Error Number: CS0012, The type &amp;#39;System.Object&amp;#39; is defined in an assembly that is not referenced. You must add a reference to assembly &amp;#39;System.Runtime, Version=&lt;a href="https://l.facebook.com/l.php?u=http%3A%2F%2F4.0.20.0%2F%3Ffbclid%3DIwAR0UmOlSC1Bz3J77wZqBilwmEalUgB2w7zGLx2FG7ZimWgLrz5Qjkkk-HcY&amp;amp;h=AT2z6YpGKjOMj4cxNqK8oeirPVmIR25zxS6ywT5BOc-V60uFOhM1eIJjzCOhrntuIKK95oNOTmhuuIyTrq8wvdoAHpt-JXzwP_mQNF_gO4hlcF8dLyPuROvbXlaxYDPJQKqh1g" rel="nofollow noopener noreferrer" target="_blank"&gt;4.0.20.0&lt;/a&gt;, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&amp;#39;&lt;/span&gt;&lt;/span&gt;&amp;quot;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implement a method that calls a method in a DLL</title><link>https://www.aras.com/community/thread/4070?ContentTypeID=1</link><pubDate>Wed, 11 Dec 2019 07:48:40 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:7d9ef0b1-55a7-4996-b5aa-fa4b24bab5ac</guid><dc:creator>Hafedh_Elfaleh</dc:creator><description>&lt;p&gt;thanks Suhas . it&amp;#39;s a useful hint.:)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implement a method that calls a method in a DLL</title><link>https://www.aras.com/community/thread/4068?ContentTypeID=1</link><pubDate>Wed, 11 Dec 2019 06:16:16 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:fbc79dc6-11c9-49c7-8041-e83775b8af23</guid><dc:creator>Suhas</dc:creator><description>&lt;p&gt;Below is the link for how to create DLL in VS:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a title="How to create DLL in VS" href="https://www.c-sharpcorner.com/UploadFile/1e050f/creating-and-using-dll-class-library-in-C-Sharp/"&gt;https://www.c-sharpcorner.com/UploadFile/1e050f/creating-and-using-dll-class-library-in-C-Sharp/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;1. Copy the calculation.dll in server bin folder&amp;nbsp;&lt;span&gt;&amp;nbsp;e.g.(C:\Program Files (x86)\Aras\Innovator\Innovator\Server\bin).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Register your dll in method-config.xml file&amp;nbsp;(C:\Program Files (x86)\Aras\Innovator\Innovator\Server)&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;1. Open&amp;nbsp;method-config.xml file :&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2. Add your dll the namespace under &amp;lt;ReferencedAssemblies&amp;gt; xml tag&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/3/12_2D00_11_2D00_2019-11_2D00_32_2D00_46-AM.png" /&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3. Add your dll reference in &amp;lt;Template name=&amp;quot;CSharp&amp;quot;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/3/12_2D00_11_2D00_2019-11_2D00_36_2D00_40-AM.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Create your method in Aras and call your dll method from aras method.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/3/12_2D00_11_2D00_2019-11_2D00_43_2D00_38-AM.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks and regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Suhas&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implement a method that calls a method in a DLL</title><link>https://www.aras.com/community/thread/4059?ContentTypeID=1</link><pubDate>Tue, 10 Dec 2019 13:00:26 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:2d92d440-da51-4135-af49-00c2e897de48</guid><dc:creator>Hafedh_Elfaleh</dc:creator><description>&lt;p&gt;thank you Suhas for the reply&amp;nbsp;&lt;br /&gt;can you please provide me by an example that explain me more about how&amp;nbsp; to create the aras method that calls the dll method.&lt;br /&gt;thanks .&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implement a method that calls a method in a DLL</title><link>https://www.aras.com/community/thread/4057?ContentTypeID=1</link><pubDate>Tue, 10 Dec 2019 11:39:14 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:4ecc2207-2acb-4c70-b66f-4a98e84c9dec</guid><dc:creator>Suhas</dc:creator><description>&lt;p&gt;Hello&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;Hafedh,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;1. Create your own dll using ClassLibrary application with the help of VS.&lt;/p&gt;
&lt;p&gt;2. Copy your dll into&amp;nbsp;Server&amp;nbsp;bin folder e.g.(C:\Program Files (x86)\Aras\Innovator\Innovator\Server\bin).&lt;/p&gt;
&lt;p&gt;3. Register your dll in method-config.xml file&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;(C:\Program Files (x86)\Aras\Innovator\Innovator\Server)&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;4.&amp;nbsp;Create your own method in aras and in that method&amp;nbsp;create object of dll class and call your method by using newly created object.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks and regards,&lt;/p&gt;
&lt;p&gt;Suhas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>