Программирование в IIS


Пример 3.2


/// <summary> /// Summary description for Events. /// </summary> public class Events : System.Web.Services.WebService { public Events() { //CODEGEN: This call is required by the //ASP.NET Web Services Designer InitializeComponent(); }

private System.Data.SqlClient.SqlConnection ServicesDBConn;

#region Component Designer generated code

//Required by the Web Services Designer private IContainer components = null;

/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.ServicesDBConn = new System.Data.SqlClient.SqlConnection(); // // ServicesDBConn // this.ServicesDBConn.ConnectionString = "data source=amd1700;initial catalog=ASPNETServices;" + "integrated security=SSPI;persist security info=False;" + "workstation id=AMD1700;packet size=4096";

}

/// <summary> /// Clean up any resources being used. /// </summary> protected override void Dispose( bool disposing ) { if(disposing && components != null) { components.Dispose(); } base.Dispose(disposing); }

#endregion }

Листинг 3.2. Source Code of Class Events after SQLConnection Component Added and Configured

Закрыть окно






- Начало -  - Назад -  - Вперед -



Книжный магазин