CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2006
    Posts
    1

    mssql 2000 dts dynamic query & automap columns question

    Hello All,

    I have designed a DTS package which extracts a query into an excel file.

    It uses a query that changes dynamically based on user preferences, so I have used the dynamic property SourceSQLStatement to feed the exact query into the DTS package.

    The issue, however, is that the query can be run a multitude of ways, and return a different number of columns each time. On one run, the query could return a 3 column record-set, on the next it could return an 8 column record-set.

    Currently, the DTS package errors on each attempt because it expects a certain column set.

    Is there a way to tell it to auto-map the columns at the time it executes? I could not find a dynamic property which did that.

    I would hate to have to set up a different DTS package for each possible column set.

    I am sure I am missing something.

    Thanks in advance.

    - Charles
    Last edited by cfaheybestpitch; July 28th, 2006 at 02:56 PM.

  2. #2
    Join Date
    Jun 2005
    Posts
    1,255

    Smile Re: mssql 2000 dts dynamic query & automap columns question

    Let's presume DTS is the new feature of MSSQL, whose long name is Data Transformation Services. An introduction to DTS can be read at http://www.devarticles.com/c/a/ASP/C...Server-2000/1/

    The queries are typed in a box. As far as I know, they are ordinary SQL queries. They are not dynamic queries (which is not very surprising to me, because the SQL language is based on the entity-relationship model of E. Codd, where tables have a fixed number of columns). Sorry.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured