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


Post New Web Links

How Can This Be Re-Written More Effectively?

Posted By:      Posted Date: October 25, 2010    Points: 0   Category :Sql Server
 
USE [MANAGER]
GO
/****** Object: StoredProcedure [dbo].[InsertJobsHistory]  Script Date: 10/25/2010 16:25:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[InsertJobsHistory]

  @JobId int,
  @Title nvarchar(255),
  @Comments nvarchar(255),
  @CreatedDate datetime,
  @Sequence int,
  @FirstHistory bit
    
AS
BEGIN

  DECLARE @JobOverrideId int;
  DECLARE @JobCompanyId int;
  DECLARE @JobTypeId int;
  DECLARE @JobTitle nvarchar(255);
  DECLARE @JobPriority 
                                     
                                            
                                        

View Complete Post


More Related Resource Links

GridView control to show master-child or master-slave data, written in c#, asp.net

  
I previously made a master slave datagrid using Visual Studio 2003 .Net (original article) that would allow users to show data to clients using collapse and expand features. These features however did not carry over to gridview for many users. This tutorial will explaing how to create a collapsable/expandable gridview in frameworks 2.0 and higher

Sync Up: Manage Your Data Effectively With The Microsoft Sync Framework

  

Synchronization Services for ADO.NET provide a set of tools to help you synchronize data between two database sources, synchronize files between machines, and synchronize with an RSS or ATOM feed. Learn more here.

James Yip

MSDN Magazine April 2009


How to use Style effectively in WPF application?

  
When I first read about WPF styles, I thought it was really neat since we can define styles separately from layout and apply them easily to a group of child controls by specifying the style on the parent control. (I just assumed that Style would be propagated to children via property inheritance) But it turns out, it is not that straightforward to use. Here is the code I"m using: <Window x:Class="WTFStyleTest.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300"> <Window.Resources> <Style x:Key="SampleTest1"> <Setter Property="TextBox.Width" Value="300"/> </Style> </Window.Resources> <Grid Style="{StaticResource ResourceKey=SampleTest1}"> <TextBlock>Hello World! <TextBox Text="Sample Text"></TextBox></TextBlock> </Grid> </Window> In the XAML above, I simply thought that TextBox.Width will be set to all children of Grid element but the result is totally different than what I thought. The Width was actually set to TextBox which Grid element uses internally. And it was never applied to TextBox element shown in the XAML. I didn't really fin

StreamWriter Error: Cannot close stream until all bytes are written.

  
 Hi, I have a testing platform that allows data to be posted to a real time collection system.  It uses the StreamWriter object to send both HTTP and XML formats, It works fine, but there is a new request to submit uploaded files.  This again works fine, unless the files are over 70k (we need to test upto 3MB).  If it is over 70k, the response is the content-length too big.   I have changed it so that the content-length is now set dynamically, dependant on the size of the file uploaded.  However, when the StreamWriter.Close() runs, the execption The request was aborted: The request was canceled. is generated, with the InnerException Cannot close stream until all bytes are written.From what I have found on the web, the solution is use StreamWriter.Flush(), but this code is already in place. Code is as follows:  With WebRequest .Method = "POST" .ContentType = "application/x-www-form-urlencoded" .PreAuthenticate = False .AuthenticationLevel = Security.AuthenticationLevel.None End With If FileSize &gt; 0 Then WebRequest.ContentLength = FileSize End If Try RequestStream = WebRequest.GetRequestStream() StreamWriter = New StreamWriter(RequestStream) StreamWriter.Write(strDataToPost)

is it possible for a document to be visable in Sharepoint without actually being written to the data

  
, A client lost files and the database was restored but the files are still missing. Any ideas if it is possible for a document to be visable in SharePoint without being written to the database?

Logs are written only on one WFE

  
Hi,h I have a four server farm. 1 db server and 3 wfe's. They are not load balanced. the log level is  "verbose".. however, only one wfe is writing logs. I mean, on the first WFE there are 3 log files under 12\logs and there are about 100 gb each. The other WFEs have three logs but they are 10kb  !!! Is this normal?? Why is that happening

What topics cover this code that was written in Classic-ASP?

  
Hey guys,So, I have a very simple bit of ASP on my website currently, which you can check out here:  http://www.marioplanet.com/catalog.aspJust ignore the CSS issue for now! :)Anyway, so, I have a SQL Server table in a database, and I'm pulling some information from it to make a shopping catalog of all my products.I was wondering if there is any need to convert this to ASP.NET, and if I should, as I'm eager to learn how, which topics of ASP.NET does this include?I would assume handling data through a SQL Server Database Table?Also, which ASP.NET framework is best suited for this kind of work?  For the most part, the only ASP.NET code I'm going to be using, is going to be handling data from a database.  Other than a few conditionals and what not.Any ideas and suggestions are greatly appreciated!Thanks!! 

Why a word "dummy" turns blue when written in a query window?

  
Why a word “dummy” turns blue when written in a query window of a MS SQL Server Management Studio? What does "dummy" mean in SQL language?

!Urgent! Is it possible for a document to be visable in Sharepoint without actually being written to

  
Very Very much appreciation for any help. Thanks so much A client lost files and the database was restored but the files are still missing. Any ideas if it is possible for a document to be visable in SharePoint without being written to the database? I was told previously that checkout could be the issue. So the question is: If the Doc library required check out for editing and the doc was never checked in it could show up in a export to spreadsheet but not be commited to the database. Basically the spreadsheet shows it was in there, but a restore of the contentdb does not have it

is it possible for a document to be visable in Sharepoint without actually being written to the data

  
Very Very much appreciation for any help. Thanks so much A client lost files and the database was restored but the files are still missing. Any ideas if it is possible for a document to be visable in SharePoint without being written to the database? I was told previously that checkout could be the issue. So the question is: If the Doc library required check out for editing and the doc was never checked in it could show up in a export to spreadsheet but not be commited to the database. Basically the spreadsheet shows it was in there, but a restore of the contentdb does not have it

problem with calling soap service written (most probably in java)

  
Hi evebody, I'm experiencing problem calling third-party service written in java (mostprobably). When i call service i get following response: <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'> <env:Header></env:Header> <env:Body> <env:Fault xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'> <faultcode>env:Server</faultcode> <faultstring>Content root name does not match element name: {http://foo.bar/}arg0 != arg0</faultstring> </env:Fault> </env:Body> </env:Envelope> I've used command line java utility provided by service provider and found following difference: soap request, generated by wcf (similar results with webservices)   <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <baz xmlns="http://foo.bar/"> <arg0 xmlns="">string value</arg0> <arg1 xmlns="">string value</arg1> <arg2 xmlns="">string value</arg2> </baz> </s:Body> </s:Envelope> request, generated by java utility: <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:baz xmlns:ns2="http://foo.bar/"> <arg0>string value</arg0> <arg

Where can I find written tutorials?

  

I'm coming back to developing and want to refresh my skills and familiarity with the latest Vs2010/.Net 4.0 platform.

My particular focus right now is asp.net and developing a modern, data-driven (sql server) css based web site.

All I can find is videos... what happened to the writtten word?

Blogs and forum questions (especially) are helpful on individuals, but where are the well written, structured documents that you can scan for relevance and content, and work through to make sure you're in touch with the latest practices and standards?

Does msdn still offer that?

Or is it yet another £40 book to add to the library? 


fileSystemWatcher has to wait until file is fully written

  

I'm using a fileSystemWatcher to poll a certain folder for new files. The files placed in this folder need to get changed and placed in another folder. Sometimes the file isn't writte completely causing an error:

The process cannot access the file 'C:\\sharpspool\\input.jt' because it is being used by another process.

Is it possible to raise the fileSystemWatcher event only when the file is fully written and not in use by any other application?

Thanks for the help!

Regards,


Diassemble DLL written in VB,C,C++

  

Hi All,

I have few dll which are written in VB COM, c,c++. how can I disassemble those DLL? Please consider dll written in VB,C,C++.

Thanks for reply.

Jaydeep


how to ensure aggregations and partitions are effectively being used by MDX queries?

  

we have added partitions and aggregations on all big measures groups, but want to ensure whether they are really being used by MDX query engine or not. I know we can use profiler for this, but want to know how to interpret those details.

 


can the query be written using RANKING functions

  

I am of the opinion that the query below can be written using a windowing function instead of the self join.

Can anyone help with this please.

 

SELECT 
PersonURN,
AddressURN,
DealerID,
QuoteAmount
FROm #hold a 
where TransactionDate = (SELECT MAX(TransactionDate) FROM #hold b where b.PersonURN = a.PersonURN and b.DealerID = a.DealerID)


Using the IT Workspace Milestones list effectively

  
Our small application development group is trying out the IT Workspace template. We are trying to create an effective Milestones list and are hoping others might share their approach to this list.  Our problem is that with a number of projects being worked on at once this creates quite a long list of Milestones (as there are a number of Milestones for each project).  This makes the dropdown list for Milestones (when creating a new Task) quite lengthy!  It would be great if there was some way to associate those Milestones with specific projects such that when you are on page /Projects/DisplayForms.aspx and your Related Task webpart is displayed and you create a task from there, that the Milestones list would ONLY show milestones related to that project. 
There are no mistakes; every result tells you something of value about what your are trying to accomplish.
Categories: 
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