installing perl in windows 2003, IIS 6.0 in order to install Trouble Ticket Express

I have installed ttx in win xp without any problem. But I couldn’t install it on Windows 2003, IIS 6.0. The problem was CGI couldn’t run correctly in IIS 6.0 in order to a problem in HTTP Headers after installing perl Here is the solution:

How to use CLR (dotnet classes and methods) within SQL SERVER: a simple example

step 1: create a simple class like this in csharp

using Microsoft.SqlServer.Server;
using System.Data.SqlClient;
using System;
using System.Data;
using System.Globalization;

public class T
[SqlFunction(DataAccess = DataAccessKind.Read)]
public static DateTime Jalali2Gregorian(string jalaliDate)
DateTime sqlMinDate = Convert.ToDateTime(“1/1/1753”);
DateTime res = sqlMinDate;
jalaliDate = jalaliDate.Trim();
int year = Convert.ToInt32(jalaliDate.Substring(6, 4));
int month = Convert.ToInt32(jalaliDate.Substring(3, 2));
int day = Convert.ToInt32(jalaliDate.Substring(0, 2));
PersianCalendar pc = new PersianCalendar();
res = pc.ToDateTime(year, month, day, 0, 0, 0, 0);
//do nothing
return (DateTime)res;

Step 2: compile it using following command line:

csc.exe /t:library FirstUdf.cs

Step 3: introduce generated dll (FirstUdf.dll) to sql server and its functions using following sql script:

drop function Jalali2Gregorian
drop ASSEMBLY FirstUdf
CREATE ASSEMBLY FirstUdf FROM ‘d:FirstUdf.dll’
CREATE FUNCTION Jalali2Gregorian(@JalaliDate NVarchar(100)) RETURNS DateTime
AS EXTERNAL NAME FirstUdf.T.Jalali2Gregorian

step 4: prepare sql server 2005 to run it:


USE master
EXEC sp_configure ‘clr enabled’, ‘1’;
EXEC sp_configure ‘show advanced option’, ‘1’;

step 5: now, you have your function ready to run in SqlServer and can run it like this!:

select [dbo].[Jalali2Gregorian] (’31/03/1386′)

step 6: this simple function converts Persian date to its equal date in Gregorian

publish website options in visual web developer (visual studio)

consider followings:
1. there is no difference between publishin a site and just copying it except for: files are not compiled and are slower at first run.

2. notice dlls that are in GAC are not published with the site

3. Machine.Config is never published with the site, so behavior of the site may differ

there is 3 options:
1. The Allow this precompiled site to be updatable option
specifies that all program code is compiled into assemblies, but that .aspx files (including single-file ASP.NET Web pages) are copied as-is to the target folder.

1. Publishing Web Sites
2. File Handling During ASP.NET Precompilation
3. Visual Studio 2005 Web Deployment Projects
4. How to Deploy ASP.NET Web Application

تجربه ای جدید در جمع آوری اطلاعات

چطور می شه یک سری اطلاعات یکسان را از طریق چند نفر جمع آوری کرد؟

4 تا فایل اکسل به چند نفر داده می شه و اونا هم قراره اطلاعات کاغذی و قدیمی رو وارد این اکسل ها کنند. یک سری اطلاعات بین این اکسل ها مشترک هستند مثل نام دوره ها، نام گروه ها و … حالا مشکل اینه که اونا ممکنه یک سری اطلاعات مشترک رو جداگانه وارد کنند و شماره ردیف های مختلفی بهش نسبت بدن. در واقع ممکنه یک دیتای یکسان رو بیش از یک نفر وارد کنند. مشکل اصلی ترکیب (merge) این دیتا ها با همدیگست. در واقع این خودش ی replication هستش.