为什么我做的ActiveX控件没有显示出来?(50分)

  • 主题发起人 主题发起人 kingboom
  • 开始时间 开始时间
K

kingboom

Unregistered / Unconfirmed
GUEST, unregistred user!
我用delphi7.0做了个ActiveX控件,就是在默认的窗体上面放一个按钮,结果发布到网站下,打开测试用的默认htm,上面什么也没显示出来,怎么解决这个问题?
 
我现在也遇到相同的问题,你在D7里如果用的是好的,你在放到其他的地方试.
 
浏览器拦截了您的控件,需要签名才可以。推荐购买wosign微软代码签名证书:
http://www.wosign.com/Products/WoSign_CodeSigning.htm

产品价格:1288元 1年[:)]
 
请各位帮我看看为什么不对
function Tform1.updatetable(ados:Tadoquery;lcTable:string):Boolean;
var
i:integer;
msql:string;
lnparm:string;
lnkey:variant;
msql1,msql2,msql3:string;
adod:Tadoquery;
// lcold,lcnew:variant;
begin

lnparm:='';
msql:='';
adod:=Tadoquery.Create(nil);
adod.Connection:=form1.ADOConnection1;
adod.Close;
adod.SQL.Clear;
lnkey:=ados.Fields[0].AsInteger;
if (lnkey>0) then

begin

msql1:='update '+lcTable +' set ';
msql2:='';
msql3:='';
for i:=1 to ados.FieldCount-1do

if ((copy(ados.Fields.FieldName,0,2) <> 'tmp') and (ados.Fields.FieldName <> 'iren') and (ados.Fields.FieldName <> 'idate') and (ados.Fields.FieldName <> 'uren') and (ados.Fields.FieldName <> 'udate')) then

begin

if ados.Fields.OldValue<>ados.Fields.Value then
----> ERROR "Invaild variant operation" please help me
msql2:=msql2+ados.Fields.FieldName+'=:'+ados.Fields.FieldName+',';
end;

// end;

msql2:=copy(trim(msql2),0,length(trim(msql2))-1);
if (length(msql2) <> 0) then

begin

msql1:=msql1+msql2+',uren=:uren,udate=:udate where id=:id';
adod.SQL.add(msql1);
for i:=1 to ados.FieldCount-1do

begin

if ((copy(ados.Fields.FieldName,0,2) <> 'tmp') and (ados.Fields.FieldName <> 'iren') and (ados.Fields.FieldName <> 'idate') and (ados.Fields.FieldName <> 'uren') and (ados.Fields.FieldName <> 'udate')) then

begin

if [red]ados.Recordset.Fields.OriginalValue<>ados.Recordset.Fields.Value[/red] then
---
begin

lnparm:=ados.Fields.FieldName ;
adod.Parameters.ParamByName(lnparm).Value:=ados.Fields.Value;
end;

end;


end;

adod.Parameters.ParamByName('uren').Value :='admin';
adod.Parameters.ParamByName('udate').Value:=now();
adod.Parameters.ParamByName('id').value:=ados.Fields[0].Value;
adod.Prepared:=true;
try
adod.ExecSQL;
result:=true;
except
result:=false;
end;

adod.Free;
end;

end
else

begin

msql1:=' insert into '+lcTable+ '(';
for i:=1 to ados.FieldCount-1do

begin

if ((copy(ados.Fields.FieldName,0,2) <> 'TMP') and (ados.Fields.FieldName <> 'UREN') and (ados.Fields.FieldName <> 'UDATE')) then

begin

msql2:=msql2+ ados.Fields.FieldName+',';
msql3:=msql3+':'+ados.Fields.FieldName+',';
end;

end;

msql2:=copy(trim(msql2),0,length(trim(msql2))-1);
msql3:=copy(trim(msql3),0,length(trim(msql3))-1);
msql:=msql1+msql2+') values('+msql3+')';
adod.SQL.Add(msql);
for i:=1 to ados.FieldCount-1do

begin

if ((copy(ados.Fields.FieldName,0,2) <> 'TMP') and (ados.Fields.FieldName <> 'UREN') and (ados.Fields.FieldName <> 'UDATE')) then

begin

lnparm:=ados.Fields.FieldName ;
adod.Parameters.ParamByName(lnparm).Value:=ados.Fields.Value;
end;

end;

adod.Prepared:=true;
try
adod.ExecSQL;
result:=true;
except
result:=false;
end;

adod.Free;
end;

end;
 
后退
顶部