Error in Exporting data to txt file

  • Hi,

    I have a problem when executing a package in ssis. It is for export the data from sql table to txt file. I write it in programmatically(vb.net) and i got the following error.

    An OLE DB error has occurred. Error code: 0x80004005.

    An OLE DB record is available.  Source: "Microsoft OLE DB Provider for ODBC Drivers"

    Hresult: 0x80004005  Description: "[Microsoft][ODBC Driver Manager]

    Data source name not found and no default driver specified".

    The AcquireConnection method call to the connection manager "OLEDBSrc"

    failed with error code 0xC0202009.

    component "OLE DB Source" (1) failed validation and returned error code 0xC020801C.

    One or more component failed validation.

    There were errors during task validation.

    plz give me some solution.

     

    regards,

    Jayanthi.

  • You'll have to post some of your VB.NET code for a solid answer, but judging by the error message you posted it appears that you may have forgotten to set up a connection in your code.

    Tim Mitchell, Microsoft Data Platform MVP
    Data Warehouse and ETL Consultant
    TimMitchell.net | @Tim_Mitchell | Tyleris.com
    ETL Best Practices

  • Thanks for your reply.

     Yes you are correct the connection string is the only problem and i solved it. but i got another error. Here is the error message that i got and the source code,

    The Error msg,

    "component "FLATFILE" (31)" failed validation and

    returned validation status "VS_NEEDSNEWMETADATA".

    One or more component failed validation.

    There were errors during task validation.

    The code,

    Dim

    input As IDTSInput90 = DesComponent.InputCollection(0)

    Dim vInput As IDTSVirtualInput90

    vInput = input.GetVirtualInput

    'Iterate through the virtual column collection.

    '---------------------------------------------------

    Dim vColumn As IDTSVirtualInputColumn90

    ' Iterate through the virtual input column collection.

    For Each vColumn In vInput.VirtualInputColumnCollection

    ' Call the SetUsageType method of the destination

    ' to add each available virtual input column as an input column.

    DesInstance.SetUsageType(input.ID, vInput, vColumn.LineageID, DTSUsageType.UT_READONLY)

    Next

    For Each inputcolumn As IDTSInputColumn90 In input.InputColumnCollection

    MsgBox(inputcolumn.Name)

    Dim exMetaColumn As IDTSExternalMetadataColumn90 = input.ExternalMetadataColumnCollection.[New]

    exMetaColumn.CodePage = inputcolumn.CodePage

    exMetaColumn.DataType = inputcolumn.DataType

    exMetaColumn.Length = inputcolumn.Length

    exMetaColumn.Name = inputcolumn.Name

    inputcolumn.ExternalMetadataColumnID = exMetaColumn.ID

    DesInstance.MapInputColumn(input.ID, inputcolumn.ID, exMetaColumn.ID)

    Next

    I want to know how can i map the output column in source component with  input column in destination component.Give me some sample code.

    Thanks in advance.

     

     

  • Hi,

    I am also facing the same problem. Have you cracked it? If so plz let me know how.

  • If you change an upstream file source (structure, data type, etc.), your downstream components will likely require need new metadata. Double-click each of the components downstream from the one you changed, and a dialog box will display any errors. If no errors, just click OK and continue to the next component.

    hth,

    Tim

    Tim Mitchell, Microsoft Data Platform MVP
    Data Warehouse and ETL Consultant
    TimMitchell.net | @Tim_Mitchell | Tyleris.com
    ETL Best Practices

  • I am using VB.Net program to create the package. I want to export the table content to flat file by dynamically creating the package.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply