Posts Tagged ‘sql’

Microsoft Store
 Powered by Max Banner Ads 

Microsoft Ado.net

Wednesday, April 27th, 2011

Microsoft Ado.net
Microsoft Ado.net

Dot Net Development: LINQ improves the productivity of a developer

Microsoft Language Integrated Query (LINQ) offers developers a latest way to query data using strongly-typed queries and strongly-typed results, frequent across a number of dissimilar data types including relational databases, .NET objects, and XML. With the help of strongly-typed queries and results, LINQ improves the productivity of a developer with the benefits of IntelliSense and compile-time error checking.

LINQ to SQL

LINQ to SQL is an object-relational mapping (ORM) framework which ensures the direct 1-1 mapping of a Microsoft SQL Server database to .NET classes, and query of the resultant objects using LINQ. More specifically, LINQ to SQL has been developed with a goal to rapidly develop the scenario against Microsoft SQL Server where the database is very similar to the application object model and the primary concern is amplified developer productivity.

LINQ to Entities

LINQ to Entities is, exclusively, a part of the ADO.NET Entity Framework which permits LINQ query capabilities. The Entity Framework is the fruition of ADO.NET that enables developers to program in terms of the standard ADO.NET abstraction or in terms of persistent objects (ORM) and is built upon the standard ADO.NET Provider model that ensures an access to third party databases. The Entity Framework harbingers a new set of services around the Entity Data Model (EDM).

LINQ to DataSet

LINQ is one of the best ways to make queries and set based operations first class citizens in the .NET world. It enables queries to be printed in the development language, and provides compile time type checking. In addition, LINQ ensures full power of the framework to be used when writing queries. LINQ to DataSets bestows this power to your DataSet based application.

Technical Articles

The major scenarios for which each of these technologies have been designed:

Webcasts: It is the Entity Framework for Database Administrators (Level 200) which is a new data technology from Microsoft that may chiefly rouse the interest of database administrators (DBAs).

Framework Masterclass: LINQ to SQL (Level 200) is a Microsoft .NET Language Integrated Query (LINQ) that provides a familiar way to work with data in your applications.

Introducing LINQ to DataSet (Level 200):

Exploration of new technologies within Microsoft Visual Studio code name "Orcas" make working with data a better practice. One such technology is Microsoft .NET Language Integrated Query (LINQ), code name for a set of extensions to the Microsoft .NET Framework that include language-integrated data query, set, and change operations.

Microsoft Language Integrated Query (LINQ) makes way for the dot net development a latest way to query data using strongly-typed queries and strongly-typed results.

About the Author

Tyler Moon is an expert in article writing and internet marketing. She regularly contributes articles on various topics like security services, birth announcements etc.

ADO.net and APS.net 1.1 and MS Access help?

I need to connect my databasae (MS Access) with ASP.NET 1.1 using ADO.net , a website explains how to establish such a connection but the problem is

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/webdata/northwind.mdb"set rs=Server.CreateObject("ADODB.recordset")
rs.Open "Customers", conn
%>

I don't know where should I paste this code?

Hi, your connection string is correct but your missing some parts..

Take a look at the below code. I took out what I use in my ADO.NET library for this example..

I have included a summary here:

http://www.m0interactive.com/archives/2006/06/13/connect_to_a/

Code:
=========================================
try
{
string database = "PersonDatabase.mdb";
string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + database;
OleDbConnection dbConnection = new OleDbConnection(connectionString);

string query = "SELECT FirstName FROM PersonTable WHERE PersonID = 1";
OleDbCommand command = new OleDbCommand(query, dbConnection);
string FirstName = "";
dbConnection.Open();
OleDbDataReader reader = command.ExecuteReader();

if (reader.Read())
FirstName = reader.GetString(0).ToString();
else
FirstName = "Empty";

dbConnection.Close();

Console.WriteLine(FirstName);
}
catch (Exception e)
{
return e.ToString();
}
========================

Good Luck

Microsoft Ado.net
ADO.NET 2.0 Training Course

The Ado.net Model

ADO.Net is the latest in a series of technologies from Microsoft which focus on the connection of applications to databases of one sort or another. From the DAO which (and is) was the native mode of connection for MSAccess, through the short-lived RDO, and the now comparatively long-in-the-tooth ADO, this is the next generation of technology. And, although it is not likely that there will not be some future add-ons, enhancements, and upgrades, it appears that this structure of database connectivity is a keeper.

It is not a COM technology, so it can be used on other platforms in addition to Windows, and agnostic when it comes to the brand of database it facilitates connection to. In addition, it allows more extensive support to the XML paradigm.

The .Net platform will continue to allow you to use the older ADO connection technology, but, under most circumstances, this is a poor choice because of the performance penalty , which comes from using the unmanaged code in the COM object.

ADO.Net requires some new methods of accomplishing some of the simple tasks of interacting with data. For example, server-side cursors and are not supported any more because of the increased overhead and the potentially large number of lacks required on the server. Accordingly, the only connection s allowed are forward only, read- read-only result sets, and disconnected result sets. There are rumors of server side cursors being planned for future releases, probably due to the loud complaint from the developer community. However, there are a number of techniques and tools provided which greatly lessen the need for server side cursors, so by the time of the next release, there may be less need for them.

To gain access to the ADO.Net class libraries, you must add the following statements to the top of your source files:

Imports System.Data

Imports System.Data.OleDb* or, if you are connecting to SQLServer

Imports System.Data.SqlClient

There is also support for the ODBC connections through Imports System.Data.ODBC

These commands expose the objects needed to connect to the data source.

Data Retreival

Like ADO, ADO.Net uses a connection object to point to external data. Under the .Net model, a connection is opened, data is retrieved, and then the connection is closed. The closing of the connection is necessary to free up resources. The connection string (the part of the comment which identifies the source of the data, as well as access to it through username and password) is identical to the connection string grammar under the old model ADO.

The first way to access data is after you have defined and opened the connection, invoke the command object providing it with a SELECT statement, or storedprocedure name with parameters. The Data Reader will allow the application to gain access to the returned resultset. An ExecuteReader method will allow a line by line reading of the data retrieved. However, be aware that this is a forward only dataset – once a line is read, unless you save its contents somewhere, somewhere the data can be lost. The only way to make it available again is to re-establish the connection and read it again.

The second method opens a connection, retrieves a recordset, then stores that recordset in an object called a DataSet. The DataSet acts and functions like a local database, storing the data retrieved – even from multiple sources. It can even link and establish relationships between multiple tables. At the conclusion of the data retrieval, the connection is closed, so that in processing the DataSet is completely disconnected from the data source(s).

The mapping of data between the DataSet and the outside data sources is handled by the DataAdapter object. In addition to keeping track of the connections to the data sources, the DataAdapter also facilitates the updating, deleting, and insertion of data back to the source.

XML

XML is the native format for ADO.Net. It is so tightly integrated that you can define and read schemas, and can seamlessly exchange data in the XLM format, both reading and writing with any application on any platform.

Source: http://www.paladn.com/articles/ado.dotnet.htm

About the Author

Chris is well known author who writes about computer consultancy, IT consultancy, .Net programming and Visual Basic .Net Programming. For more information visit www.paladn.com.


Building Web Solutions with ASP.NET and ADO.NET - reference book - English ( 9780735615786 )


Building Web Solutions with ASP.NET and ADO.NET - reference book - English ( 9780735615786 )


$49.99


Are you ready to take your dev skills to a whole new level? Then Building Web Solutions with ASP.NET and ADO.NET is right for you. Get an in-depth look at creating more powerful Web apps and services with ADO.NET and ASP .NET....

PROGRAMMING MICROSOFT ADO.NET 2.0 CORE REFERENCE


PROGRAMMING MICROSOFT ADO.NET 2.0 CORE REFERENCE



...


MS ADO NET STEP BY STEP


MS ADO NET STEP BY STEP


$16.23


MS ADO NET STEP BY STEP...

Microsoft ActiveX Data Objects (ADO.NET 2.0) - Instructor-based Video Training


Microsoft ActiveX Data Objects (ADO.NET 2.0) - Instructor-based Video Training


$395.00


Interactive Instructor-Based ADO.NET 2.0 Essentials Video Training Course on DVD-ROM. Computer Based Training (CBT) and Video Based Training (VBT) have emerged as the premier training tools in recent years. KeyStone Self-Paced CBT/VBT courses are known for their high quality in-depth content. Compared to traditional training methods, KeyStone courses cost less and users can learn faster while tak...

Pro C# 2010 and the .NET 4 Platform


Pro C# 2010 and the .NET 4 Platform


$37.79


The first edition of this book was released at the 2001 Tech-Ed conference in Atlanta, Georgia. At that time, the .NET platform was still a beta product, and in many ways, so was this book. This is not to say that the early editions of this text did not have merit&#151;after all, the book was a 2002 Jolt Award finalist and it won the 2003 Referenceware Excellence Award. However, over the years tha...

Murach's Visual Basic 2010


Murach's Visual Basic 2010


$34.34


###############################################################################################################################################################################################################################################################...

Murach's ASP.NET 4 Web Programming with C# 2010 (Murach: Training & Reference)


Murach's ASP.NET 4 Web Programming with C# 2010 (Murach: Training & Reference)


$34.34


###############################################################################################################################################################################################################################################################...

Microsoft Ado.net

SpeedyPC
 Powered by Max Banner Ads