Showing posts with label codedim. Show all posts
Showing posts with label codedim. Show all posts

Wednesday, March 21, 2012

GetBlobData method fails

Hi,

I have s Script Component, that retrieves data from NTEXT column using this code:

Dim b As Byte()

If (Row.OutputXML.Length > 0) And (Not (Row.OutputXML_IsNull)) Then

b = Row.OutputXML.GetBlobData(0, CInt(Row.OutputXML.Length))

End If

I′m getting this error:

[Script Component 1 [838]] Error: System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component. at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.HandleUserException(Exception e) at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.ProcessInput(Int32 inputID, PipelineBuffer buffer) at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostProcessInput(IDTSManagedComponentWrapper90 wrapper, Int32 inputID, IDTSBuffer90 pDTSBuffer, IntPtr bufferWirePacket)

OutputXML column is filled by Ole Db Command from an output parameter (nvarchar(max)) of a stored procedure. In management studio sp works fine, even Execute SQL Task returns correct (but truncated) data.

Please, help!

what is the SSIS data type (not the original SQL data type) assigned in OleDB Command to OutputXML column?|||data type is DT_NTEXT

Friday, February 24, 2012

Get Processor Id

Hi All
How Can I Convert This Code
Dim cimv2, PInfo, PItem ' no idea what to declare these as
Dim PubStrComputer As String
PubStrComputer = "."
Set cimv2 = GetObject("winmgmts:\\" & PubStrComputer & "\root\cimv2")
Set PInfo = cimv2.ExecQuery("Select * From Win32_Processor")
For Each PItem In PInfo
MsgBox ("Processor: " & PItem. Name & vbCrLf & "Id: " &
PItem.ProcessorId)
Next PItem
From Sql query Analyzer To Get Processor Id
Thanks
Hi
"Taha" wrote:

> Hi All
> How Can I Convert This Code
> Dim cimv2, PInfo, PItem ' no idea what to declare these as
> Dim PubStrComputer As String
> PubStrComputer = "."
> Set cimv2 = GetObject("winmgmts:\\" & PubStrComputer & "\root\cimv2")
> Set PInfo = cimv2.ExecQuery("Select * From Win32_Processor")
> For Each PItem In PInfo
> MsgBox ("Processor: " & PItem. Name & vbCrLf & "Id: " &
> PItem.ProcessorId)
> Next PItem
> From Sql query Analyzer To Get Processor Id
> Thanks
Check out http://www.sqldbatips.com/displaycode.asp?ID=6 and
http://www.sqlservercentral.com/columnists/aloera/sqlserverscriptingandwmi.asp on how to run WMI scripts.
John

Get Processor Id

Hi All
How Can I Convert This Code
Dim cimv2, PInfo, PItem ' no idea what to declare these as
Dim PubStrComputer As String
PubStrComputer = "."
Set cimv2 = GetObject("winmgmts:\\" & PubStrComputer & "\root\cimv2")
Set PInfo = cimv2.ExecQuery("Select * From Win32_Processor")
For Each PItem In PInfo
MsgBox ("Processor: " & PItem. Name & vbCrLf & "Id: " &
PItem.ProcessorId)
Next PItem
From Sql query Analyzer To Get Processor Id
ThanksHi
"Taha" wrote:

> Hi All
> How Can I Convert This Code
> Dim cimv2, PInfo, PItem ' no idea what to declare these as
> Dim PubStrComputer As String
> PubStrComputer = "."
> Set cimv2 = GetObject("winmgmts:\\" & PubStrComputer & "\root\cimv2")
> Set PInfo = cimv2.ExecQuery("Select * From Win32_Processor")
> For Each PItem In PInfo
> MsgBox ("Processor: " & PItem. Name & vbCrLf & "Id: " &
> PItem.ProcessorId)
> Next PItem
> From Sql query Analyzer To Get Processor Id
> Thanks
Check out http://www.sqldbatips.com/displaycode.asp?ID=6 and
[url]http://www.sqlservercentral.com/columnists/aloera/sqlserverscriptingandwmi.asp[/ur
l] on how to run WMI scripts.
John