.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Tracing procedure calls from sql server in data access layer

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :ASP.Net

Hi Guys

Pretty often I have to run the sql server profile to get some sql instructions from my application.


Is there a way I could get the instructions in my data layer instead of going to sql server profiler?


I am using the standard system.data.sqlcliente objects ( sqlconnection, sqlcommand, sqldatareader )



View Complete Post

More Related Resource Links

Server.MapPath dont have access to web all calls made in business layer


Hi Guys,

I'm trying to find a way to map a path to a pdf object in my business layer.. im using nop commerce and their messagemanager class is in the business layer and all calls to email queuing and the like are done in the business layer..

i would love to know if there's a way to do it without having the ability to pass the path in from the web layer..

my backup plan is an appsetting in web.config.. but hoped it wouldn't come to that?!

Data Access: Implement a Data Access Layer for Your App with ADO.NET


Implementing data access functionality is a core activity of most developers working with the .NET Framework, and the data access layers they build are an essential part of their applications. This article outlines five ideas to consider when building a data access layer with Visual Studio .NET and the .NET Framework. The tips include taking advantage of object-oriented techniques and the .NET Framework infrastructure by using base classes, making classes easily inheritable by following guidelines, and carefully examining your needs before deciding on a presentation method and external interface.

Dan Fox

MSDN Magazine April 2003

SharePoint Portal Server 2001: Search and Access Disparate Data Repositories in Your Enterprise


The knowledge worker is greatly empowered if she is able to access information across the enterprise from a central access point. With the SharePoint Portal Server 2001 Search Service you can catalogue information stored in Exchange public folders, on the Web, in the file system, and even in Lotus Notes databases. This article discusses the use of ActiveX Data Objects and the Web-based Distributed Authoring and Versioning protocol for creating search solutions based on SharePoint Portal Server 2001.

Kayode Dada

MSDN Magazine April 2002

Using Remote Data Access with SQL Server CE 2.0

Microsoft SQL Server CE edition is the database server built by Microsoft to run on mobile devices. Besides being a standalone database for mobile applications, SQL Server CE also allows you to connect to your desktop SQL Server 2000 and perform remote data access and merge replication. In this article, you will learn how to build a .NET Compact Framework mobile application using Visual Studio .NET 2003 and how it can perform remote data access using SQL Server CE 2.0.

For more information on .NET Compact Framework, see my previous article, "Developing Pocket PC Apps with SQL Server CE."
Features of SQL Server CE 2.0

Figure 1 shows the main components in SQL Server CE and its relationship to SQL Server 2000 (on the desktop).

can a Workflow access a stored procedure and pass the parameters from the list data to the stored pr

The reason that I would like to consider this functionailty is because my table architecture is complicated and I do not want to modify my master table to accept all of this data where some of the data should be normalized into sub tables.  Has anyone see evidence of the stored-procedure parm approach?  Is this best accomplished through VS 2010 or can I do it through SPD? Thanks

Issue with Data Access Layer DLL

Hi, I am working on a project in which I have made changes to LINQ to SQL code in data access layer project. Initially the code was using Single() extension method, I have changed it to SingleOrDefault() was earlier method was throwing exception if no records found in db. After making changes I ran the project but during debugging VS 2008 was showing that file is changed and do you want to reload the file box. When selected the file, the debugger was still executing the commented code (Single() method). I tried cleaning the entire solution and rebuilding it but it did not help. All the projects (Presentation, BL, DAL) are under single solution. Can any one please help me to solve the issue? Thanks in advance.

model report from two different data sources SQL server and access DB

Can we merge two model reports into one . One model report is from SQL server and another one from Access DB. How is that possible. Can you please give a idea how to do that. I need to display data from sql server as well as access DB using model report.  I need to get data from two different sources like sql and oracle or SQL and access db. So can combine tables from these data sources into the DSV or model. I need to use it in a report   Thanks Madhavi

Need help: "Adding Parameterized Methods to the Data Access Layer"

Hi all, em all new in C# and .NET.I am following this tutorial: http://www.asp.net/data-access/tutorials/creating-a-data-access-layer-csAnd i am at step 3: Adding Parameterized Methods to the Data Access Layer - i have No problems in getting out all information from my database.But when i try to get a specific item by CategoryID i get a Error.This is what i type in my Query in the table adapter:SELECT     ProductID, ProductName, SupplierID, CategoryID, QuantityPerUnit, UnitPrice, UnitsInStock, UnitsOnOrder, ReorderLevel, DiscontinuedFROM         ProductsWHERE CategoryID = @CategoryIDHere is the error i get when i click finish:The wizard detected the following problems when configuring TableAdapter Query "FillByCategoryID":Details:             Generated SELECT statement.              Error in WHERE clause near '@'.              Unable to parse query text.Can anyone help me with this problem?Someone who knows what i am doing wrong?Thanks

A SOA based Customizable Data Access Layer.Please comment

Hi, Actually I have an idea  to built a reusable package software .. The detail mentioned below.. ------------------------------------------------------------------------------------------ A SOA based Customizable Data Access Layer. Data access layer (DAL) is an essential part of almost every project. A data access layer can be build with all required methods(Like methods for fetching, inserting, updating data and also other methods can be built with required number of input parameters, which execute stored procedures.) in any language. Interfacing with the DAL would be a webservice. A webservice can be build with webmethods. The web service contains all web methods, which call all the methods in DAL, passing the appropriate parameters. Addition to those methods, webservice contains a method which takes database details as input parameters and passes the parameters to the method in DAL, which makes connection with database. Thus, the DAL layer and webservice, as a whole are acting as a complete package If the DAL and webservice can be built one time, it can be reused in any project with out modifying it.As the webservice is platform independent and language independent, any project can access the project/software for data operation. Using this product time can be saved so, deadline can be met easily. If this product is developed one time and can be reused by sever

No Return Type for a Stored Procedure in a Linq to SQL Data Layer

Hello. First, I don't know if this is the right forum section to post this in, but I couldn't fine a more suitable one. Feel free to move this if it's totally worng. I have a weird problem when using LINQ to SQL and Store Procedures with a return value... The problem is that when I drag my SP's onto the "Methods Pane" the property field "Return Type" is set to (None) and greyed out. And here's the most weird thing... I created a test SP yesterday wich returned SCOPE_IDENTITY() and it worked flawlessly. Dragged it onto the "Methods Pane", could play with the return type property (hence it was not greyed out) and everything was working out nice. I used a ISingleResult<T> and could fetch the .ReturnValue... Today I was going to contiune to create the rest of the SP's i needed with a return type but today when I drag my Store Procedures to my Methods Pane, I couldn't access the Return Type property... I even dragged the SAME procedure I used yesterday (wich then worked great) and now I can't get the dbml-layer to notice that there is a return value... I've tried to create new solutions, new Data Layers, used different databases/servers, but still the same problem... Don't really know if it's LINQ or something else that's causing this... This is how part of my SP wich I used yesterday to test looks

Starting Data Access Layer Tutorials - Confusion on Database downloads

Hello.I have really enjoyed going through the Security Tutorials. They were well done and I think I learned a lot.I am just about to start the first Data Access Layer Tutorial. I am a little bit confused.I have MS SQL Server 2005 and MS Visual Studio 2005 on my laptop.The first tutorial says to download and use the Northwind database. But, the link in the tutorial goes to a MS page that says that the Northwind database is for SQL Server 2000 - although it will work with 2005. The page suggests that I use the AdventureWorks database with 2005. But, when I click on the link for that page it says that this database is now on CodePlex servers and gives me yet another link.I just want to use the right database for this tutorial. Can someone please explain to me what is the right process for this tutorial? Will I just be able to download and run the EXE for the Northwind database with what I have and immediately be able to start going throgh the tutorial? Or, will I need to make some adjustments since the Northwind DB is for SQL Server 2000? I just don't want to get something installed and then have to back out of it.Thanks.

SSIS - To get data from Microsoft Access to Sql Server 2005


Hi All,

I'm new to SSIS & require help for the below 2 query's:

1.We need to import data from Microsoft Access using SSIS 2005 to SQL server. Could you please let me know the steps involved to achieve this.

2. We have web access tool & data has been stored. I need to import the access data from the Web tool to SQL server using SSIS 2005

Access data across server farms using webservices


Hi All ,

I am having two different server farms where sharepoint is hosted , My application is hosted in a server farm , I would like know if I could access data from another server farm through sharepoint webservices .




Same interface for service ann data access layer?


Should my service class implement the same interface as my DAL-class? Let's say I have an interface and two classes like this;

public interface IArticles
string[] GetArticles();

public class DAL : IArticles
public string []GetArticles(){...}

public class Service : IArticles
private IArticles _dal;
public Service()
_dal = new DAL();
public string[] GetArticles()
return _dal.GetArticles();


In this case, the Service uses BOTH inheritance and composition of the interface. What is the best solution?

Data Access tracing - No logs being generated.


I have configured tracing for sqljdbc_xa.dll as described in the msdn article 


The article provides steps for enabling tracing for 

Microsoft ADO.NET 2.0
   Microsoft MDAC 2.8 SP2
   Microsoft SQL Server Native Client
   Microsoft SQL Server 2005 JDBC Driver
   Microsoft SQL Network Protocols
   Microsoft SQL Server 2005 SP1

But after following the steps mentioned in the article, I have found that the Out.etl which is the file in which logs are added is not updated. It seems that logging is not being done. The article mentions that even opening up visual studio will add events to the log, but I have found that the log file is never updated. I basically want to enable logging for sqljdbc_xa.dll, but looks like even basic logging is not being done. 

Any one who has tried this ? or facing similar issues ?


Suggestion about exporting data into Access database from sql server 2008 without Linked Server



    We have a website that was using Sql server 2005. There was a option in Website where when a user clicks a button, Some tables data will be exported to an access database. To achieve this, we have setup a linked server to Access database. We have moved from sql server 2005 to 2008 (64bit). We did not want to use that option of having a linked server now. I am looking for different ways to achieve the task. We also donot want to use OPENROWSET and OPENDATASOURCE .


Can someone  give some insight about this?




exporting data from table on sql server 2008 to Ms access 2007



i wana know how can i export data from a table  to access through a sql job

i am using sql server 2008 and office 2007




ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend