初学,别见笑。
Debugger Exception NotificationProject project1.exe raised exception class EOleSysError with message'标记没有引用存储',Process stopped.Use Step or Run to continue.
出错语句:DataModule1 := TDMForm.Create(Self);全部代码如下:unit ServerController;interfaceuses
SysUtils, Classes, IWServerControllerBase, IWBaseForm, HTTPApp,
// For OnNewSession Event
DatamoduleUnit, IWApplication, IWAppForm;type
TIWServerController = class(TIWServerControllerBase)
procedure IWServerControllerBaseNewSession(ASession: TIWApplication;
var VMainForm: TIWBaseForm);
private
public
end; // This is a class which you can add variables to that are specific to the user. Add variables
// to this class instead of creating global variables. This object can references by using:
// UserSession
// So if a variable named UserName of type string is added, it can be referenced by using:
// UserSession.UserName
// Such variables are similar to globals in a normal application, however these variables are
// specific to each user.
//
// See the IntraWeb Manual for more details.
TUserSession = class(TComponent)
public
DataModule1: TDMForm;
constructor Create(AOwner: TComponent); override;
end;// Procs
function UserSession: TUserSession;implementation
{$R *.dfm}uses
IWInit;function UserSession: TUserSession;
begin
Result := TUserSession(WebApplication.Data);
end;procedure TIWServerController.IWServerControllerBaseNewSession(
ASession: TIWApplication; var VMainForm: TIWBaseForm);
begin
ASession.Data := TUserSession.Create(nil);
end;constructor TUserSession.Create(AOwner: TComponent);
begin
inherited;
DataModule1 := TDMForm.Create(Self);\\\\\\\\\\\\\\Here
end;initialization
TIWServerController.SetServerControllerClass;end.
Debugger Exception NotificationProject project1.exe raised exception class EOleSysError with message'标记没有引用存储',Process stopped.Use Step or Run to continue.
出错语句:DataModule1 := TDMForm.Create(Self);全部代码如下:unit ServerController;interfaceuses
SysUtils, Classes, IWServerControllerBase, IWBaseForm, HTTPApp,
// For OnNewSession Event
DatamoduleUnit, IWApplication, IWAppForm;type
TIWServerController = class(TIWServerControllerBase)
procedure IWServerControllerBaseNewSession(ASession: TIWApplication;
var VMainForm: TIWBaseForm);
private
public
end; // This is a class which you can add variables to that are specific to the user. Add variables
// to this class instead of creating global variables. This object can references by using:
// UserSession
// So if a variable named UserName of type string is added, it can be referenced by using:
// UserSession.UserName
// Such variables are similar to globals in a normal application, however these variables are
// specific to each user.
//
// See the IntraWeb Manual for more details.
TUserSession = class(TComponent)
public
DataModule1: TDMForm;
constructor Create(AOwner: TComponent); override;
end;// Procs
function UserSession: TUserSession;implementation
{$R *.dfm}uses
IWInit;function UserSession: TUserSession;
begin
Result := TUserSession(WebApplication.Data);
end;procedure TIWServerController.IWServerControllerBaseNewSession(
ASession: TIWApplication; var VMainForm: TIWBaseForm);
begin
ASession.Data := TUserSession.Create(nil);
end;constructor TUserSession.Create(AOwner: TComponent);
begin
inherited;
DataModule1 := TDMForm.Create(Self);\\\\\\\\\\\\\\Here
end;initialization
TIWServerController.SetServerControllerClass;end.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货