求助[远程SQL导入到本地ACCESS]
本地SQL导出到本地ACCESS代码如下:
<%
if request("po")<>"" then
set conn=server.CreateObject("adodb.connection")
dd=server.MapPath("tb.mdb")
conn.open "driver={SQL Server};server=.;uid=sa;pwd=;database=BBSXP"
sql="insert into opendatasource('microsoft.jet.oledb.4.0','data source="&dd&"')...BBSXP_links(Linkid,name,URL,logo,intro,sortorder)select Linkid,name,URL,logo,intro,sortorder from BBSXP_links where LinkID not in(select LinkID from BBSXP_Links)"
conn.execute(sql)
response.Write("导出成功")
end if
%>
远程SQL导入到本地代码如下:
<%
if request("po")<>"" then
set conn=server.CreateObject("adodb.connection")
dd=server.MapPath("222.mdb")
conn.open "driver={SQL Server};server=192.168.0.66;uid=sa;pwd=;database=stwo"
sql="insert into opendatasource('microsoft.jet.oledb.4.0','data source="&dd&";user id=Admin;password=;')...__var(id,cclass,cvarname,cvalue) select id,cclass,cvarname,cvalue from __var where ID not in(select id from __var)"
conn.execute(sql)
response.Write("导出成功")
end if
%>
本地可以执行成功,而远程不可以
请高手指教,小弟刚来论坛,分不多,但以后我会补。