Provided you have some sort of Domain permissions set up, you could use the FileSystemObject and set the anonymous user in IIS to an account that has domain permissions and permissions to a share on the second server.
Got acces rights on the server.Now,I specify the server's adress like:
Code:
SQLstr = "INSERT INTO dbo.shopping_TSR SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=\\tmav035a\\Test\\AssetDB_Test\\tmb2.xls;hdr=yes', 'SELECT * FROM [Sheet1$]')"
Printing this statement,it looks like this:
INSERT INTO dbo.shopping_TSR SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=\tmav035a\Test\AssetDB_Test\tmb2.xls;hdr=yes', 'SELECT * FROM [Sheet1$]')
What should I do to the code so that the SQL statement looks like this: "Database=\\tmav035a\....."?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.