Posted on

ADO.NET in a Nutshell by Matthew MacDonald, Bill Hamilton

By Matthew MacDonald, Bill Hamilton

Written through specialists at the MicrosoftÂR .NET programming platform, ADO.NET in a Nutshell supplies every little thing .NET programmers might want to get a jump-start on ADO.NET expertise or to sharpen their abilities even extra. within the culture of O'Reilly's In a Nutshell sequence, ADO.NET in a Nutshell is the main entire and concise resource of ADO.NET details to be had. ADO.NET is the suite of information entry applied sciences within the .NET Framework that builders use to construct purposes prone having access to relational facts and XML. Connecting to databases is a primary a part of such a lot purposes, whether or not they are net, WindowsÂR, disbursed, client/server, XML net providers, or anything solely assorted. yet ADO.NET is considerably varied from Microsoft's earlier information entry applied sciences - together with the former model of ADO - so even skilled builders have to comprehend the fundamentals of the recent disconnected version sooner than they begin programming with it. present with the .NET Framework 1.1, ADO.NET in a Nutshell deals one position to appear should you need assistance with whatever relating to this crucial know-how, together with a connection with the ADO.NET namespaces and item version. as well as being a important reference, this booklet presents a concise starting place for programming with ADO.NET and covers quite a few matters that programmers face whilst constructing internet functions or internet companies that depend on database entry. utilizing C#, this e-book offers genuine global, functional examples that can assist you placed ADO.NET to paintings instantly.

Show description

Read or Download ADO.NET in a Nutshell PDF

Best visual basic books

Subclassing and Hooking with Visual Basic

Subclassing & Hooking with visible uncomplicated deals builders a detailed option to customise home windows habit. home windows is a message-based method. each motion you request creates a number of messages to hold out the motion. those messages are handed among gadgets and hold with them details that offers the recipient extra element on the right way to interpret and act upon the message.

Upgrading Visual Basic 6.0 Applications to Visual Basic .NET and Visual Basic 2005 (Patterns & Practices)

Presents directions on upgrading Microsoft visible easy 6. zero functions to new types of visible simple, with details on making plans an improve undertaking, trying out an upgraded program, and deploying the hot program.

Additional resources for ADO.NET in a Nutshell

Sample text

Most of their drawbacks are in the form of programming annoyances: • Using stored procedures in a program often involves importing additional database-specific details (such as parameter data types) into your code. You can control this problem by creating a dedicated component that encapsulates all your data access code. • Stored procedures are created entirely in the SQL language (with variations depending on the database vendor) and use script-like commands that are generally more awkward than a full-blown object-oriented language such as C"docText">Stored procedures can be used for any database task, including retrieving rows or aggregate information, updating data, and removing or inserting rows.

If you have more than one question mark in the same query, the OLE DB provider matches them to the question marks based on their order. Thus the first parameter you add should correspond to the first question mark in your query. Example 4-4 shows how you would approach the same task using the OLE DB provider. In this case, both Parameter objects are still assigned the same names, but these names aren't used in the query. The position alone is significant. Example 4-4. OleDb; public class UpdateRecord { public static void Main() { string connectionString = "Data Source=localhost;" + "Initial Catalog=Northwind;Provider=SQLOLEDB;" + "Integrated Security=SSPI"; string SQL = "UPDATE Categories SET CategoryName=?

NET objects. SqlConnection con = new SqlConnection(connectionString); SqlCommand cmd = new SqlCommand(procedure, con); // Configure the command. StoredProcedure; SqlParameter param; // Add the parameter representing the return value. ReturnValue; // Add the input parameters. NET Tutorial // Execute the command. 4 Deriving Parameters So far, the stored procedure examples suffer in one respect: they import numerous database-specific details into your code. Not only do you need to hardcode exact parameter names, but you need to know the correct SQL Server data type, and the field length for any text data.

Download PDF sample

Rated 4.14 of 5 – based on 21 votes