.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

Stored Procs tutorial/learning resources?

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :ASP.Net
I've always used some kind of ORM to fetch data,  LinqToSQL or NHibernate so i guess im spoiled - but now i have a prospective job where they primarily use stored procs.  Not my first choice as i'm not all too comfortable with DBs in general - but i like to brush up on stored procs - almost a Stored Procs for Dummies kind of thingWhats a good resource you guys use for this? I just wanna show that i some initiative and more or less hit the ground running when it comes to stored procs - assuming im selected.Thanks!

View Complete Post

More Related Resource Links

Test Run: Automate Testing of Your Stored Procs


Many Windows®-based applications have a SQL ServerT back-end component that contains stored procedures. Although techniques to automatically test functions in the front-end code are well known, the techniques to write test automation for stored procedures are not.

James McCaffrey

MSDN Magazine September 2004

Accessing IO resources from CLR stored procedure

Hi There I am trying to write a CLR stored procedure that will return all the data about the fixed drives on a SQL server. Here is my code: using   System; using   System.Data; using   System.Data.SqlClient; using   System.Data.SqlTypes; using   Microsoft.SqlServer.Server; using   System.IO;   public   partial class StoredProcedures { [Microsoft.SqlServer.Server. SqlProcedure]   public static void Test() {   SqlPipe sp = SqlContext.Pipe;   String strCurrentTime = DiskSpace(); sp.Send(strCurrentTime); }   //[Microsoft.SqlServer.Server.SqlFunction(SystemDataAccess =SystemDataAccessKind.Read)]   //[System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.Assert, Unrestricted =true)]   public static string DiskSpace() {   new System.Security.Permissions.SecurityPermission(System.Security.Permissions.PermissionState.Unrestricted).Assert();   String Drives = "";   DriveInfo[] allDrives = DriveInfo.GetDrives();   foreach (DriveInfo d in allDrives) { Drives = ( "Drive " + d.Name);   //Console.WriteLine(" File type: {0}", d.DriveType);   if (d.IsReady == true) { Drives += " Volume label: " + d.VolumeLabel;   //Console.WriteLine(&qu

Extended stored procs on 64 bit MSSQL 2008

We need to develop some extended stored procedures for 64-bit SQL Server 2008. We have written the DLL in Visual C++ but when we try to register it with the database, we see the following error: [Microsoft][ODBC SQL Server Driver][SQL Server]Could not load the DLL c:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\xp_test.dll, or one of the DLLs it references. Reason: 193(failed to retrieve text for this error. Reason: 15105).(42000,17750) Procedure(xp_test) Can anyone please tell me if you have come across such an issue and how it was successfully resolved? 

Generic.xaml and Resources stored in App.xaml

Hi, I store things like ValueConverters or Brushes in the App.xaml, custom controls are stored in the generic.xaml. Now I'd like to get access  to those resources in the App.xaml from my custom controls in generic.xaml, but if I try to access them with {StaticResource TestConverter}, my programm seems to not find them. How can I achieve this? With ComponentResourceKeys?   Tobi  

problems running stored procs on AS400 iSeries DB2

Hi, Im working on SSIS packages to populate a SQLServer Data warehouse from an I Series AS400 DB2. Downoading data is no problem, using the ISeries IBMDA400 provider. But I need to upload a couple od tables to the iSeries and then run a stored procedure to copy them into the prodution tables. To do this I had to switch to the iSeries provider IBMDASQL. this runs fine when running in BIDS debug mode but when I save the package on the server and run it from a job, it dails with an invalid password on the connection. I have tried this with, Protection level Server Storage, encrypt with password, and dont save sensitive, using a configuration table, in all cases it works fine running in BIDS, on the dev server, but runing as a SQLSERVE job on the same server it fails. when I saved as Server storage i got the following from the job but it works from BIDS Message Executed as user: Domain\XXXXXXXX. ...lity  Version 9.00.3042.00 for 32-bit  Copyright (C) Microsoft Corp 1984-2005. All rights reserved.    Started:  7:38:53 AM  Error: 2010-09-08 07:38:55.30     Code: 0xC0202009     Source: PJCMTest001 Connection manager "GroupQAC.RunProc"     Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.  An OLE DB record is available.&

Enterprise t-sql Stored Procs against tables -vs- Views

I work for a very large enterprise and I am wanting to know what is the best way to design t-sql for the stored proces to be used from an application? Option 1 - Be sure to optimize your Database design so your application will only require at most 6 joins and used stored procs for queries using proper indexs to gain the most performance Option 2 - Create Views and use stored procs against the views My questions:  1. What is the perfromance hit in using views.   My thought process is that views should only be used when you know the data you want to return "hence the name 'VIEW', should not be used as a query".   2. Are stored procs against the schema tables the best for performance. 3. What is the best way to tune and ensure your stored proc is optimal with the correct indexes, so you build a lighting fast query? http://www.mmwebs.com

Report using Stored Proc calling multiple Stored Procs


Hi guys,

I am new to SSRS. I have to create a report from a Stored Proc. Thi Stored Proc excepts just one parameter 'ErecNo'. This parameter is passed to fetch the columns from table1. This result set contains OrderID. The OrderId is further passes to 5 SP's in to fetch 5 more result sets. Output of the main stored proc contains 6 result sets.

Now I have to create a report using this SP to show all the Result sets in a Single report. But When I pass the Parameter in SP in SSRS. It ends up showing just one result set with Order ID. 

Can you please guide me how can I show all the result set in a Single report? 



Sharepoint learning resources



                  I am trying to learn Microsoft sharepoint and I wanted your ask some opinion on some of the online resources available. I checked some of the training institutions (I am from India), but the courses are  very expensive there. I am looking for the following details

1 - What softwares are needed to learn sharepoint-  on my laptop I have Visual Studio 2008. Is that sufficient? If not, can you please provide me some details

2 - Training material - If there are some good online training materials for sharepoint, can you please let me know.

                  Typically, how long would it take to get some grasp on sharepoint? I have used visual studio and I am good in writing C# or VB.NET code. But I have no background on sharepoint. Thanks in advance.

Referencing image file stored in project resources through XAML



I'm sure this is super simple but I can't seem to figure this out.  Here is my scenario:

I have a bunch of .jpg image files that are included in a resources folder inside my project.  I want to reference them in XAML as follows:

<Image Name="SobeysImage" Stretch="Fill" ToolTip="Sobeys Image" FlowDirection="LeftToRight" Grid.Column="1" Source="Resources/sobeys1.jpg">

I get the following error message when I try to run the application:

Error 2 The file Resources\Sobeys1.jpg is not part of the project or its 'Build Action' property is not set to 'Resource'. C:\_Development\PhotoTool\PhotoTool\Window1.xaml 10 117 PhotoTool


I made sure that I set the build action of the image to Resource.


What am I missing???

Stored Procs: Map Entity to Functions



I'm using VS2010, .net 4.0, EF 4.0

Using the ADO.Net Entity Data Model (edmx)

I have a view that spans > 1 table.

i can still Map my Entity to Functions?


SQL Injection Walkthrough / Tutorial

SQL Injection is a trick to inject SQL query/command as an input possibly via web pages. Many web pages take parameters from web user, and make SQL query to the database. Take for instance when a user login, web page that user name and password and make SQL query to the database to check if a user has valid name and password. With SQL Injection, it is possible for us to send crafted user name and/or password field that will change the SQL query and thus grant us something else.

SharePoint Tutorial - Web Parts

A page in SharePoint is comprised of web parts the exist within zones. Web parts are available for just about everything. For example in the page below there are four web part highlighted by different colors. The purple web part displays a short list of the new announcements stored in the annoucements library. The pink web part displays events from a calendar within the site. The green web part displays an image from a location the user specifies. The gray web part displays a list of links from the links list on the site.

SharePoint Tutorial - Team Sites

Team sites are small web sites that are created to store everything about a particular thing. For example a site can be created for a department in an organization like human resources. I site can be created for a particular project. A site can even be created for a meeting. Everything about the thing (department, project, meeting) like documents, lists, calendars, etc. is stored in that site.

SharePoint Tutorial - Libraries

A library is a feature in SharePoint that stores files (documents). Think of a library as a folder on your file system. For example, a library can be created to store resumes in the human resources team site. A library is usually created for a specific type of file. Libraries can contain metadata to describe the particular file in more detail and to make it easier to find.

SharePoint Tutorial - Lists

A list is a feature in SharePoint that stores a lists of information. For example, a list can be created to store web links in the human resources team site. A list is usually created for a specific type of information. Lists can contain metadata to describe the particular information in more detail and to make it easier to find.

SharePoint Tutorial - Security

Security in SharePoint is comprised of users, groups and roles.

Users, Groups and Roles

A user account comes from the authentication system. For example, if Active Directory is used to authenticate then the user accounts will come from it.

There are two types of groups SharePoint uses: domain groups and SharePoint groups.

SharePoint Tutorial - SharePoint Logical Architecture

The SharePoint logical architecure consists of nested and isolated levels. These levels provide benefits for security, navigation, search, branding and ect. depending on the level

SharePoint Farm
The base level for any SharePoint implementation is the SharePoint farm. Physically a farm can consist of one server or many servers. An organization may implement one or more farms. This usually depends on security and performance needs.
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