Monday, March 26, 2012

I wasnt to learn all the possible ways of accessing Data in ASP .net 2.0

Hello.

I would like to learn all the possible ways that we can access and modify data in ASP .net 2.0 programmatically.

for example one way would be like this:


StringBuilder sql = new StringBuilder();
sql.Append(" SELECT *"); //count the total number of records
sql.Append(" FROM dbo.tblJobTitle ");

//get the connection string from web services
string strConnection = new sqlconnection.SQLConnection().GetSQLConnectString(sqlconnection.SQLDSN.SCIC);

//Use the Microsoft.practices SqlDatabase object to execute our sql.
SqlDatabase SqlHelper = new SqlDatabase(strConnection);
SqlDataReader reader = (SqlDataReader)SqlHelper.ExecuteReader(CommandType.Text, sql.ToString());

the i can loop through reader and get the data OR I can create a DataSet like this:

SqlDatabase db = new SqlDatabase(strConnection);
DbCommand dbCommand = db.GetSqlStringCommand(sql.ToString());
DataSet dst = db.ExecuteDataSet(dbCommand);

I want to know if there is a comprehensive book explainaning all these possible ways to access and modify data using C# under ASP .net 2.0

I really really apreciate this.

Thank you very much.


I think you suit almost all books about ADO.NET because ADO is a part of .NET framework platform as ASP.NET. Also you can read almost all book about C# 2.0 because 100% chances that inside is chapters about ADO.|||

Common, who can read all the books in the world ?

Is there any more practical way or learning them ? Like reading a specific book or a website or MSDN or ....

Honestly I am eager to learn them and I want to learn it in a good way, start from easy stuff to more difficult and pro ways of doing it.


Thanks

|||

Hmm, if what you want is a more practical way to learn ado.net, i would suggest you : 1. Install MSDN 2.Open your browser and google "ado.net c# source code" .You will find pretty a lot of results.

Read those codes line by line and if you find anything you cannot understand, look it up in msdn. That's the way how i learn ado.net.

Hope it helps

No comments:

Post a Comment