检索COM类工厂中的CLSID为{000 24500-0000-0000-C000-000000000046}的组件时失败,原因是出现以下错误:80070005?
解决的办法:运行->dcomcnfg.exe(或者管理工具->组件服务)->计算机->我的电脑->DCOM配置->Micosoft Excel应用程序:
(右击)->属性窗口:
标识:交互式
安全:启动和激活权限->自定义->编辑(添加NetWork Server用户,允许本地启动和本地激活);
访问权限:自定义->编辑(添加NetWork Server用户,允许本地访问)
备注:如果是xp系统,添加AspNet用户。这个一定要记住了,不然问题解决不了。
//获取地址栏参数
function GetUrl(name)
{
var Url_Params = new Array();
var aParams = document.location.search.substr(1).split('&');
for (i=0; i < aParams.length; i++)
{
var aParam = aParams[i].split('=');
Url_Params[aParam[0]] = aParam[1];
}
//取得传过来的name参数
return Url_Params[name];
}
注:document.location.search是获取地址栏中的问号及其以后的字符串的。
如:地址:http://www.baidu.com/aaa.html?ID=298&type=2
document.location.search获取的的结果是"?ID=298&type=2"
aParams [0]="ID=298";
aParams [1]="type=2";
Url_Params的结果是:
Url_Params["ID"]=298
Url_Params["type"]=2
所以GetUrl(“ID”)返回的结果是298,GetUrl(“type”)返回的结果是2。
1、插入单引号如果不转化的话,字符串插入到数据库中错误的,只要在字符串中有单引号的地方在加一个单引号即可。
例如:在数据库插入'井下设备' :
insert into Static_Belong(BelongValue) values ('''井下设备''')
为什么是3个单引号呢?
注:'井下设备' 本来是要插入的一个字符串,根据values('字符串'),因为字符串里有单引号为了转化要在字符串外在加
一对单引号,即''井下设备'',现在字符串变成''井下设备'',套入values('字符串')格式即values('''井下设备'')
嘿嘿,如果是变量,只要用Contains,Replace函数即可。
2、向表中添加字段:
alter table StaticAccount add [Belong] nvarchar(50) default '井下设备';
其中StaticAccount 为表名,Belong为字段名
3、删除表中的字段:
alter table StaticAccount drop column WindPressure
其中StaticAccount 为表名,WindPressure为字段名
VS2005在客户端用JS给RadioButtonList赋值:
var radioButtonstype = document.getElementsByName(‘控件Name’);//用查看源文件的方式找到控件的Name
if(aa[5]=='外委')
{
radioButtonstype[1].checked=true;//是checked属性,而在页面代码是Selected属性,
//因为在解析成html是input
}
else
{
radioButtonstype[0].checked=true;
}
