Advertisement

07.16.2008 at 08:30AM PDT, ID: 23570067
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.0

SSIS script component issue

Asked by lostboyinsofla in SQL Server 2005, Microsoft Visual Basic.Net, VB Script

Tags: , ,

I have a script that I'm passing about 60000 records to.  One of the fields is a dt_text field.  When I'm handing that field off to the script I'm converting it to unicode as you can see in the script below.

My problem is after around 50000 records are passed through the pipeline I get this error:

   at ScriptComponent_f389ae70f7634d74ab65be5acee6a369.ScriptMain.Input0_ProcessInputRow(Input0Buffer Row)
   at ScriptComponent_f389ae70f7634d74ab65be5acee6a369.UserComponent.Input0_ProcessInput(Input0Buffer Buffer)
   at ScriptComponent_f389ae70f7634d74ab65be5acee6a369.UserComponent.ProcessInput(Int32 InputID, PipelineBuffer Buffer)
   at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.ProcessInput(Int32 inputID, PipelineBuffer buffer)


I am not very familar with scripts but it seems to be working and from what I can guess the problem is a buffer  issue.

I've played with the DefaultBufferMaxRows and DefaultBufferSize options but can't seem to get past this issue.

Any advise is much appreciated.  I'm pasting my script below for reference.

Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
' Microsoft SQL Server Integration Services user script component
' This is your new script component in Microsoft Visual Basic .NET
' ScriptMain is the entrypoint class for script components
 
Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper
Imports System.Text
 
 
Public Class ScriptMain
    Inherits UserComponent
    Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
        'Dim blobData() As Byte = Row.FolioLegalDescription.GetBlobData(0, CInt(Row.FolioLegalDescription.Length))
 
        Dim inLegal As String = System.Text.Encoding.Unicode.GetString(Row.FolioLegalDescription.GetBlobData(0, CInt(Row.FolioLegalDescription.Length)))
 
        Dim inLegal2, inLegal3, inLegal4, inLegal5, inLegal6 As String
 
        inLegal = inLegal.Substring(1, inLegal.Length - 2)
        inLegal = Replace(inLegal, Chr(10), "")
        inLegal = Replace(inLegal, Chr(13), "")
        inLegal = Replace(inLegal, Chr(9), "")
 
        If inLegal.Length > 20000 Then
            inLegal6 = inLegal.Substring(20000, inLegal.Length - 4000)
            inLegal = inLegal.Substring(0, 20000)
        End If
        If inLegal.Length > 16000 Then
            inLegal5 = inLegal.Substring(16000, inLegal.Length - 4000)
            inLegal = inLegal.Substring(0, 16000)
        End If
        If inLegal.Length > 12000 Then
            inLegal4 = inLegal.Substring(12000, inLegal.Length - 4000)
            inLegal = inLegal.Substring(0, 12000)
        End If
        If inLegal.Length > 8000 Then
            inLegal3 = inLegal.Substring(8000, inLegal.Length - 4000)
            inLegal = inLegal.Substring(0, 8000)
        End If
        If inLegal.Length > 4000 Then
            inLegal2 = inLegal.Substring(4000, inLegal.Length - 4000)
            inLegal = inLegal.Substring(0, 4000)
        End If
 
        Row.Legal1 = inLegal
        Row.Legal2 = inLegal2
        Row.Legal3 = inLegal3
        Row.Legal4 = inLegal4
        Row.Legal5 = inLegal5
        Row.Legal6 = inLegal6
    End Sub
End Class
[+][-]07.16.2008 at 09:12AM PDT, ID: 22017361

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.16.2008 at 11:54AM PDT, ID: 22018951

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.16.2008 at 11:55AM PDT, ID: 22018967

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 02:18AM PDT, ID: 22023582

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: SQL Server 2005, Microsoft Visual Basic.Net, VB Script
Tags: Mircosoft, SSIS, VB.net
Sign Up Now!
Solution Provided By: PFrog
Participating Experts: 2
Solution Grade: A
 
 
[+][-]07.17.2008 at 02:33AM PDT, ID: 22023652

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 02:41AM PDT, ID: 22023682

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 02:53AM PDT, ID: 22023755

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.19.2008 at 06:53AM PDT, ID: 22521055

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]09.25.2008 at 03:36PM PDT, ID: 22574656

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628