Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle and Dotnet

Re: Oracle and Dotnet

From: Larry <larry_at_larry.com>
Date: Thu, 02 Jun 2005 20:17:16 GMT
Message-ID: <gPJne.4694$_o.2647@attbi_s71>


Maybe the CSharp code will help...


using System;
using Oracle.DataAccess.Client;

class insert
{

   static void Main()
   {

     String cs = "User Id=nopusr;Password=nopusr;Data Source=nop";
     OracleConnection con = new OracleConnection(cs);

     con.Open();
     OracleCommand cmd = new OracleCommand();
     cmd.Connection = con;

     for (int x = 1; x<1000; x++)
     {
       string SQL = "insert into test values ('" + x.ToString() + "')";
       cmd.CommandText = SQL;
       cmd.ExecuteNonQuery();
     }

     cmd.CommandText = "commit";
     cmd.ExecuteNonQuery();

     cmd.Dispose();
     con.Close();
     con.Dispose();

   }
} Received on Thu Jun 02 2005 - 15:17:16 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US