Over on the Ado.net blog they have just announced that Devart have just released new Ado.net Data Providers that support the Entity Framework v1.
This is great news for the Entity Framework team. This added support for multiple database vendors is another big plus for choosing the Entity Framework over Linq To Sql.
Just recently I was listening to Steven Forte and Dan Simmons on DNR talking about what the EF, the show revealed a lot of what the Entity Framework team are doing to make this a really great platform. I look forward to seeing what they have for us in the future.
At least for now if you want to use the EF you are no longer restricted to using SQL Server for your data store. Below is a list of Data Providers that will work with the EF as of the 6th of September 2008
Oracle
MySql
PostgresSql
SQLite
Sybase SQL Anywhere
UPDATE: 23-10-08 Added Sybase SQL Anywhere
.net, Development, entity framework
First up Proper Case is really Title Case. And if you ever need to convert text to Title Case in SQL you can use Vyas Kondreddi’s PROPERCASE SQL script or David Wiesman’s PROPERCASE SQL script
My only change to their scripts would be to use NVARCHAR(MAX) or VARCHAR(MAX) as compared to their use of VARCHAR(8000), if your using SQL Server 2005 or above.
1: CREATE FUNCTION [dbo].[fProperCase]
2: (
3: @Value VARCHAR(8000),
4: @Exceptions VARCHAR(8000),
5: @UCASEWordLength TINYINT
6: )
7: RETURNS VARCHAR(8000)
8: AS
9: BEGIN
10: ...
11: END
So I would covert the above syntax when using SQL Server 2000 to the T-SQL below when using SQL Server 2005
1: CREATE FUNCTION [dbo].[fProperCase]
2: (
3: @Value VARCHAR(MAX),
4: @Exceptions VARCHAR(MAX),
5: @UCASEWordLength TINYINT
6: )
7: RETURNS VARCHAR(MAX)
8: AS
9: BEGIN
10: ...
11: END
Development, Proper Case, SQL Server, Sql String Case Conversion, Title Case, TSQL
Today one of my colleagues was working on piece of code that would turn a given mapped drive to full UNC path. The code to do implement the functionality is very simple and can be done in a variety of ways ranging from Win32 API to WMI (via System.Management) Below is a snippet of the code that was used.
1: public static string GetUNCPath(string originalPath)
2: {
3: string returnVal = originalPath;
4: foreach (DriveInfo drive in System.IO.DriveInfo.GetDrives())
5: {
6: if (Path.GetPathRoot(originalPath).ToLower().StartsWith(drive.RootDirectory.FullName.ToLower()))
7: {
8: if (drive.DriveType == DriveType.Network)
9: {
10: System.Management.ManagementObjectSearcher searcher = new System.Management.ManagementObjectSearcher(
11: @"\\.\root\cimv2", "Select * From Win32_LogicalDisk Where DriveType = 4");
12:
13: foreach (System.Management.ManagementObject obj in searcher.Get())
14: {
15: if (obj["DeviceID"].ToString().ToLower().StartsWith(drive.Name.ToLower().Substring(0, 2)))
16: {
17: returnVal = Path.Combine(obj["ProviderName"].ToString(),
18: originalPath.ToLower().Replace(drive.Name.ToLower(), string.Empty));
19: break;
20: }
21: }
22: }
23: else if (drive.DriveType == DriveType.Fixed)
24: {
25: Console.WriteLine("The drive is not a network drive");
26: }
27: break;
28: }
29: }
30: return returnVal;
31: }
This code can easily be tested using Snippet Compiler, a great tool that is pretty much a must have for any developer. I have attached the code file that can be used with snippet compiler all that you will need to do is to change the mapped path that is passed into the method and a reference to System.Management.dll in Snippet Compiler. You can then run the code with UAC turned on with Run As Administrator or just a normal use to see the difference.
When running this code on Windows Vista with UAC turned on and Visual Studio 2005 or 2008 in administrator mode will provide different results. While getting different results is the correct behavior, unless you are fully aware of the various areas that running applications in a secondary login has impact on the notion of running your application in a different user context can cause a lot of wasted hours.
As a general rule when debugging code or running code on a machine that has UAC enabled my advice would be to spend a quick second to check if UAC has a part to play in the puzzle.
.net, Development, Mapped Drive to UNC, Run As Administrator, UAC, Vista, Visual Studio
I have till the end of the month before the project I have been working on for the last 8 months goes Gold. For the last 2 months we have been in weekly/fortnightly iterations and it has been going extremely well.
However as you may imagine a couple of the newer iterations have not had as much system and integration testing. Added to the fact that its also my first major project that I have been team leading, which has caused me to have a few less hours of sleep a night.
In the last week i have been preparing for Go Live checking and double checking lists, Pacing around the office, Burning the midnight oil just to make sure everything is perfect as can be. I guess the question is “What do most people do just before Go Live?” Do you have any rituals that need to be performed before going live?
Development, Go Live Rituals