Showing posts with label C# online training. Show all posts
Showing posts with label C# online training. Show all posts

Tuesday, 7 June 2016

Connecting Oracle Database in C#

In this course, you will explore how an Oracle Database applies ‘grid computing’ to multiple computers to provide fast, efficient, secure data storage and manipulation that easily scales to thousands of clients. You will learn how to install, administer, and maintain an Oracle 10g or 11g database in an effective and efficient manner. You will cover the interaction among Oracle components, Oracle’s architecture, and user management. Performance monitoring, database security, and backup and recovery techniques are covered. This course will assist those preparing to take the Oracle Certified Associate certification examination.


With a specific end goal to appropriately utilize the data contained in this article, I am going to accept the accompanying:

You have no less than a fundamental comprehension of C# and have composed code in it or some other dialect, for example, C++ or Java.

You have a fundamental comprehension of composing SQL orders.

Have an Oracle database to associate with.

On the off chance that your database is at your work environment, a duplicate of tsanames.ora gave by the DB administrator or whomever. (What's more, ideally, consent to get to the database!)

So with no further presentation, let me get into a little foundation.

What you require? 

You should make a free record on Oracle's webpage (beneath) and consent to their terms to have the capacity to download the customer.

Download Oracle Instant Client for Microsoft Windows (32-bit) here. There are different stages accessible, and a 64-bit rendition for Windows, yet I haven't took a gander at the substance of any of those and they are outside the extent of this report at any rate.

There are two adaptations you can browse. They are: Basic and Basic-Lite. I suggest getting the Basic Lite rendition, unless you have to bolster more than the English dialect.

OCCI requires just four element join libraries to be stacked by the dynamic loader of the Operating System. When this article was composed, it is utilizing the 10.2 rendition.

They are as per the following:

OCI Instant Client Data Shared Library

oraociicus10.dll (Basic-Lite form)

oraociei10.dll (Basic form)

Customer Code Library

oci.dll

Security Library

orannzsbb10.dll

OCCI Library

oraocci10.dll

// This really didn't need to be in its own method, but it makes it easier 
// to make changes if you want to try different things such as
// promting the user for credentials, etc.
static private string GetConnectionString() 
{ 
   // To avoid storing the connection string in your code, 
   // you can retrieve it from a configuration file. 
   return "Data Source=myserver.server.com;Persist Security Info=True;" + 
          "User ID=myUserID;Password=myPassword;Unicode=True"; 
}

// This will open the connection and query the database
static private void ConnectAndQuery() 
{ 
  string connectionString = GetConnectionString(); 
  using (OracleConnection connection = new OracleConnection()) 
  { 
    connection.ConnectionString = connectionString; 
    connection.Open(); 
    Console.WriteLine("State: {0}", connection.State); 
    Console.WriteLine("ConnectionString: {0}", 
                      connection.ConnectionString); 
    
    OracleCommand command = connection.CreateCommand(); 
    string sql = "SELECT * FROM MYTABLE"; 
    command.CommandText = sql; 
 
    OracleDataReader reader = command.ExecuteReader(); 
    while (reader.Read()) 
    { 
      string myField = (string)reader["MYFIELD"]; 
      Console.WriteLine(myField); 
    }
  }
}

Wednesday, 18 May 2016

C# better than java or not???

Here are a few things C# now has that Java does not:

Lambdas, which are route superior to anything mysterious internal classes. (C# has unknown inward classes, as well.)

Delegates. You can sort of do this in Java, however it's not as perfect.

Administrator over-burdening. This component can be manhandled all to hellfire, however it is still every so often valuable, particularly in libraries and in DSLs.

Wherever C# online training gives you the clarity why C# is better than java.

Properties. No compelling reason to compose getters and setters. Everything resembles an immediate field access, regardless of the possibility that it isn't. This is Python's colloquialism, and Scala's, as well, and once you begin utilizing it, you never need to uncover unequivocal getters and setters, until the end of time. foo.x += 1 is quite a lot more clear than foo.setX(foo.getX() + 1).



A yield coroutine capacity. Despite the fact that I favor Python's language structure (and Scala's) to C#'s, this is an intense and very helpful ability. On the off chance that you've ever utilized it to fabricate apathetic iterators (in Python, Scala, C#, whatever), you recognize what I mean.

Augmentation techniques. These are what might as well be called the Scala verifiable sort transformation include, and they're cursed helpful. They allow you to "broaden" existing classes, regardless of the fact that they're last, without really expanding them. Like the Scala form, there's a component for getting the verifiable changes scope; they don't happen consequently. (Consider them a sort of degree controlled monkeypatching.)

(Note: As Tony Morris calls attention to, in the remarks to this article, expansion techniques are not by any stretch of the imagination what might as well be called Scala's verifiable sort transformations; Scala's implicits are substantially more effective. Still, unmistakably C# has obtained one helpful part of this thought, and it's similarly clear that Java does not have a component that is even remotely near either Scala's implicits or C#'s augmentation strategies.)

An invalid combining administrator that gives a basic linguistic structure to dereferencing a reference and supplying a default if the reference is invalid.

Likewise, C# has a large portion of the same elements as Java, including:

interfaces

generics

autoboxing and auto-unpacking

explanations (however C# calls them "qualities")

Despite everything I lean toward the JVM to CLR. The JVM is vigorous, full grown, quick, and (most importantly) versatile. Be that as it may, Java, the dialect, has fallen behind, and it now does not have a considerable measure of the helpful elements C# has. One reason I'm all over Scala nowadays is that it revises those imperfections in Java, giving numerous a la mode highlights while as yet allowing me to utilize the force and comfort of the JVM. Either by means of libraries or constructed ins, Scala gives the same components as C#, with a couple of more tossed in for good measure. (I additionally happen to think Scala is a superior dialect than C#, however I'll spare that digression for some other time.) But, in the .NET world, C#, not Scala, is the most widely used language. Furthermore, C#, and .NET, are the greatest hearts-and-brains contender Java has.

Sun and the Java people group have permitted Java, the dialect, to stagnate to the point where, contrasted with C# and Scala, it is verging on difficult to utilize. As a long-lasting Java software engineer, I need to say, that makes me somewhat miserable.