在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
2,在Global页面中放sqlConnection sqlCommand并设好他们的连接 3,在接口处注销strict private 接口的代码如下 --------------------------- type TGlobal = class(System.Web.HttpApplication) {$REGION 'Designer Managed Code'} // strict private//这行必需注销,其它的行不理它 sqlCNN: System.Data.SqlClient.SqlConnection; SqlCMD: System.Data.SqlClient.SqlCommand; procedure InitializeComponent; {$ENDREGION} strict protected procedure Application_Start(sender: System.Object; e: EventArgs); procedure Session_Start(sender: System.Object; e: EventArgs); procedure Application_BeginRequest(sender: System.Object; e: EventArgs); procedure Application_EndRequest(sender: System.Object; e: EventArgs); procedure Application_AuthenticateRequest(sender: System.Object; e: EventArgs); procedure Application_Error(sender: System.Object; e: EventArgs); procedure Session_End(sender: System.Object; e: EventArgs); procedure Application_End(sender: System.Object; e: EventArgs); private { Private Declarations } public constructor Create; end; var DM:TGlobal;//在这里要申明一个类变量,以后就会这个变量来访问这个类 implementation ------------------------------------ 4,申本类变量,如implementation上面那一行 5,其它页面引用这个单元,引用单元要引用System.Data.SqlClient 要不然,就叫不出DM模块中数据组件的方法了 ------------------------------------------- DoubleCat |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论