About Me

My photo
Northglenn, Colorado, United States
I'm primarily a BI Developer on the Microsoft stack. I do sometimes touch upon other Microsoft stacks ( web development, application development, and sql server development).
Showing posts with label Visual Studio. Show all posts
Showing posts with label Visual Studio. Show all posts

Friday, March 22, 2013

Quick Reminder: Add 3rd PartyJavascript API Intellisense to Visual Studio

For third party JavaScript api, it helps to have intellisense. In this case I was using Tableau Software's JavaScript API.

1) Download the JavaScript files and place them locally.
2) Add reference at top of your JavaScript file
/// <reference path="tableau_v8.debug.js" />
Before:
















After:



















More info on creating intellisense can be found here: http://msdn.microsoft.com/en-US/library/vstudio/hh874692.aspx

Thursday, August 28, 2008

Timeout Errors Prevention

After a while, you may end up getting complaints or request dealing with timeout issues. I’m going to use this post to help collect some ways to increase the timeout seconds and prevent errors from happening.

*Note: Even though you increase the timeout seconds, timeouts might still occur but with a longer delay then before. This might make your customers even more upset because of the longer wait for the error to display.

  • In code, increase the sqlCommand timeout. Ex:
     
  • Dim myCommand As New SqlCommand("[dbo].[spSetUserPreferences]", myConnection)

    myCommand.CommandType = CommandType.StoredProcedure
    'change default time out setting
    myCommand.CommandTimeout = 120

  • In code, increase the connection’s string timeout by appending “Connection Timeout=” to it. Ex:

    Data Source=mydatabase;Initial Catalog=Match;Persist Security Info=True;User ID=User;Password=password;Connection Timeout=120
  • On SQL-Server 2005, In management studio’s Tools > Option > Designers Increase the “Transaction time-out after:” even if  “Override connection string time-out value for table designer updates” checked/unchecked. 
  • Make (non-dynamic) stored procedures instead of using inline sql statements within the code. This will also allow for easy fixes instead of having to recompile and deploy for future changes.

 

If you have any other suggestions, please contact me so I can add them to the list.

Tuesday, December 18, 2007

Spell Checker for your code's comments

Comment Spell Checker

A spell checker for your comments in Visual Studio 2005 and Visual Studio 2008. This is a nice tool, I hate looking stupid because of stupid spelling mistakes. When you build your project(s) the spelling mistakes show up under "Messages" (third tab in the Error List). Brought to you by: http://blogs.msdn.com/webdevtools/archive/2007/12/13/spell-checker-for-html-asp-net-jscript-vb-c-css-and-c-for-visual-studio-2005-and-2008.aspx#comments

Tuesday, November 06, 2007

Upgrading from .Net Framework 1.0 to 3.5

  • First upgrade your code from .NET 1.0 to .NET 1.1 using Visual Studio 2003. It has a project upgrade tool with some assistance.

  • Next use Visual Studio 2008 to upgrade the project from .NET 1.1 to .NET 2.0. The upgrade wizard here does not change your code. It will show you warnings for things that you have to change but you will have to go change them. You also have to fix all your new compile errors and do a full retest.

  • Once you're at .NET 2.0 the migration to .NET 3.0 and .NET 3.5 is easy. It's primarily just about using the new features available in these new versions of the framework. All your existing code should work fine, in fact you most likely wont even need to recompile.



The .NET 1.1 -> .NET 2.0 breaking changes are detailed here: http://msdn2.microsoft.com/en-us/netframework/aa570326.aspx

Here's a helpful blog entry from Brad Abrams on upgrade experience:
http://blogs.msdn.com/brada/archive/2007/01/15/real-world-customer-experience-in-migrating-from-net-framework-1-1-to-2-0.aspx

Here's another great post on this topic deom Daniel Moth:http://www.danielmoth.com/Blog/2007/10/migrating-from-net-framework-v1x-to.html

- source: http://blogs.msdn.com/pandrew/archive/2007/10/25/how-to-upgrade-from-net-framework-1-0-to-net-framework-3-5.aspx


So, I guess they make the transition from 1.0 to 3.5 look easy. Just hope I never have to do it. <^_^>

Friday, October 26, 2007

Ramp Up

So, if you're an Aspiring Developer, Java Developer, VB 6.0 Developer or a developer with Visual Studio 2002/2003 then you have a good chance to ramp up to Visual Studio 2005. MSDN Ramp Up is a set of lessons for those who want to quickly learn and develop in VS 2005. http://msdn2.microsoft.com/en-us/rampup/default.aspx

I just hope they will have one for VS 2005 to VS 2008 soon.

Tuesday, October 09, 2007

Developing Tools to use with VS

Helpful developing tools:

Process Monitor -
"shows real-time file system, Registry and process/thread activity. It combines the features of two legacy Sysinternals utilities, Filemon and Regmon, and adds an extensive list of enhancements including rich and non-destructive filtering, comprehensive event properties such session IDs and user names, reliable process information, full thread stacks with integrated symbol support for each operation, simultaneous logging to a file, and much more."

http://www.microsoft.com/technet/sysinternals/FileAndDisk/processmonitor.mspx

Process Explorer -
"shows you information about which handles and DLLs processes have opened or loaded."

http://www.microsoft.com/technet/sysinternals/utilities/processexplorer.mspx

Auto Runs -
"has the most comprehensive knowledge of auto-starting locations of any startup monitor, shows you what programs are configured to run during system bootup or login, and shows you the entries in the order Windows processes them. These programs include ones in your startup folder, Run, RunOnce, and other Registry keys."

http://www.microsoft.com/technet/sysinternals/utilities/autoruns.mspx


Sources:
http://www.microsoft.com/technet/sysinternals/default.mspx
http://blogs.msdn.com/progressive_development/archive/2007/10/09/motley-says-the-only-tool-i-need-is-the-debugger-part-1.aspx

Tuesday, October 02, 2007

Visual Studio 2005 Add-In: Code to HTML

Ok, this is a very cool tool and time saving add-in for visual studio 2005. Just highlight the code you want to copy to html, right click > copy to html. It does the formatting, color scheme, etc..

http://www.jtleigh.com/people/colin/software/CopySourceAsHtml/




1 class WaterMarkToolTip : ToolTip


2 {


3 public WaterMarkToolTip()


4 {


5 this.OwnerDraw = true;


6 this.Draw += new DrawToolTipEventHandler(OnDraw);


7


8 }


9


10 public WaterMarkToolTip(System.ComponentModel.IContainer Cont)


11 {


12 this.OwnerDraw = true;


13 this.Draw += new DrawToolTipEventHandler(OnDraw);


14 }


15


16 private void OnDraw(object sender, DrawToolTipEventArgs e)


17 {


18 DrawToolTipEventArgs newArgs = new DrawToolTipEventArgs(e.Graphics,


19 e.AssociatedWindow, e.AssociatedControl, e.Bounds, e.ToolTipText,


20 this.BackColor, this.ForeColor, new Font("Arial Unicode MS", 8.25f, FontStyle.Bold));


21 newArgs.DrawBackground();


22 newArgs.DrawBorder();


23 newArgs.DrawText(TextFormatFlags.TextBoxControl);


24 }


25


26


27 }


Friday, August 17, 2007

LINQ and AI?

Well, LINQ is something new to both VB and C# in Visual Studio 8 that allows you to query the data. The data can be XML, ADO.NET, DataSet, or objects. An example of the LINQ format:

var locals = (from c in customers
where c.ZipCode == 91822
select new { FullName = c.FirstName + “ “ +
c.LastName, HomeAddress = c.Address})
.Count();

What I find really interesting about the possibility of using LINQ, is the idea that the program can look at itself in an evaluation. If you add some artificial intelligence, this idea can be a great help in developing programs that can prove themselves correct in logic. I even think, that this concept can be used, with lots of time and planning, to develop a program that can write other programs given a set of parameters and acceptable outcomes.

The concept of using a database like language in a structure language is a very nice concept. If LINQ could be used to select all number of the type Int32 to represent integer numbers, would be something fun to play with. On this subject I might be a little too much in the dream world at the momement, but I do look forward to the possibilities.

Some sources on LINQ:

http://msdn.microsoft.com/msdnmag/issues/07/06/CSharp30/
http://blogs.msdn.com/charlie/archive/2007/07/26/visual-studio-2008-beta-2-released.aspx

Some info on Lambda Calculus:

http://en.wikipedia.org/wiki/Typed_lambda_calculus