[急]Remoting + MSSQL 服务端程序[疑难杂症]?
//启动Remoting
HttpChannel MyHttpChannel = new HttpChannel(50001);
ChannelServices.RegisterChannel(MyHttpChannel, false);
RemotingConfiguration.RegisterWellKnownServiceType(Type.GetType( "Service ", true, false), "MyServer ", WellKnownObjectMode.SingleCall);
//调用MSSQL
public int Address_Degree(string S_NAME, string M_NAME, int A_PART)
{
SqlParameter[] Parameters = { new DB.Server().S_NAME, new DB.Movie().M_NAME, new DB.Address().A_PART };
Parameters[0].Value = S_NAME;
Parameters[1].Value = M_NAME;
Parameters[2].Value = A_PART;
return new MSSQL(new DB().Connstring).ProcedureRun( "Address_Degree ", Parameters);
}
/// <summary>
/// 处理 Microsoft Sql Server 2000 的数据类。
/// </summary>
public class MSSQL
{
private SqlConnection Conn;
public MSSQL(string ConnString)
{
Conn = new SqlConnection(ConnString);
}
#region Error_Handler
public void Error_Handler(string cmdText, Exception e)
{
try
{
File.AppendAllText(System.Environment.CurrentDirectory + @ "\ " + DateTime.Now.ToString( "yyyyMMdd ") + ".txt ", DateTime.Now.ToString() + " " + cmdText + "