By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,978 Members | 1,389 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,978 IT Pros & Developers. It's quick & easy.

How to migrate to Enterprise Library Data Access Application Block

P: n/a
ad
I have used Data Application Access Block2 in my web application.
Now I download the Library Data Access Application Block. and read the
document.
May be I am stupid, I can't migrate it to Enterprise Library Data Access
Application Block.
The code below is the Data Application Access Block 2, How can I modified
them?
//---------------using Data Application Access Block
2-----------------------------------------------------
using System;
using System.Configuration;
using System.Data.SqlClient;
using System.Data;
using Microsoft.ApplicationBlocks.Data;
namespace CDC
{
/// <summary>
/// DM K*ny*zC
/// </summary>
public class DM

{

public static string
cnnStr=ConfigurationSettings.AppSettings["PubsConnection"];
public static SqlConnection cnn;
public static SqlDataReader dr;

public static SqlDataReader ExecuteReader(string sSql)
{

return SqlHelper.ExecuteReader(cnnStr,CommandType.Text,sS ql);

}

public static DataSet ExecuteDataset(string sCmd)
{
return SqlHelper.ExecuteDataset(cnnStr,CommandType.Text,s Cmd);

}
public static DataView ExecuteView(string sCmd)
{
return
SqlHelper.ExecuteDataset(cnnStr,CommandType.Text,s Cmd).Tables[0].DefaultView
;
}
Nov 16 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.