grab our rss feed

stevienova.com

Homepage of Steve Novoselac

Entries Tagged ‘C#’

SSIS – Custom Control Flow Component – Execute SQL Job And Wait

Sometimes you have some pretty complex ETL’s going in SSIS, and you might have multiple projects/solutions that need to call other SSIS Packages or SQL Agent Jobs and you have a pretty big production going on. You might have an ETL solution that needs to kick off other packages, and you can either import those [...]

Comments | 2,442 views

SSASMeta – C# App to Log Info About SSAS Objects

I manage some servers that have many cubes. OK, a lot of cubes (60+ on one). I needed some way to output a report of last processed time, last schema update, etc. Now, there are about 5 different ways to do this (one being the SSAS Stored Procedure Project), but this is what I came [...]

Comments | 1,128 views

C# 3.0 Features – Extension Methods

C# 3.0 and .NET 3.5 are out and ready for consumption, and I have been using some of the new features. One of the new features, Extension Methods, is really cool and can help you consolidate and reuse your code in a logical manner. Take for example, System.Data.DataSet – there is always something I do [...]

Comments | 1,170 views

C# .NET Test Driven Development with Visual Studio 2005

As of late I have been stuck in C++ world. MFC/Win32, pointers and HRESULT’s. Ugh. Earlier this week I got a chance to get back to C# and .NET (aka My Roots).
I needed to create a class library for a project, basically from scratch, since there was no existing library created. I started to go [...]

Comments | 1,038 views

ASP.NET C# – Grabbing a posted file and save to disk

Sometimes you want to grab a file posted to a page, maybe an image upload or other file upload
HttpFileCollection logFiles = Request.Files;
string path = System.Configuration.ConfigurationManager.AppSettings["LogPath"];
if (logFiles.Count > 0)
{
HttpPostedFile logFile = logFiles.Get(0);
logFile.SaveAs(path + System.Guid.NewGuid().ToString() + “.log”);
}
As you can see, I am setting the log path from the config. The reason for this is, the path to [...]

Comments | 522 views

Careful! rand_s and OS compatability

if you want to use the secure version rand_s() – be careful, it only works on XP and higher!!

http://msdn2.microsoft.com/en-us/library/sxtz2fa8(VS.80).aspx
Guess you don’t get to be secure on Windows 2000 or lower. :P

Comments | 932 views