经典ASP-更新记录提供错误:Microsoft OLE DB Provider for ODBC Drivers错误'80004005' [英] Classic ASP- Update record gives ERROR:Microsoft OLE DB Provider for ODBC Drivers error '80004005'

查看:86
本文介绍了经典ASP-更新记录提供错误:Microsoft OLE DB Provider for ODBC Drivers错误'80004005'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是我运行和接收的代码



错误:用于ODBC驱动程序的Microsoft OLE DB提供程序错误'80004005'

[Microsoft] [ODBC SQL Server驱动程序] [SQL Server]在sys.servers中找不到服务器'xxx\SQLEXPRESS'。验证是否指定了正确的服务器名称。如有必要,执行存储过程sp_addlinkedserver以添加服务器到sys.servers。

/updated/TestSingle.asp,行114




代码:



Dim intShipPointID

intShipPointID = Request.Form(frmShipPointID)

设置rs = Server.CreateObject(ADODB .Recordset)



如果intShipPointID =---或intShipPointID =0那么

intShipPointID = 0

else



sql =SELECT Name,ShipPointZip,ShipPointCity,ShipPoint_St_Prv,ShipPointAddress,MfgID,Printer,Software,



sql = sql& 证书& FormatID& AS CertFormatID,Cert& FormatID& Date AS CertFormatIDDate,& FormatID& 测试AS FormatIDTests



sql = sql& FROM tblShipPoint WHERE ID =& intShipPointID

rs.Open sql,conn,2,2



如果Request.Form(chkUpdateSup)=True则

rs(名称)=替换(Request.Form(frmSupplierName),','')

rs(ShipPointZip)=请求.Form(frmShipPoint)

rs(ShipPointCity)= Request.Form(frmShipPointCity)

rs(ShipPoint_St_Prv)= Request.Form( frmShipPoint_St_Prv)

rs(ShipPointAddress)= Request.Form(frmShipPointAddress)

rs(MfgID)= Request.Form(frmMfgID)

rs(Printer)= Request.Form(frmPrinter)

rs(Software)= Request.Form(frmSoftware)

结束如果

选择案例Request.Form(frmFormatIDCert)

案例1:

rs(CertFormatID) = -1

rs(CertFormatIDDate)= CheckNull(日期,日期)

rs(FormatIDTests)= rs(FormatIDTests)+ 1

案例2:

rs(FormatIDTests)= rs(FormatIDTests)+ 1

结束选择



rs.Update' - 114行



rs.Close





更新记录集适用于配置到同一服务器,iis 5和sql server 2005的其他Classic ASP网站。



非常感谢

Below is the code which i run and recieve

ERROR:"Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC SQL Server Driver][SQL Server]Could not find server 'xxx\SQLEXPRESS' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers.
/updated/TestSingle.asp, line 114 "


CODE:

Dim intShipPointID
intShipPointID = Request.Form("frmShipPointID")
Set rs = Server.CreateObject("ADODB.Recordset")

if intShipPointID="---" or intShipPointID ="0" then
intShipPointID=0
else

sql = "SELECT Name, ShipPointZip, ShipPointCity, ShipPoint_St_Prv, ShipPointAddress, MfgID, Printer, Software, "

sql=sql & "Cert" & FormatID & " AS CertFormatID, Cert" & FormatID & "Date AS CertFormatIDDate, " & FormatID & "Tests AS FormatIDTests "

sql=sql & " FROM tblShipPoint WHERE ID = " & intShipPointID
rs.Open sql, conn, 2, 2

If Request.Form("chkUpdateSup")="True" then
rs("Name") = Replace(Request.Form("frmSupplierName"),"'","''")
rs("ShipPointZip") = Request.Form("frmShipPoint")
rs("ShipPointCity") = Request.Form("frmShipPointCity")
rs("ShipPoint_St_Prv") = Request.Form("frmShipPoint_St_Prv")
rs("ShipPointAddress") = Request.Form("frmShipPointAddress")
rs("MfgID") = Request.Form("frmMfgID")
rs("Printer") = Request.Form("frmPrinter")
rs("Software") = Request.Form("frmSoftware")
End If
Select Case Request.Form("frmFormatIDCert")
Case "1":
rs("CertFormatID")=-1
rs("CertFormatIDDate")= CheckNull(Date,"Date")
rs("FormatIDTests")= rs("FormatIDTests")+1
Case "2":
rs("FormatIDTests")= rs("FormatIDTests")+1
End Select

rs.Update '- Line 114

rs.Close


The update recordset works for other Classic ASP website configured to same server,iis 5 and sql server 2005.

Many Thanks

推荐答案

这篇关于经典ASP-更新记录提供错误:Microsoft OLE DB Provider for ODBC Drivers错误'80004005'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆