Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1075543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T21:17:11+00:00 2026-05-16T21:17:11+00:00

I am using the EzAPI to create a dataflow with FlatFile Source public class

  • 0

I am using the EzAPI to create a dataflow with FlatFile Source

public class EzOleDbToFilePackage : EzSrcDestPackage<EzFlatFileSource, EzFlatFileCM, EzOleDbDestination, EzSqlOleDbCM>

Using the example from http://blogs.msdn.com/b/mattm/archive/2008/12/30/ezapi-alternative-package-creation-api.aspx I am trying to use a flat file source. However in the flat file source/connection I am unable to map the columns from the flat file.

Is there something like Dest.DefineColumnsInCM() for the zFlatFileSource?

In the BIDM when I open the created package, I see that the EzFlatFileCM is saying Columns are not defined for this connection manager. As soon as I click on Columns it automatically detects everything and the error goes away. What method do I need to call in my code to get the EzFlatFileSource to automatically pick these columns up?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T21:17:12+00:00Added an answer on May 16, 2026 at 9:17 pm

    From the folks at http://blogs.msdn.com/b/mattm/archive/2008/12/30/ezapi-alternative-package-creation-api.aspx

    I believe the logic which automatically determines the source columns is built into the flat file connection manager UI, and isn’t accessible via code (something I’d definitely like to change). From the code samples I have, it looks like you need to define your columns manually.

    ex.

           pkg.SrcConn.Unicode = (fileFormat == FileFormat.UNICODE);
    
           pkg.SrcConn.ConnectionString = srcFile;
    
           pkg.SrcConn.Columns.Add().DataType = dataType;
    
           pkg.SrcConn.Columns[0].ColumnType = "Delimited";
    
           pkg.SrcConn.ColumnNamesInFirstDataRow = false;
    
           pkg.SrcConn.ColumnDelimiter = ",";
    
           pkg.SrcConn.RowDelimiter = "\r\n";
    
           pkg.SrcConn.TextQualifier = "\"";
    
           pkg.SrcConn.Columns[0].TextQualified = testObject.textQualified;
    
           if (!pkg.Source.OutputColumnExists("col0"))
    
           {
    
               pkg.Source.InsertOutputColumn("col0");
    
           }
    
           pkg.Source.SetOutputColumnDataTypeProperties("col0", dataType, testObject.length, testObject.precision, testObject.scale, testObject.codePage);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using a populated Table Type as the source for a TSQL-Merge. I want to
tl;dr What is the EzAPI code to use an OLE DB Source with data
Using Jenkins or Hudson I would like to create a pipeline of builds with
Using Entity Framework CodeFirst, how do I create a created datetime column that gets
Using Github's Issue Tracker, how can one create an issue tied to an organization
My service side code is implemented using Resteasy @GET @Path(/ad-details/{query}) @Produces(application/json) public String getAdDetails(@PathParam(query)
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
Using C#, I need a class called User that has a username, password, active
Using JQuery, how do I select all elements with class x within an element
Using a rails console I create a Model record, then retrieve using a new

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.