Showing posts with label C# training. Show all posts
Showing posts with label C# 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.

Sunday, 1 May 2016

History of C#.NET

Amid the advancement of the .NET Framework, the class libraries were initially composed utilizing an oversaw code compiler framework called Simple Managed C (SMC). In January 1999, Anders Hejlsberg shaped a group to manufacture another dialect at the time called Cool, which remained for "C-like Object Oriented Language". Microsoft had considered keeping the name "Cool" as the last name of the dialect, however picked not to do as such for trademark reasons. When the .NET undertaking was openly reported at the July 2000 Professional Developers Conference, the dialect had been renamed C#, and the class libraries and ASP.NET runtime had been ported to C#. 

C#'s important creator and lead designer at Microsoft is Anders Hejlsberg, who was beforehand required with the outline of Turbo Pascal, Embarcadero Delphi (once CodeGear Delphi and Borland Delphi), and Visual J++. In meetings and specialized papers he has expressed that defects in most real programming dialects (e.g. C++, Java, Delphi, and Smalltalk) drove the basics of the Common Language Runtime (CLR), which, thus, drove the configuration of the C# dialect itself. 

James Gosling, who made the Java programming dialect in 1994, and Bill Joy, a prime supporter of Sun Microsystems, the originator of Java, called C# an "impersonation" of Java; Gosling further asserted that "[C# is] kind of Java with dependability, efficiency and security erased." Klaus Kreft and Angelika Langer (writers of a C++ streams book) expressed in a blog entry that "Java and C# are practically indistinguishable programming dialects. Exhausting reiteration that needs advancement," "Scarcely anyone will assert that Java or C# are progressive programming dialects that changed the way we compose projects," and "C# obtained a considerable measure from Java - and the other way around. Since C# bolsters boxing and unpacking, we'll have a fundamentally the same element in Java." Anders Hejlsberg has contended that C# is "not a Java clone" and is "much nearer to C++" in its outline. C# programming language training is available from most of the institutuins both online and offline

Since the arrival of C# 2.0 in November of 2005, the C# and Java dialects have advanced on progressively disparate directions, turning out to be to some degree less comparable. One of the main real flights accompanied the expansion of generics to both dialects, with tremendously distinctive executions. C# makes utilization of reification to give "top notch" non specific questions that can be utilized like some other class, with code era performed at class-load time. By differentiation, Java's generics are basically a dialect grammar highlight, and they don't influence the created byte code on the grounds that the compiler performs sort eradication on the nonexclusive sort data after it has confirmed its accuracy. 

Moreover, C# has added a few noteworthy components to oblige utilitarian style programming, finishing in their LINQ augmentations discharged with C# 3.0 and its supporting system of lambda expressions, expansion strategies, and unknown classes. These components empower C# developers to utilize utilitarian programming procedures, for example, terminations, when it is worthwhile to their application. The LINQ augmentations and the practical imports help designers diminish the measure of "standard" code that is incorporated into regular assignments like questioning a database, parsing a xml record, or seeking through an information structure, moving the accentuation onto the real program rationale to enhance clarity and viability.