Pretty simple really. Try this SQL:

SELECT CONVERT(nvarchar(20), GetDate(), 101);

or

SELECT CONVERT(nvarchar(20), CAST(’2008-04-04 16:07:07.920′ AS DateTime), 101);

If you need to use it in a comparison you can easily do something like

WHERE CONVERT(nvarchar(20), MyDateColumn, 101) BETWEEN @DateFrom AND @DateTo

Enjoy!

I need a place to keep track of all the good resources I’ve been finding on how to get a VirtualPC image running for SharePoint Developement. Here goes:

How to Build a SharePoint Development Machine:
Long list of steps and tools to getting a development SharePoint server up and running. This takes the approach that the develpoment tools should be kept local, and to use remote degugging:
http://weblogs.asp.net/erobillard/archive/2007/02/23/build-a-sharepoint-development-machine.aspx

How to create a MOSS 2007 VPC Image, the Whole 9 Yards:
20 steps detailing the entire process from start to finish:
How to Create a MOSS 2007 VPC Image: The Whole 9 Yards

Andrew Noon: SharePoint Web Parts:
Including remote debugging:
http://www.sharepointblogs.com/andynoon/archive/2006/06/20/sharepoint-2003-creating-web-parts.aspx

Today at work I needed to add a custom configuration section to a 2.0 ASP.NET / VB.NET project.  After looking around, almost al the examples weren’t in VB.  The the best article I found was at (not surprisingly) 4Guys.  Anyway, the sample code was C#, so I had to convert it to VB.  Here it is for anyone who might want to D/L it.  Once you get used to it, the configSections stuff is pretty cool, although a little too much coding if you don’t really need it maybe.  Anyway, if you’ve been desperatley looking for a VB.NET example, here ya go:

Custom Configuration (VB Version)

Enjoy!

My Behringer B-5 microphone started making some weird thumping noises recently. After doing some cable swapping, and creative hookups between my preamp and a pair of headphones, I became 90% sure that it was the microphone making these weird noises. Also, the noises seem to be intermittent, so my guess is that maybe one of the capacitors inside the microphone is making the noise in the signal after it heats up? I don’t know, I’m not an electrical engineer. Also, after taking the microphone apart myself, I discovered that if you’re not an electrical engineer, there will be no reason for you to open this thing up. Anyway, if you’re reading this, you have an unhealthy desire to take your B5 apart for some reason, so let’s go…

First the tools that you WILL NOT need. I discovered this through my adventure:

  • Pipe Cutter
  • Dewalt cordless drill and bits
  • Bench Vice (to hold the microphone while you attempt to drill it)

The tools you will need:

  • Something to loosen the retainer clip (that’s what I call it). I’m sure there is an official tool that can into the little cutouts on the ring, but what I used was a pair of slip-joint pliers.

Your microphone should look like this (http://photo.killfly.com/displayimage.php?album=77&pos=0) if it does not, you do not have a Behringer B5, and these instructions will not be of much help to you. Also, the image of mine has a deep gouge on the XLR end. Yours will not have this because mine is actually in two pieces. The picture was taken after my first disassembly in which I cut off the end with a pipe cutter thinking that I needed to free up the screw at that end. It turns out that the screw that is under the decal near the XLR connector does not need to be removed. (I also attempted to drill out the screw in a fit of disassembly rage).

Take off the cardoid or omnidirectional capsule, whichever is on there, and you will be presented with something like the following: http://photo.killfly.com/displayimage.php?album=77&pos=1. See the threads that are now exposed? At the tip of the threads (also visible in the picture) you can see two cutouts. This is where you should probably use a special tool to get into those cutouts, and be able to unthread this ring. The ring is actually what’s holding the contents of the microphone into the case.

Unscrew the ring: http://photo.killfly.com/displayimage.php?album=77&pos=2 (I’m using my fingers in the picture, but in reality I had to loosen it with a pair of slip-joint pliers.) One thing to note, there are two holes in the top of the microphone that look like they’re custom made for being able to unscrew the tip. This is not what you’re looking to do, you want to actually unscrew the threads themselves.

The desired result is better explained by seeing all the pieces together in a picture (or two):

In this picture you can see the case, the ring, and the capsule in the top, and the guts of the microphone in the bottom of the picture. In order to remove the guts, you’ll have to push down on the attenuation selector switch to be able to get it past the cutout on the case. When you pull out the gut, it will come out on a sled. You want to pull it out straight, because there’s a key that the XLR connector preventing it from twisting. Both halves of the key are visible in these two shot

Now that you have the sled out, you can see the contents of the microphone. If, like me, you were hoping to see a wire that might be loose, and that you could fix, you will be sorely disappointed. But it’s still kinda neat. Feel free to check out all the pics over at the photo site: http://photo.killfly.com/thumbnails.php?album=77

ADAL 1.0.8 Changes

CodeGen Logic in seperate assembly. This will make lots of things easier (for me), but most notably it will allow easy creation of other projects that use the ADAL library (like a web-based version).

Option to save password with project file. You shouldn’t be using a high-level account anyway!

Option to prefix “Item” object property names with a string if they are a member of the primary key. This makes knowing what field must be populated for an Insert easy.

I omitted the installer for now until I get the auto-update working right. Who wants to have to uninstall an application when it’s just an update.

Other stuff I can’t remember, it’s been a while since a release.

Download: http://sourceforge.net/projects/adal/

Hi all,

Here’s the link to what I think is a fixed version of the Coppermine 1.3 demo package, which I have called 1.3.1. Here’s what I did to fix, that way someone can tell me if it’ll cause any problems. It seems to work for me, but I’m not a coppermine expert…

  • Start Demo 1.1
  • Attach MySQL Administrator to the MySQL instance, and backup the coppermine database.
  • Stop Demo 1.1
  • Edit Demo1.3 ‘pms_config.ini’ file to not mirror database to local directory.
  • Start Demo 1.3
  • Attach MySQL Administrator to the MySQL instance, and restore the backup from 1.1.
  • Stop the Demo1.3
  • Zip up Demo 1.3 as 1.3.1

http://www.killfly.com/uploads/Technology/CoppermineLiveDemoFix/cpg_live-demo_1.3.2.zip

Usually I’m a proponent of Microsoft. I generally like their developmet tools, and enjoy writing in .NET because of all the useful things I can accomplish with it. But today they pissed me off a little bit. I was trying to figure out how to interface with Exchange Server 2003, so I downloaded their SDK for 2003 (http://www.microsoft.com/downloads/details.aspx?familyid=09B45603-2147-424E-81E5-601FBFDFDF0D&displaylang=en). One of the sample projects is an Issue Tracking System.

The install went ok (it creates a virtual directory for you, and copies the files to your inetpub folder). However, when I opened the site in Visual Studio 2005 it was prompted with the conversion utility to upgrade it to the new 2005 format. “No problem” I thought, go for it. I navigated to the IIS directory (using the Visual Studio IIS browser in the conversion utility) and clicked ok.

I was letting it run and glanced down at the status bar to see files names from a lot of my other projects flying by. “Oh crap!”, said to myself…actually that wasn’t exactly what I said. I clicked cancel, which didn’t work. I guess they didn’t use enough application.doevents in their code.

Long story short, a lot of my applications that used to be stored in my inetpub folder are now hosed. Thankfully all the real project are under source control so I just have to pull fresh copies out, but a lot of little test projects are now broken.

Maybe I have something unique about my environment which caused it to attempt to convert my entire inetpub folder, or maybe I fat-fingered the “open from IIS application” browser and selected the IIS root. Whatever it was it’s a very good reminder lesson that:

  • Conversion utilities are dangerous things
  • Source Control is awesome
  • Backup procedures are critical

Now I’m off to try and salvage as many applications as I can……

Not much to report, just that I accidently removed the icon for the ADAL exe, so the last release went out without it. So if you really were attached to that awesome icon, you can go re-download ADAL.

-Andrew

 You can download now, or read and download at the bottom (recommended, lol)

ADAL Version 1.0.7 was released today. Additions and fixes are included are:

- Fixed bug in PopulateFromReader that caused an error when calling the SELECT method of DAL objects. The call to PopulateFromReader was not inside a Do While Reader.Read.

- Supports SQL Server IMAGE and MONEY datatypes. Image is mapped to a Byte array on the .NET side.

- Added detection of IsNullable and IsComputed when building the DAL.

- IsComputed detection is used to fix the bug that resulted when ADAL tried to update computed columns. Also, the ClassItem object’s property is set to read-only on a computed column. So there is never even the illusion that the end user could try to update that column themselves.

- IsNullable is used to reduce the amount of code generated in the .NET Insert and Update methods.

- We added screenshots to the SourceForge website too!

Download?

A lot of JavaScript utilities need to be inserted at the bottom of the page so that the HTML elements that use them (or at least the function calls) do not generate errors. When using ASP.NET 2.0 master pages, you might want to insert the <SCRIPT> tags dynamically so that a particular JavaScript resource is available on every page.

I spent a lot of time trying to find a solution to this, and never really found a perfect one. The method I describe here is the best solution I could find at the moment.

Firts add a PlaceHolder Control, right before the end form tag. We’ll use this to write the <SCRIPT> tag so that it appears almost at the end of the document:

<asp:PlaceHolder ID=”plhJavaScript” runat=”server”></asp:PlaceHolder>

Then you can modify the master page’s Page_Load event to create a generic control, which will end up as the <SCRIPT> tag that is our goal. Once you have it, all you have to do is add it to the placeholder:

‘create generic html control

Dim JS As New HtmlControls.HtmlGenericControl(“script”)

JS.Attributes.Add(“type”, “text/javascript”)

JS.Attributes.Add(“src”, HttpContext.Current.Request.ApplicationPath & “/js/MyJavascriptFile.js”)

plhJavaScript.Controls.Add(JS)

That’s pretty much it. I think the code above might need tweaking to get the path always perfect if you’re down in a sub-directory, but you get the point.

© 2011 Killfly Blogs Suffusion theme by Sayontan Sinha