Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with SQL Assembly and Excel

Status
Not open for further replies.

wawalter

Programmer
Aug 2, 2001
125
US
Hello,

I posted this originally in the SQL Server Forum, but someone suggested I post it here, so...

I am trying to create an assembly that will use Excel to create and output an xls file. The dll runs fine when running in VS2005, but when I try to create the assembly on the SQL Server using the following:


Code:
create assembly CopyFileTest 
FROM '\\PII10626\c$\billtemp\c#\SQLAssemblyTest\SQLAssemblyTest\bin\Debug\SQLAssemblyTest.dll' 
with permission_set = external_access

I get the following error:


Code:
Msg 10301, Level 16, State 1, Line 1
Assembly 'SQLAssemblyTest' references assembly 'office, version=11.0.0.0, culture=neutral, publickeytoken=71e9bce111e9429c.', which is not present in the current database. SQL Server attempted to locate and automatically load the referenced assembly from the same location where referring assembly came from, but that operation has failed (reason: 2(The system cannot find the file specified.)). Please load the referenced assembly into the current database and retry your request.

We have Excel installed on that server and I tried putting the Microsoft.Office.Interop.Excel.dll on the server but it hasn't done any good.

I was able to sucessfully create the assembly before I added to Excel part to it.

Thanks for any help,
Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top