by joe.pesch
29. September 2008 15:59
Virtual PC - Copying image that was connected to a domain
There are a few issues that you need to deal with if the VM is joined to the domain. You will need to copy the relevant .vhd (disk image) and .vmc (config) files from the source, and then either:
- Run sysprep on your copy (may break some software installs)
- Or, manually change machine name
- remove your copy from the domain (must be while disconnected from the network)
- run newsid on the vm (available from sysinternals)
- rename the vm
- rejoin the vm to the domain
ced3132a-4b0b-47be-aef9-8cb8a1f20e2b|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
Tags:
[None]
Virtual PC
by joe.pesch
14. September 2008 02:36
alterschema NewSchemaHere transfer ExistingSchemaHere.ObjectNameHere
Example: alter schema dbo transfer jpesch.tbl_SomeTable
This would transfer the table (tbl_SomeTable) from jpesch to dbo
40e6c66b-4c8f-4bda-bbca-e5f23771b275|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
Tags:
[None]
SQL Server
by joe.pesch
12. September 2008 20:19
Author: Pujitha Sendanayake 01 Sep 2006
Original Article: http://www.dotnetspider.com/forum/ViewForum.aspx?ForumId=147
c# Date validator function with Leap Year handling
-------------------------------------------------------------------------------------------------------------
public bool isDate(string strDate)
{
string strRegex = @"((^(10|12|0?[13578])([/])(3[01]|[12][0-9]|0?[1-9])([/])((1[8-9]\d{2})|([2-9]\d{3}))$)|(^(11|0?[469])([/])(30|[12][0-9]|0?[1-9])([/])((1[8-9]\d{2})|([2-9]\d{3}))$)|(^(0?2)([/])(2[0-8]|1[0-9]|0?[1- 9])([/])((1[8-9]\d{2})|([2-9]\d{3}))$)|(^(0?2)([/])(29)([/])([2468][048]00)$)|(^(0?2)([/])(29)([/])([3579][26]00)$)|(^(0?2)([/])(29)([/])([1][89][0][48])$)|(^(0?2)([/])(29)([/])([2-9][0-9][0][48])$)|(^(0?2)([/])(29)([/])([1][89][2468][048])$)|(^(0?2)([/])(29)([/])([2-9][0-9][2468][048])$)|(^(0?2)([/])(29)([/])([1][89][13579][26])$)|(^(0?2)([/])(29)([/])([2-9][0-9][13579][26])$))";
Regex re = new Regex(strRegex);
if (re.IsMatch(strDate))
return (true);
else
return (false);
}
This function will validate any date from 1800 -to 9999.
Also It will handle leap years.
Allowed formats are mm/dd/yyyy , m/dd/yyyy , mm/d/yyyy , m/d/yyyy.
ad491670-c173-4a60-b5db-491088ae3fc3|1|5.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
Tags:
[None]
[None]
by joe.pesch
12. September 2008 20:15
Author: Pujitha Sendanayake 01 Sep 2006
Original Article: http://www.dotnetspider.com/forum/ViewForum.aspx?ForumId=147
c# Date validator function with Leap Year handling
-------------------------------------------------------------------------------------------------------------
public bool isDate(string strDate)
{
string strRegex = @"((^(10|12|0?[13578])([/])(3[01]|[12][0-9]|0?[1-9])([/])((1[8-9]\d{2})|([2-9]\d{3}))$)|(^(11|0?[469])([/])(30|[12][0-9]|0?[1-9])([/])((1[8-9]\d{2})|([2-9]\d{3}))$)|(^(0?2)([/])(2[0-8]|1[0-9]|0?[1- 9])([/])((1[8-9]\d{2})|([2-9]\d{3}))$)|(^(0?2)([/])(29)([/])([2468][048]00)$)|(^(0?2)([/])(29)([/])([3579][26]00)$)|(^(0?2)([/])(29)([/])([1][89][0][48])$)|(^(0?2)([/])(29)([/])([2-9][0-9][0][48])$)|(^(0?2)([/])(29)([/])([1][89][2468][048])$)|(^(0?2)([/])(29)([/])([2-9][0-9][2468][048])$)|(^(0?2)([/])(29)([/])([1][89][13579][26])$)|(^(0?2)([/])(29)([/])([2-9][0-9][13579][26])$))";
Regex re = new Regex(strRegex);
if (re.IsMatch(strDate))
return (true);
else
return (false);
}
This function will validate any date from 1800 -to 9999.
Also It will handle leap years.
Allowed formats are mm/dd/yyyy , m/dd/yyyy , mm/d/yyyy , m/d/yyyy.
eedde644-0e8a-4715-8ced-deaca5132830|2|5.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
Tags:
[None]
[None]