--Try update OpenDataSource( 'Microsoft.Jet.OLEDB.4.0', 'Data Source=" c:\DB.mdb";User ID=Admin;Password=')...表名 set 列名=0 where 條件
update OpenRowSet('microsoft.jet.oledb.4.0',';database=D:\test.mdb', 'select * from test') set aa=13
试了一下,没成功,报错: SQL Server blocked access to STATEMENT 'OpenRowset/OpenDatasource' of component 'Ad Hoc Distributed Queries' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Ad Hoc Distributed Queries' by using sp_configure. For more information about enabling 'Ad Hoc Distributed Queries', see "Surface Area Configuration" in SQL Server Books Online.
UPDATE FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'c:\MSOffice\Access\Samples\northwind.mdb';'admin';'mypwd', Orders) AS a SET a.bb=0 GO
update OpenDataSource( 'Microsoft.Jet.OLEDB.4.0',
'Data Source=" c:\DB.mdb";User ID=Admin;Password=')...表名 set 列名=0 where 條件
OpenRowSet('microsoft.jet.oledb.4.0',';database=D:\test.mdb',
'select * from test')
set aa=13
SQL Server blocked access to STATEMENT 'OpenRowset/OpenDatasource' of component 'Ad Hoc Distributed Queries' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Ad Hoc Distributed Queries' by using sp_configure. For more information about enabling 'Ad Hoc Distributed Queries', see "Surface Area Configuration" in SQL Server Books Online.
FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'c:\MSOffice\Access\Samples\northwind.mdb';'admin';'mypwd', Orders)
AS a
SET a.bb=0
GO