Oracle, MySQL, Sybase, Informix and other databaseshttp://forums.asp.net/85.aspx/1?Oracle+MySQL+Sybase+Informix+and+other+databasesUsing Oracle, MySql, Sybase, Informix, Excel, and other products (not having their own forum) as data stores for ASP.NET.Tue, 18 Jun 2013 10:50:45 -0400urn:uuid:00000000-0000-0000-0000-000000000085urn:uuid:00000000-0000-0000-0000-000005428662http://forums.asp.net/p/1915775/5428662.aspx/1?Importing+data+from+ExcelImporting data from Excel <p>Hi all.</p> <p>I'm importing some data from Excel. I open it as an ole database and save the data into a dataset using an sql adaptor.</p> <p>However, some values I'm expecting to be integers (1)&nbsp;are coming up as dates &quot;#1/1/1900#&quot;. The cells in the excel spreadsheet are set as general and are just numbers and not dates.</p> <p>Any ideas on resolving this?</p> <p>My code:</p> <pre class="prettyprint">Dim SQL As String = &quot;SELECT TOP 25 * FROM [Total$]&quot; Dim MyOleDBCommand As New OleDbCommand(SQL, con) Dim adaptor As New OleDbDataAdapter(MyOleDBCommand) Dim MyDataSet As New DataSet adaptor.Fill(MyDataSet, &quot;Total&quot;) For i = 0 To MyDataSet.Tables(0).Rows().Count - 1 If i &gt; 10 Then Dim StoreNo As String = MyDataSet.Tables(0).Rows(i).Item(&quot;F2&quot;).ToString() Dim CustomerName As String = MyDataSet.Tables(0).Rows(i).Item(&quot;F3&quot;).ToString() Dim OrderReceivedDate As Date = ConvertExcelDateType(MyDataSet.Tables(0).Rows(i).Item(&quot;F4&quot;).ToString()) Dim PONo As String = MyDataSet.Tables(0).Rows(i).Item(&quot;F5&quot;).ToString() Dim InvoiceNo As String = MyDataSet.Tables(0).Rows(i).Item(&quot;F6&quot;).ToString() Dim ContainerNo As String = MyDataSet.Tables(0).Rows(i).Item(&quot;F7&quot;).ToString() Dim ShipmentDepart As Date = ConvertExcelDateType(MyDataSet.Tables(0).Rows(i).Item(&quot;F8&quot;)) Dim ShipmentArrive As Date = ConvertExcelDateType(MyDataSet.Tables(0).Rows(i).Item(&quot;F9&quot;)) Dim ProductionTime As Decimal = Convert.ToDecimal(MyDataSet.Tables(0).Rows(i).Item(&quot;F10&quot;)) Dim OrderToPC As String = MyDataSet.Tables(0).Rows(i).Item(&quot;F11&quot;).ToString() Dim OrderOption As String = MyDataSet.Tables(0).Rows(i).Item(&quot;F12&quot;).ToString() Dim OrderColour As String = MyDataSet.Tables(0).Rows(i).Item(&quot;F13&quot;).ToString() Dim OrderID As Integer = Orders.AddOrder(OrderReceivedDate, New Date, ProductionTime, 0, PONo, ShipmentDepart, ShipmentArrive, 0, StoreNo, CustomerName, OrderToPC, InvoiceNo, ContainerNo, 1) Dim OrderedProductID As Integer = Orders.OrderProduct(OrderID, OrderOption, OrderColour) Dim ModuleHT As New Hashtable Dim CurrentModules As Modules = Modules.GetModules() For j = 0 To CurrentModules.ModuleIDs.Count - 1 'Modules If Not IsDBNull(MyDataSet.Tables(0).Rows(i).Item(CurrentModules.ModuleCelRefs.Item(j))) Then If Integer.TryParse(MyDataSet.Tables(0).Rows(i).Item(CurrentModules.ModuleCelRefs.Item(j)), 0) Then If MyDataSet.Tables(0).Rows(i).Item(CurrentModules.ModuleCelRefs.Item(j)) &gt; 0 Then Orders.AddOrderedModule(OrderedProductID, CurrentModules.ModuleIDs.Item(j), CInt(MyDataSet.Tables(0).Rows(i).Item(CurrentModules.ModuleCelRefs.Item(j)))) End If End If End If Next End If</pre> <p></p> 2013-06-18T14:50:45-04:002013-06-18T14:50:45.297-04:00urn:uuid:00000000-0000-0000-0000-000005428862http://forums.asp.net/p/1915809/5428862.aspx/1?Data+Overflow+The+parameter+data+is+too+large+to+fit+into+the+host+fieldData Overflow The parameter data is too large to fit into the host field &lt;div&gt; <p>I think this issue may be a DB Sql issue rather than a data control issue so I'm going to post the question in here as well.&nbsp; The OleDb connection is to a DB2 database running on an IBM iSeries server...</p> <p>I'm doing parameter substitution into an sql statement which is being used to change the SelectCommand in a SqlDataSource being&nbsp;used to load a&nbsp;&nbsp;GridView.&nbsp;&nbsp;&nbsp;The connection is an OleDb connection.&nbsp;</p> <p>The exception reads... {&quot;Conversion failed for command parameter[0] '' because the data value overflowed the type used by the provider.<br> &quot;}</p> <p>...and the Inner exception reads... CWBZZ5012 Data overflow - the parameter data is too large to fit into the host field</p> <p>...the SQL statement is...</p> <p>SqlDataSource1.SelectCommand =<span color="#a31515" face="Consolas" size="2" style="font-family:Consolas; color:#a31515; font-size:small">&quot;select order, recalled, edte, acct, sub, name, add1, add2, add3, code from lib.tablename t1 where code in ? and edte &gt;= ? and edte &lt;= ? order by t1.order desc&quot;</span></p> <p>...and the parameter substitutions are...</p> <p>SqlDataSource1.SelectParameters.Add(<span color="#a31515" face="Consolas" size="2" style="font-family:Consolas; color:#a31515; font-size:small"><span color="#a31515" face="Consolas" size="2" style="font-family:Consolas; color:#a31515; font-size:small"><span color="#a31515" face="Consolas" size="2" style="font-family:Consolas; color:#a31515; font-size:small">&quot;@codelist&quot;</span></span></span><span face="Consolas" size="2" style="font-family:Consolas; font-size:small">, CodeList)<span face="Consolas" size="2" style="font-family:Consolas; font-size:small"></span></span></p> <p>SqlDataSource1.SelectParameters.Add(<span color="#a31515" face="Consolas" size="2" style="font-family:Consolas; color:#a31515; font-size:small"><span color="#a31515" face="Consolas" size="2" style="font-family:Consolas; color:#a31515; font-size:small"><span color="#a31515" face="Consolas" size="2" style="font-family:Consolas; color:#a31515; font-size:small">&quot;@startingdate&quot;</span></span></span><span face="Consolas" size="2" style="font-family:Consolas; font-size:small">, startingdate)<span face="Consolas" size="2" style="font-family:Consolas; font-size:small"></span></span></p> <p>SqlDataSource1.SelectParameters.Add(<span color="#a31515" face="Consolas" size="2" style="font-family:Consolas; color:#a31515; font-size:small"><span color="#a31515" face="Consolas" size="2" style="font-family:Consolas; color:#a31515; font-size:small"><span color="#a31515" face="Consolas" size="2" style="font-family:Consolas; color:#a31515; font-size:small">&quot;@endingdate&quot;</span></span></span><span face="Consolas" size="2" style="font-family:Consolas; font-size:small">, endingdate)</span></p> <p><span face="Consolas" size="2" style="font-family:Consolas; font-size:small">...with the fields defined in code as...</span></p> <p></p> <p></p> <p></p> <p><span color="#0000ff" face="Consolas" size="2" style="font-family:Consolas; color:#0000ff; font-size:small"><span color="#0000ff" face="Consolas" size="2" style="font-family:Consolas; color:#0000ff; font-size:small"><span color="#0000ff" face="Consolas" size="2" style="font-family:Consolas; color:#0000ff; font-size:small">Dim</span></span></span><span face="Consolas" size="2" style="font-family:Consolas; font-size:small"><span face="Consolas" size="2" style="font-family:Consolas; font-size:small"> CodeList </span></span><span color="#0000ff" face="Consolas" size="2" style="font-family:Consolas; color:#0000ff; font-size:small"><span color="#0000ff" face="Consolas" size="2" style="font-family:Consolas; color:#0000ff; font-size:small"><span color="#0000ff" face="Consolas" size="2" style="font-family:Consolas; color:#0000ff; font-size:small">As </span></span></span><span color="#0000ff" face="Consolas" size="2" style="font-family:Consolas; color:#0000ff; font-size:small">String</span></p> <p><span color="#0000ff" face="Consolas" size="2" style="font-family:Consolas; color:#0000ff; font-size:small"></span><span color="#0000ff" face="Consolas" size="2" style="font-family:Consolas; color:#0000ff; font-size:small"><span color="#0000ff" face="Consolas" size="2" style="font-family:Consolas; color:#0000ff; font-size:small"><span color="#0000ff" face="Consolas" size="2" style="font-family:Consolas; color:#0000ff; font-size:small">Dim</span></span></span><span face="Consolas" size="2" style="font-family:Consolas; font-size:small"><span face="Consolas" size="2" style="font-family:Consolas; font-size:small"> startingdate </span></span><span color="#0000ff" face="Consolas" size="2" style="font-family:Consolas; color:#0000ff; font-size:small"><span color="#0000ff" face="Consolas" size="2" style="font-family:Consolas; color:#0000ff; font-size:small"><span color="#0000ff" face="Consolas" size="2" style="font-family:Consolas; color:#0000ff; font-size:small">As </span></span></span><span color="#0000ff" face="Consolas" size="2" style="font-family:Consolas; color:#0000ff; font-size:small">String</span><br> <span color="#0000ff" face="Consolas" size="2" style="font-family:Consolas; color:#0000ff; font-size:small"><span color="#0000ff" face="Consolas" size="2" style="font-family:Consolas; color:#0000ff; font-size:small"><span color="#0000ff" face="Consolas" size="2" style="font-family:Consolas; color:#0000ff; font-size:small">Dim</span></span></span><span face="Consolas" size="2" style="font-family:Consolas; font-size:small"><span face="Consolas" size="2" style="font-family:Consolas; font-size:small"> endingdate </span></span><span color="#0000ff" face="Consolas" size="2" style="font-family:Consolas; color:#0000ff; font-size:small"><span color="#0000ff" face="Consolas" size="2" style="font-family:Consolas; color:#0000ff; font-size:small"><span color="#0000ff" face="Consolas" size="2" style="font-family:Consolas; color:#0000ff; font-size:small">As</span></span></span><span color="#0000ff" face="Consolas" size="2" style="font-family:Consolas; color:#0000ff; font-size:small">String</span></p> <p></p> <p>...and viewing the contents of the fields in debug reveals...</p> <p>CodeList value is ('CCM', 'CCS', 'CDR', 'CIR', 'CLM', 'CLP', 'CMC', 'CML', 'CMS', 'CNI', 'CRB', 'CRD', 'CRW', 'CTP', 'CTU')</p> <p>startingdate value is 6/3/2013</p> <p>endingdate value is 6/7/2013</p> <p>Looks like it is failing on CodeList substition...can someone tell me why and what I need to do to make it work?</p> <p>As well, the assembled SQL statement runs sucessfully when I run it on the server.</p> <p>Thanks much in advance for any help, Roscoe</p> &lt;/div&gt; 2013-06-18T17:47:29-04:002013-06-18T17:47:29.873-04:00urn:uuid:00000000-0000-0000-0000-000005427457http://forums.asp.net/p/1915487/5427457.aspx/1?deploying+website+deploying website <p>i created a website using oracle everything was working fine on my local machine</p> <p>when i tried to publish it to a remote server i could not so i copy and past the directory to the iis wwroot directory when i try to run it&nbsp;</p> <p>it gave me the following error what could i do</p> <p></p> <h1>Server Error in '/' Application.</h1> <hr width="100%" color="silver" size="1"> <h2><i>Configuration Error</i></h2> <p><span face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif " style="font-family:Arial,Helvetica,Geneva,SunSans-Regular,sans-serif"><span face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif " style="font-family:Arial,Helvetica,Geneva,SunSans-Regular,sans-serif"><b>Description: </b>An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. <br> <br> <b>Parser Error Message: </b>Could not load file or assembly 'Oracle.Web, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.<br> <br> <b>Source Error:</b> <br> <br> </span></span></p> <table width="100%" bgcolor="#ffffcc"> <tbody> <tr> <td> <pre>Line 58: &lt;add assembly=&quot;System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089&quot; /&gt; Line 59: &lt;add assembly=&quot;System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35&quot; /&gt; <span color="red" style="color:red">Line 60: &lt;add assembly=&quot;Oracle.Web, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89B483F429C47342&quot; /&gt; </span>Line 61: &lt;add assembly=&quot;System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089&quot; /&gt;&lt;/assemblies&gt; Line 62: &lt;buildProviders&gt;</pre> </td> </tr> </tbody> </table> <p><span face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif " style="font-family:Arial,Helvetica,Geneva,SunSans-Regular,sans-serif"><span face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif " style="font-family:Arial,Helvetica,Geneva,SunSans-Regular,sans-serif"><br> <b>Source File: </b>C:\inetpub\wwwroot\web.config<b> &nbsp;&nbsp; Line: </b>60 <br> <br> <b>Assembly Load Trace:</b> The following information can be helpful to determine why the assembly 'Oracle.Web, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342' could not be loaded.<br> <br> </span></span></p> <table width="100%" bgcolor="#ffffcc"> <tbody> <tr> <td> <pre>WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. </pre> </td> </tr> </tbody> </table> <p><span face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif " style="font-family:Arial,Helvetica,Geneva,SunSans-Regular,sans-serif"><span face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif " style="font-family:Arial,Helvetica,Geneva,SunSans-Regular,sans-serif"><br> </span></span></p> <hr width="100%" color="silver" size="1"> <p><span face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif " style="font-family:Arial,Helvetica,Geneva,SunSans-Regular,sans-serif"><b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.4016; ASP.NET Version:2.0.50727.4016&nbsp;</span></p> 2013-06-17T13:22:30-04:002013-06-17T13:22:30.177-04:00urn:uuid:00000000-0000-0000-0000-000005426365http://forums.asp.net/p/1915241/5426365.aspx/1?Passwords+Passwords.. <p>Hi I get an error connecting to the database server, wonder what is the reason</p> <p><em><strong>Authentication with old password no longer supported, use 4.1 style passwords.</strong></em></p> <p><a href="http://caddeworld.net/"><em>http://caddeworld.net/</em></a></p> <p><span id="result_box" class="short_text" lang="en"><span class="hps">and</span> <span class="hps">the solution</span></span> ??</p> 2013-06-15T19:35:36-04:002013-06-15T19:35:36.437-04:00urn:uuid:00000000-0000-0000-0000-000005422925http://forums.asp.net/p/1913690/5422925.aspx/1?Working+with+EF+for+Oracle+database+Schema+specified+is+not+valid+Working with EF for Oracle database. “Schema specified is not valid” <p>The field in Oracle database is of NUMBER(5), and when I generate EF models from the oracle database, it converts the field into &quot;Int16&quot;. There are some of the rows for that field having values such as &quot;50000&quot;, etc, so Int16 is throwing error for obvious reasons. Now I tried changing it to Int32, and also Decimal in EF models, but it is now giving an error saying -</p> <blockquote> <p>Member Mapping specified is not valid. The type 'Edm.Decimal[Nullable=True,DefaultValue=,Precision=,Scale=]' of member 'Field1' in type 'MyApp_Models.MyTable' is not compatible with 'OracleEFProvider.number</p> </blockquote> <p>Any idea what is wrong here, and what is possible solution of this?</p> <p>Any help on this much appreciated.</p> 2013-06-13T06:33:15-04:002013-06-13T06:33:15.333-04:00urn:uuid:00000000-0000-0000-0000-000005423516http://forums.asp.net/p/1913794/5423516.aspx/1?+MySQL+Exclude+all+the+rows+with+the+same+ID+that+are+within+an+hour[MySQL] Exclude all the rows with the same ID that are within an hour <p>Hi guys, I need suggestion for show from my mysql table only the first row grouped by unique tblID and to exclude all the rows with the same tblID that are within an hour compared to the previous row.</p> <p>E.g.:</p> <pre class="prettyprint">&#43;----------&#43;---------------------&#43; | tblID | theDate | &#43;----------&#43;---------------------&#43; | 77002221 | 2013-06-12 11:17:29 | | 56009055 | 2013-06-12 11:17:29 | | 77002221 | 2013-06-12 11:47:29 | | 77002221 | 2013-06-12 12:17:29 | | 77002221 | 2013-06-12 12:47:29 | &#43;----------&#43;---------------------&#43;</pre> <p>In this example I need show only this output:</p> <pre class="prettyprint">+----------+---------------------+ | tblID | theDate | +----------+---------------------+ | 77002221 | 2013-06-12 11:17:29 | | 56009055 | 2013-06-12 11:17:29 | | 77002221 | 2013-06-12 12:47:29 | +----------+---------------------+ </pre> <p>Because this rows compared to the first row with tblID 77002221 fall within one hour:</p> <pre class="prettyprint">+----------+---------------------+ | tblID | theDate | +----------+---------------------+ | 77002221 | 2013-06-12 11:47:29 | | 77002221 | 2013-06-12 12:17:29 | +----------+---------------------+ </pre> <p>Can you help me?</p> <p>Thank you in advance.</p> <pre class="prettyprint">DROP TABLE IF EXISTS `timediff`; CREATE TABLE `timediff` ( `tblID` int(10) DEFAULT NULL, `theDate` datetime DEFAULT NULL, `id` int(10) NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of timediff -- ---------------------------- INSERT INTO `timediff` VALUES ('77002221', '2013-06-12 11:17:29', '1'); INSERT INTO `timediff` VALUES ('56009055', '2013-06-12 11:17:29', '2'); INSERT INTO `timediff` VALUES ('77002221', '2013-06-12 11:47:29', '3'); INSERT INTO `timediff` VALUES ('77002221', '2013-06-12 12:17:29', '4'); INSERT INTO `timediff` VALUES ('77002221', '2013-06-12 12:47:29', '5');</pre> <p></p> 2013-06-13T14:24:00-04:002013-06-13T14:24:00.587-04:00urn:uuid:00000000-0000-0000-0000-000005390137http://forums.asp.net/p/1905142/5390137.aspx/1?Splitting+comma+separated+string+inside+functionSplitting comma separated string inside function <p>How to split comma separated string into an array which is passed to an oracle function as a parameter and then iterating</p> <p>through every element of array.....&nbsp;</p> <p></p> 2013-05-10T10:27:52-04:002013-05-10T10:27:52.233-04:00urn:uuid:00000000-0000-0000-0000-000005423646http://forums.asp.net/p/1913832/5423646.aspx/1?ORA+01858+a+non+numeric+character+was+found+where+a+numeric+was+expectedORA-01858: a non-numeric character was found where a numeric was expected <p>&nbsp;<br> I have a function that takes in a collection of SearchCriteria Objects: columnName or Key, operator (&lt;, &lt;=, like, etc), and value.</p> <p>The function builds up a Command Object. I made the value a command parameter and now my Unit Tests will not work for Dates. But all of my Unit Tests work against all other datatypes like varchar.</p> <p>In the debugger, one of my date unit tests that fail end up with the cmd looking like this:</p> <p>SELECT * FROM (SELECT DocumentId <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FROM idx1_AuthLetters a <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; INNER JOIN Documents b ON a.DocumentId = b.Id<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE Status in ('L','S','V')&nbsp; AND&nbsp; letter_date &lt;= :1 <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ORDER BY DOCUMENTID ) <br> WHERE RowNum &lt;= 14 I did have the parameter named like :letter_date. But I might have :letter_date &gt;= ### &amp;&amp; :letter_date &lt;= ### where I am looking between two dates. I cannot have the same parameter name twice so I use an i&#43;&#43; counter as parameter name while I am looping through all of my SearchCriteria Objects. Odd to see a parameter named like this I know but it is working for the most part.</p> <p>If I take this and put in my Query Window, and inspect the param value and plug that in:</p> <p>SELECT * FROM (SELECT DocumentId <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FROM idx1_AuthLetters a <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; INNER JOIN Documents b ON a.DocumentId = b.Id <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE Status in ('L','S','V')&nbsp; AND&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; letter_date &lt;= TO_DATE('2013-1-21', 'yyyy-mm-dd') <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ORDER BY DOCUMENTID ) <br> WHERE RowNum &lt;= 14 it works fine. But it will not work from the C# code from my Unit Test. Again this works for all other data types. And it use to work before I parameterized the value in the select statement.</p> <p>Exact error is:</p> <p>{&quot;ORA-01858: a non-numeric character was found where a numeric was expected&quot;}<br> &nbsp;</p> 2013-06-13T16:36:39-04:002013-06-13T16:36:39.32-04:00urn:uuid:00000000-0000-0000-0000-000005423852http://forums.asp.net/p/1913897/5423852.aspx/1?mysql+connector+problemmysql connector problem <p>Hi;<br> I using asp.net 4.0 and mysql for web service.Firstly I download latest version of mysql connector 6.6.5 .After that I install&nbsp;<span>MySQL Library 6.2.5.Because when I used 6.6.5 connector,I encountered trust level problem I succesfully create both of them.When I add reference for 6.2.5 mysql.data.dll to project on host.<br> <br> </span></p> <pre class="prettyprint">Could not load file or assembly 'MySql.Data, Version=6.5.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)</pre> <h2></h2> <p>error in host.I used&nbsp;C:\Program Files (x86)\MySQL\MySQL Connector Net 6.2.5\Assemblies\mysql.data.dll for import project.I checked the GAC folder only exist this folder name&nbsp;v4.0_6.6.5.0__c5687fc88969c44d&nbsp;<br> no file name 6.2.5:<br> Which dll add reference to Vs2012 for succesfully work?&nbsp;<br> My web service doesn't work correctly on host.How can I solve this problem ?<br> <br> Thanks in advance&nbsp;</p> 2013-06-13T22:49:51-04:002013-06-13T22:49:51.447-04:00urn:uuid:00000000-0000-0000-0000-000005423789http://forums.asp.net/p/1913873/5423789.aspx/1?CreateUserWizard+Control+using+OracleCreateUserWizard Control using Oracle <p>I am trying to extend the registration page (u<a href="http://aspnet.4guysfromrolla.com/articles/070506-1.aspx">sing this tutorial</a> ) to add more fields to a separate database.&nbsp;</p> <p>I am using Oracle and but the code below uses MS SQL hence sqlDataSource...&nbsp;</p> <p>Can anyone help me traslate this into oracle? I really don't understand what's going on here. Looks like its inserting a 'UserId' but in which table??&nbsp;</p> <pre class="prettyprint">protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e) { TextBox UserNameTextBox = (TextBox)CreateUserWizardStep2.ContentTemplateContainer.FindControl(&quot;UserName&quot;); SqlDataSource DataSource = (SqlDataSource)CreateUserWizardStep2.ContentTemplateContainer.FindControl(&quot;InsertExtraInfo&quot;); MembershipUser User = Membership.GetUser(UserNameTextBox.Text); object UserGUID = User.ProviderUserKey; DataSource.InsertParameters.Add(&quot;UserId&quot;, UserGUID.ToString()); DataSource.Insert(); }</pre> <p>The way I usually insert items into Oracle using ASP.net is this way (below) but the above code don't look anything like it.</p> <pre class="prettyprint">DataTable dt = new DataTable(); using (OracleConnection con = new OracleConnection(connectionString)) { OracleCommand cmd = new OracleCommand(); string sql = "INSERT INTO UserAddresses (UserId) VALUES (:UserId)"; cmd.Parameters.AddWithValue("userid", uselbl.text); cmd.Connection = con; cmd.CommandText = sql; con.Open(); try { cmd.ExecuteNonQuery(); ErrorMessage.Text = "Successful!"; } catch (Exception ex) { throw new Exception(ex.Message); } }</pre> <p><br> <br> <br> </p> <p></p> 2013-06-13T20:01:04-04:002013-06-13T20:01:04.777-04:00urn:uuid:00000000-0000-0000-0000-000005421302http://forums.asp.net/p/1913312/5421302.aspx/1?ORA+01017+invalid+username+password+logon+deniedORA-01017: invalid username/password; logon denied <p>Hi,</p> <p>I'm trying to obtain data from an Oracle 10g DB, but I've been found a trouble series and now i'm stucked. This is all i've done:</p> <p></p> <p><strong>1. Install Oracle 10g client</strong> (<a href="http://www.oracle.com/technetwork/database/windows/install10104-087102.html">http://www.oracle.com/technetwork/database/windows/install10104-087102.html</a>)</p> <p>Got:</p> <pre lang="text" id="pre4">ORA-12154: TNS:could not resolve the connect identifier specified</pre> <p>It was 'cause i've missing to configure tnsnames, so...</p> <p><strong>2. Configure TNSNAMES.ORA and sqlnet.ora</strong> (both in the same path C:\oracle\product\10.1.0\Client_1\network\ADMIN&nbsp;)</p> <p>TNSNAMES.ORA</p> <pre class="prettyprint">etpschp3=( DESCRIPTION =( ADDRESS=(PROTOCOL=tcp) (HOST=ip_address) (PORT=1528) ) (CONNECT_DATA= (SERVICE_NAME =etpschp3) ) )</pre> <p>sqlnet.ora</p> <pre class="prettyprint">SQLNET.AUTHENTICATION_SERVICES= (NTS) NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)</pre> <p></p> <p></p> <p><strong>3. Add&nbsp;environment variables</strong> ORACLE_HOME and TNS_ADMIN</p> <p><img src="C:\Users\adela.hernandez\Pictures\var.PNG" alt="oracle home" /></p> <p><img src="C:\Users\adela.hernandez\Pictures\var2.PNG" alt="tns admin" /></p> <p><strong>4. Check "Allow inprocess"</strong> on OraOLEDB.Oracle&nbsp;DataProvider&nbsp;</p> <p>Now the error was different:</p> <pre lang="text" id="pre4">ORA-12545: <span>Connect failed because target host or object does not exist</span></pre> &lt;div&gt;<strong>5.</strong> I've got to<strong> add server in HOST file</strong>&lt;/div&gt; &lt;div&gt;&lt;/div&gt; &lt;div&gt;Got new error:&lt;/div&gt; &lt;div&gt; <pre lang="text" id="pre4">ora-01017 invalid username/password logon denied</pre> &lt;div&gt;Actually there's other server with a SQL Server with a linked server with the same user/password that i'm using. Also i've been configured an UDL in my machine, and connection test was successful.&lt;/div&gt; &lt;/div&gt; &lt;div&gt;&lt;/div&gt; &lt;div&gt;I don't get where's my mistake. I get this error in a linked server (in my machine) and in an ASP application using&nbsp;System.Data.OleDb and&nbsp;System.Data.OracleClient.&lt;/div&gt; <p></p> <pre class="prettyprint">string str = "Data Source=etpschp3;Persist Security Info=True;" + "User ID=usr;Password=passwd;"; DataSet ds = new DataSet(); OracleConnection oraCnn = new OracleConnection(str); //("Data Source=etpschp3; User Id=OS_APP; Password=OSS55USER;"); OracleCommand cmd = new OracleCommand("select count(*) from FROM tboss.osst_cust", oraCnn); OracleDataAdapter da = new OracleDataAdapter(cmd); </pre> <pre class="prettyprint">OleDbConnection cn = new OleDbConnection("Provider=MSDAORA;" + "Data Source = etpschp3 ;" + "User ID= usr;" + "Password = passwd;"); OleDbCommand cmd = new OleDbCommand("select count(*) from FROM tboss.osst_cust", cn); OleDbDataAdapter da = new OleDbDataAdapter(cmd); da.Fill(ds); </pre> <p><br> Somebody help!</p> <p>Thanks in advance</p> 2013-06-11T21:59:37-04:002013-06-11T21:59:37.44-04:00urn:uuid:00000000-0000-0000-0000-000005416079http://forums.asp.net/p/1912015/5416079.aspx/1?ODBC+Parameter+ErrorODBC Parameter Error <p>Hi all,</p> <p>I am getting this error: &quot;The OdbcParameter is already contained by another OdbcParameterCollection.&quot; in my DAL class file.<br> <br> I have made website which uses MySQL database and for that I have used ODBC. When I call below mentioned method 'GetValueBySQL' which calls 'PrepareCommand' in which I am getting error at the last line.<br> <br> I tried for solution on google but can't find it. Please help.</p> <pre class="prettyprint">public string GetValueBySQL(string strSQL, params OdbcParameter[] ocmdParms) { OdbcCommand ocmd = new OdbcCommand(); PrepareCommand(ocmd, om_conn, null, strSQL, ocmdParms); string Value = string.Empty; object o = ocmd.ExecuteScalar(); if (!(o == null || o == System.DBNull.Value)) { Value = o.ToString(); } CloseConnect(); return Value; } private void PrepareCommand(OdbcCommand ocmd, OdbcConnection conn, OdbcTransaction trans, string ocmdText, OdbcParameter[] ocmdParms) { if (conn.State != ConnectionState.Open) conn.Open(); ocmd.Connection = conn; ocmd.CommandText = ocmdText; if (trans != null) ocmd.Transaction = trans; ocmd.CommandType = CommandType.Text; if (ocmdParms != null) { ocmd.Parameters.Clear(); foreach (OdbcParameter parameter in ocmdParms) { if ((parameter.Direction == ParameterDirection.InputOutput || parameter.Direction == ParameterDirection.Input) &amp;&amp; (parameter.Value == null)) { parameter.Value = DBNull.Value; } ocmd.Parameters.Add(parameter); } } }</pre> <p><br> Advance thanks,<br> Suraj Joshi.</p> 2013-06-06T05:59:58-04:002013-06-06T05:59:58.347-04:00urn:uuid:00000000-0000-0000-0000-000005418308http://forums.asp.net/p/1912561/5418308.aspx/1?how+to+take+mys+sql+backup+between+two+dates+using+asp+net+c+how to take mys sql backup between two dates using asp.net c# <p>Hi community,</p> <p>i am implemting backup functionality in web application complete database backup is sucessfully done using c# but i</p> <p>I am facing problem as user defined backup date&nbsp; for e.g if want to take backup from 5-june-2013 to 8-june 2013</p> <p>how can i am implement this backup functionality..</p> <p>Thanks...</p> 2013-06-08T07:11:11-04:002013-06-08T07:11:11.13-04:00urn:uuid:00000000-0000-0000-0000-000005420516http://forums.asp.net/p/1913111/5420516.aspx/1?Sql+QuerySql Query <p>hello i have the following error :ORA-01036: illegal variable name/number</p> <p>in below query </p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmdMain.CommandText = &quot; SELECT <strong>:CL_CLASS</strong>&nbsp;&nbsp; &nbsp; &quot; &amp; _<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot; FROM&nbsp;&nbsp; TABLE1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot; &amp; _</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot; WHERE&nbsp; COUNTRY = 'Brazil' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot; &amp; _<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot; AND&nbsp;&nbsp;&nbsp; POLICYSEQ = 1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot; &amp; _<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot; AND&nbsp;&nbsp;&nbsp; ROWNUM = 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmdMain.Parameters.Add(&quot;:CL_CLASS&quot;, OracleType.NVarChar, 1).Value = CL_CLASS</p> <p></p> <p>please help i think the error when using the <strong>symbol :</strong></p> 2013-06-11T09:20:54-04:002013-06-11T09:20:54.477-04:00urn:uuid:00000000-0000-0000-0000-000005419918http://forums.asp.net/p/1912965/5419918.aspx/1?textbox+checkbox+dropdownlist+values+insert+into+Oracle+dbtextbox/checkbox/dropdownlist values, insert into Oracle db <p>I have created my Oracle DB, and established the connection within my visual studio. (call it TEST_DB)...</p> <p>Now say I have 1 textbox (Name), 1 checkbox (gender), and 1 dropdownlist (state),</p> <p>What is the c# code to take the entered values after SubmitButton was clicked, and insert them into my oracle DB Columns?...</p> <p></p> <p>thanks in advance</p> 2013-06-10T18:37:54-04:002013-06-10T18:37:54.813-04:00urn:uuid:00000000-0000-0000-0000-000005418943http://forums.asp.net/p/1912750/5418943.aspx/1?Reading+phpBB+postsReading phpBB posts <p>Hi all,</p> <p></p> <p>My question put simply: I have a phpBB board on my server. I want to read the latest news announcement from it and display it on my web site's main page. Everything's fine and dandy; topic title, timestamps, reply counts etc. all work, except for the actual post contents.</p> <p>Let's say the post text is something along the lines of &quot;Lorem ipsum dolor sit amet, consectetur bla bla&quot;. What my code actually returns is not that but some garbled version like &quot;57656C6C2C2049206775657373207468697320&quot;.</p> <p>Code (see below) in short: Grab the last topic's (sorting by timestamp, descending, limit 1 = latest topic) metadata from the phpbb_topics table, get the post ID of the topic's first post, and then look that post's text up in the phpbb_posts table.</p> <p>`phpbb_posts`.`post_text` is a mediumtext utf8_bin (this is the column where the reading apparently goes wrong). The only other text field I'm reading from is `phpbb_topics`.`topic_title`, which is a varchar(255) utf8_general_ci. I'm lead to believe that it has something to do with the post_text column having a binary collation, but I don't know how to fix the reading problem.</p> <p>Using MySQL 5.</p> <p>VB.NET code:</p> <pre class="prettyprint">Public Function GetLastNewsPost() As System.Collections.Generic.List(Of Object) Dim Result As New System.Collections.Generic.List(Of Object) Dim NewsTitle As String = &quot;&quot;, NewsID As Integer, NewsTime As Long, NewsReplies As Integer Dim NewsText As String = &quot;&quot;, NewsFirstPostID As Integer Try ' Generate SQL database connection and open. Dim SQLConn As New OdbcConnection(&quot;Driver={MySQL ODBC 3.51 Driver};Server=localhost;Database=xxxxx;Uid=xxxxx;Pwd=xxxxx;&quot;) SQLConn.Open() Dim SQLCommand As New OdbcCommand(&quot;SET NAMES 'utf8';&quot;, SQLConn) SQLCommand.ExecuteNonQuery() SQLCommand.Dispose() ' Create a reader Dim Reader As OdbcDataReader = Nothing ' Create SQL query. SQLCommand = New OdbcCommand(&quot;SELECT `topic_id`, `topic_title`, `topic_time`, `topic_replies`, `topic_first_post_id` FROM `phpbb_topics` WHERE `forum_id`=2 ORDER BY `topic_time` DESC LIMIT 1&quot;, SQLConn) Try ' Generate a reader Reader = SQLCommand.ExecuteReader If Reader.HasRows AndAlso Reader.Read Then ' read only the latest post NewsID = Reader.GetInt32(0) NewsTitle = Reader.GetString(1) NewsTime = Reader.GetInt64(2) NewsReplies = Reader.GetInt32(3) NewsFirstPostID = Reader.GetInt32(4) SQLCommand.Dispose() Reader.Close() ' Create SQL query. SQLCommand = New OdbcCommand(&quot;SELECT `post_text` FROM `phpbb_posts` WHERE `post_id`=&quot; &amp; NewsFirstPostID &amp; &quot; LIMIT 1&quot;, SQLConn) Reader = SQLCommand.ExecuteReader If Reader.HasRows AndAlso Reader.Read Then NewsText = Reader.GetString(0) End If SQLCommand.Dispose() End If Finally SQLConn.Close() If Reader IsNot Nothing Then Reader.Close() End Try Catch ex As Exception ' DB error NewsTitle = &quot;&lt;Database error occurred: &quot; &amp; ex.GetType.FullName &amp; &quot;&gt;&quot; End Try Result.Add(NewsID) Result.Add(HttpUtility.HtmlEncode(NewsTitle)) Result.Add(NewsTime) Result.Add(NewsReplies) Result.Add(HttpUtility.HtmlEncode(NewsText)) Return Result End Function</pre> <p></p> <p>If anyone could give me some ideas, that would be awesome.</p> <p>Thanks!<br> <br> </p> 2013-06-09T17:43:00-04:002013-06-09T17:43:00.963-04:00urn:uuid:00000000-0000-0000-0000-000005409781http://forums.asp.net/p/1910604/5409781.aspx/1?Form+in+ASPX+to+MySQL+DB+Form in ASPX to MySQL DB <p>I have started a website on Visual Studio using Visual C#. ASP.NET Web Forms Site. &nbsp;I also have a MySQL database that I would like the form I create to alter. &nbsp;I have the form, here's a snippet:&nbsp;</p> <pre class="prettyprint">&lt;form id=&quot;form1&quot; runat=&quot;server&quot; method=&quot;post&quot; action=&quot;dbconnect.cs&quot;&gt; &lt;div&gt; &lt;label&gt;Type the project title here&lt;/label&gt; &lt;br /&gt; &lt;textarea id=&quot;projectTitle&quot;&gt;&lt;/textarea&gt;</pre> <p>I know I don't have the code right for the action because I'm new to this, although I have gotten the dbconnect.cs to change the MySQL db on it's own by hardcoding it. &nbsp;I just don't know how to make the connection between the form and the dbconnect.cs.</p> <p>I'd like to be able to do an INSERT for my database when I go to dbconnect.cs.</p> <p>dbconnect.cs snippet:</p> <pre class="prettyprint">using System; using System.Collections.Generic; using System.Text; using System.Windows.Forms; using System.Diagnostics; using System.IO; //Add MySql Library using MySql.Data.MySqlClient; namespace ConnectCsharpToMysql { class DBConnect { private MySqlConnection connection; private string server; private string database; private string uid; private string password; //Constructor public DBConnect() { Initialize(); } //Initialize values private void Initialize() { server = "servername"; database = "databasename"; uid = "username"; password = "password"; string connectionString; connectionString = "SERVER=" + server + ";" + "DATABASE=" + database + ";" + "UID=" + uid + ";" + "PASSWORD=" + password + ";"; connection = new MySqlConnection(connectionString); } //open connection to database private bool OpenConnection() { try { connection.Open(); return true; } catch (MySqlException ex) { //When handling errors, you can your application's response based on the error number. //The two most common error numbers when connecting are as follows: //0: Cannot connect to server. //1045: Invalid user name and/or password. switch (ex.Number) { case 0: MessageBox.Show("Cannot connect to server. Contact administrator"); break; case 1045: MessageBox.Show("Invalid username/password, please try again"); break; } return false; } } //Close connection private bool CloseConnection() { try { connection.Close(); return true; } catch (MySqlException ex) { MessageBox.Show(ex.Message); return false; } } //Insert statement public void Insert() { string query = "INSERT INTO TestTable (idTestTable, itemA, itemB) VALUES(5, 'Hey Smith', '22')"; //open connection if (this.OpenConnection() == true) { //create command and assign the query and connection from the constructor MySqlCommand cmd = new MySqlCommand(query, connection); //Execute command cmd.ExecuteNonQuery(); //close connection this.CloseConnection(); } }</pre> 2013-05-30T16:17:42-04:002013-05-30T16:17:42.457-04:00urn:uuid:00000000-0000-0000-0000-000005409865http://forums.asp.net/p/1910626/5409865.aspx/1?selecting+Checkbox+Items+Using+Values+from+a+Databaseselecting Checkbox Items Using Values from a Database <p>My Database has a column called &quot;interests&quot; with the following values (colon separed) stored on the database:<br> <em>art; reading; music; sports; nature; travel. </em></p> <p>However, the value of &quot;currentCheckBox&quot; in code below is always empty. How do I load the values from the database onto the edit form? Is this the right way to do this? THANK YOU!&nbsp;</p> <pre class="prettyprint">CODE BEHIND: private void Page_Load(object sender, System.EventArgs e) { if (!IsPostBack) { SqlConnection objConn = new SqlConnection(ConfigurationSettings.AppSettings[&quot;DSN&quot;]); objCmd = new SqlCommand(&quot;select interest from member_interest where name= 'John'&quot;,objConn); objConn.Open(); SqlDataReader objReader = objCmd.ExecuteReader(); while (objReader.Read()) { ListItem currentCheckBox = CheckBoxlist1.Items.FindByValue(objReader[&quot;interest&quot;].ToString()); response.write(currentCheckBox); //**** This returns empty. if (currentCheckBox != null) { currentCheckBox .Selected = true; } } } } // ASPX PORTION: &lt;asp:CheckBoxList ID=&quot;CheckBoxList1&quot; runat=&quot;server&quot; AutoPostBack=&quot;true&quot;&gt; &lt;asp:ListItem Value=&quot;art&quot;&gt; &lt;/asp:ListItem&gt; &lt;asp:ListItem Value=&quot;reading&quot;&gt; &lt;/asp:ListItem&gt; &lt;asp:ListItem Value=&quot;music&quot;&gt; &lt;/asp:ListItem&gt; &lt;asp:ListItem Value=&quot;sports&quot;&gt; &lt;/asp:ListItem&gt; &lt;asp:ListItem Value=&quot;nature&quot;&gt;&lt;/asp:ListItem&gt; &lt;/asp:CheckBoxList&gt;</pre> <p></p> <p></p> <p></p> <p></p> 2013-05-30T18:16:11-04:002013-05-30T18:16:11.777-04:00urn:uuid:00000000-0000-0000-0000-000005412575http://forums.asp.net/p/1911273/5412575.aspx/1?reading+from+excel+Best+approach+in+netreading from excel Best approach in .net <p>I know approaches like oledb, Excel object model.</p> <p>Wanted to know whats the best approach</p> 2013-06-03T10:34:58-04:002013-06-03T10:34:58.507-04:00urn:uuid:00000000-0000-0000-0000-000005416642http://forums.asp.net/p/1912167/5416642.aspx/1?Calling+an+Oracle+Stored+Procedure+with+ODPCalling an Oracle Stored Procedure with ODP <p>Hello everybody !!!</p> <p>I have this oracle stored Procedure :</p> <pre class="prettyprint">PROCEDURE sp_cree_planning ( pi_id_trait IN T_TRAIT.ID_TRAIT%TYPE, pi_f_actif IN T_PLANNING.F_ACTIF%TYPE, pi_id_si IN T_PLANNING.ID_SI%TYPE, pi_lst_loc IN TABLE_NUMBER, pi_lst_par_nom IN table_varchar2_50, pi_lst_par_val IN table_varchar2_200, pi_d_modif IN DATE, pi_id_user IN T_USERS.ID_USER%TYPE, po_c_erreur OUT NUMBER, po_des_erreur OUT VARCHAR2 ) IS l_nom_param T_PLANNING_PARAM.NOM_PARAM%TYPE; l_valeur_param T_PLANNING_PARAM.VALEUR_PARAM%TYPE; l_id_planning T_PLANNING.ID_PLANNING%TYPE; l_tab_par table_par; l_err_fonc EXCEPTION; po_c_erreur_trait NUMBER; po_des_erreur_trait VARCHAR2(2000); BEGIN po_c_erreur := Pck_Erreur.CST_OK; sp_tab_param(pi_lst_par_nom,pi_lst_par_val ,l_tab_par,po_c_erreur_trait,po_des_erreur_trait); IF po_c_erreur_trait &lt;&gt; Pck_Erreur.CST_OK THEN po_c_erreur := po_c_erreur_trait; po_des_erreur := po_des_erreur_trait; RAISE l_err_fonc; END IF; IF pi_lst_loc.COUNT &lt;&gt; 0 THEN FOR i IN pi_lst_loc.FIRST..pi_lst_loc.LAST LOOP -- création du planning : lien job-lieu SELECT SEQ_PLANNING.NEXTVAL INTO l_id_planning FROM dual; INSERT INTO T_PLANNING(ID_PLANNING,ID_TRAIT,ID_LOC,ID_SI,F_ACTIF,ID_USER,D_MODIF) VALUES (l_id_planning,pi_id_trait,pi_lst_loc(i),pi_id_si,pi_f_actif,pi_id_user,pi_d_modif); IF l_tab_par.COUNT &lt;&gt;0 THEN FOR j IN l_tab_par.FIRST..l_tab_par.LAST LOOP IF l_tab_par(j).par_nom IS NOT NULL THEN INSERT INTO T_PLANNING_PARAM(ID_PLANNING,NOM_PARAM,VALEUR_PARAM,ID_USER, D_MODIF) VALUES (l_id_planning,l_tab_par(j).par_nom,l_tab_par(j).par_val,pi_id_user,pi_d_modif); END IF; END LOOP; END IF; END LOOP; END IF;</pre> <p>Somebody may tell me how to call this procedure using C#?</p> <p>The dificulty is here :</p> <pre class="prettyprint"> pi_lst_loc IN TABLE_NUMBER, pi_lst_par_nom IN table_varchar2_50, pi_lst_par_val IN table_varchar2_200,</pre> <p>I don't know how to use it here for example :</p> <pre class="prettyprint"> Parameter piIdTrait = new Parameter { Name = ParamIdRequest, Type = OracleDbType.Int64, Direction = ParameterDirection.Input }; piIdTrait.Value = (Int64?)Int64.Parse(idRequest); proc.Parameters.Add(piIdTrait ); </pre> <p><br> Thanx very much<br> <br> <br> </p> 2013-06-06T12:56:53-04:002013-06-06T12:56:53.317-04:00