Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
beyonder422
Posting Yak Master
124 Posts |
Posted - 2009-05-18 : 17:36:46
|
I created a simple object to send an ADODB recordset via MSMQ and successfully tested in console app, but imported into sql 2005 I'm getting the error below.Any input? I've seen managed vs unmanaged and wonder if it is even possible to use ADODB technology in sql 2005 CLR.Is there a "wrapper" or do I need to do something else to facilitate?-- Send object(failing code only):[SqlProcedure]public static void Send(SqlString queue, SqlString point, SqlString bodynumber, out SqlString msg){ ADODB.Recordset rs = new ADODB.Recordset(); // when commenting out this line I do not get the error below....... - HELP!!!!!} // end Send-- sql codecreate assembly SqlMSMQtools authorization dbo from 'C:\temp\SqlMSMQtools.dll' with permission_set = unsafego-- proccreate PROCEDURE usp_MSMQ_SendAP46@queue nvarchar(500),@point nvarchar(100),@body_number nvarchar(10),@msg nvarchar(MAX) outputAS EXTERNAL NAME SqlMSMQtools.[SqlMSMQtools.Basic].SendGO-- executeDECLARE @test nvarchar(1024)EXEC usp_MSMQ_SendAP46 @queue='FormatName:DIRECT=TCP:1.2.3.4\\private$\\XXX', @point='TestPoint',@body_number='123456', @msg = @test OUTPUTselect @test-- errorMsg 6522, Level 16, State 1, Procedure usp_MSMQ_SendAP46, Line 0A .NET Framework error occurred during execution of user defined routine or aggregate 'usp_MSMQ_SendAP46': System.UriFormatException: Invalid URI: The URI is empty.System.UriFormatException: at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind) at System.ComponentModel.Design.RuntimeLicenseContext.GetLocalPath(String fileName) at System.ComponentModel.Design.RuntimeLicenseContext.GetSavedLicenseKey(Type type, Assembly resourceAssembly) at System.ComponentModel.LicenseManager.LicenseInteropHelper.GetCurrentContextInfo(Int32& fDesignTime, IntPtr& bstrKey, RuntimeTypeHandle rth) at SqlMSMQtools.Basic.Send(SqlString queue, SqlString point, SqlString bodynumber, SqlString& msg)---------------------I do not define what is obvious... |
|
|
|
|
|
|