intraweb问题:使用了usersession,正正常编译,但启动IW WEB SERVER程序时报错!!!!

KEIGOliye 2004-12-26 07:35:01
在usersessionunit中定义了
userid:integer;
username:string;

然后在窗体frmLogin_unit中为两个变量赋值,然后在窗体frmMain_unit中设置一个IWLabel控件的caption属性值等于username,然后能正常编译。但是运行生成的服务器端程序就报错.用F9运行跟踪提示
Project catv.exe raised exception class EAccessViolation with message 'Access violation at address 004F452B in module 'catv.exe'.Read of address 00000064'. Process stopped.Use Step or Run to continue.

停在ServerController的
function UserSession: TIWUserSession;
begin
Result := TIWUserSession(WebApplication.Data);//报这个地方错误
end;

实在是搞不明白了~请帮帮~谢谢
...全文
158 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
jx8757778 2005-02-19
  • 打赏
  • 举报
回复
把userid:integer;
username:string;
定义在implementation前tIWusersession类后
jim138 2005-01-01
  • 打赏
  • 举报
回复
UP :_))))))
lcla 2005-01-01
  • 打赏
  • 举报
回复
up
KEIGOliye 2004-12-28
  • 打赏
  • 举报
回复
这里定义的

unit UserSessionUnit;

{
This is a DataModule where you can add components or declare fields that are specific to
ONE user. Instead of creating global variables, it is better to use this datamodule. You can then
access the it using UserSession.
}
interface

uses
IWUserSessionBase, SysUtils, Classes;

type
TIWUserSession = class(TIWUserSessionBase)
private
{ Private declarations }
public
userid:integer;
username:string;
end;

implementation

{$R *.dfm}

end.


我的是intraWeb 7.0
skymark126 2004-12-27
  • 打赏
  • 举报
回复
userid:integer;
username:string;
你把它们定义在哪里??
zwb666 2004-12-27
  • 打赏
  • 举报
回复
学习

1,594

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 网络通信/分布式开发
社区管理员
  • 网络通信/分布式开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧