报错内容:
说"Ox...."指令引用的"Ox....."内存,内存不能为Read代码:
Procedure AutoIDConnection(x:TADOConnection;EnterID:String);
begin
EnterpriseID:=EnterID;
Connection:=x;
ADOQuery_Comm:=TADOQuery.Create(nil);
ADOQuery_Comm.Connection:=Connection;
ADOQuery_Comm.Close;
end;
参数类型改成这样就没事
Procedure AutoIDConnection(x:TADOConnection;EnterID:PChar);
begin
EnterpriseID:=EnterID;
Connection:=x;
ADOQuery_Comm:=TADOQuery.Create(nil);
ADOQuery_Comm.Connection:=Connection;
ADOQuery_Comm
说"Ox...."指令引用的"Ox....."内存,内存不能为Read代码:
Procedure AutoIDConnection(x:TADOConnection;EnterID:String);
begin
EnterpriseID:=EnterID;
Connection:=x;
ADOQuery_Comm:=TADOQuery.Create(nil);
ADOQuery_Comm.Connection:=Connection;
ADOQuery_Comm.Close;
end;
参数类型改成这样就没事
Procedure AutoIDConnection(x:TADOConnection;EnterID:PChar);
begin
EnterpriseID:=EnterID;
Connection:=x;
ADOQuery_Comm:=TADOQuery.Create(nil);
ADOQuery_Comm.Connection:=Connection;
ADOQuery_Comm
用PChar类型参数,好象borland公司说PChar类型不安全,是这样吗?
一般建议用pChar