Re: Global variables and DTS Packages

From: Allan Mitchell (allan_at_no-spam.sqldts.com)
Date: 07/24/04


Date: Sat, 24 Jul 2004 09:45:08 +0100

Seeing as you are executing this in VB I would be tempted to

1. Set your DataSource properties of the Connections objects through the
object model
2. You can easily use parameters to specify the account number with which
you want to work in the datapump task itself.

SELECT ............. FROM.......... WHERE <col> = ?

You map a global variable to the ?
In your VB code you specify the value of the Global Variable

3. You say you build a recordest built from n tables in the source. To how
many tables in the destination will that be delivered?
You of course know that without using Lookups that you can only insert into
1 table at a time. Lookups perform their actions on a Row*Row basis so can
be slow.
Therefore i think your solution is to have n DataPump tasks selecting the
correct data from each source table and inserting it in the correct order
into your destination tables. You ensure they are moved in the correct
order by using Workflow in your package.

Introduction to Workflow
(http://www.sqldts.com/default.aspx?287)

HTH

-- 
-- 
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know
"RAVI" <anonymous@discussions.microsoft.com> wrote in message
news:323401c47154$c4aa6770$a601280a@phx.gbl...
> Dear All, I asked this question some days ago but still
> unable to resolve the issue. Can anybody kindly guide me
> as I am new to DTS environment in SQL Server 2000.
>
> I am building an application in Visual Basic 6.0 with SQL
> Server 2000. It will move data (mainly account numbers and
> associated information like, customer, cost, etc.) between
> different servers whenever a batch is paid-off. A batch
> consists of different invoices & each invoice is for a
> particular account number.
>
> What I am trying to accomplish is to pass a global
> variable (which will have batch number information) from
> VB6 application to DTS package which will create a SQL
> recordset linking account, customer, cost, batch, etc.
> tables for that particular batch number (this recorset can
> have number of rows anywhere from 1 to 200 depending on
> size of batch and number of invoices). VB6 application
> will execute this DTS package and transfer recordset data
> between different servers. HOW CAN I DO THAT ?
>
> Your help will be highly appreciated. Cheers.


Relevant Pages

  • Re: Batches
    ... As Tibor stated it will be one batch and not 7000 individual round trips. ... building a single string I could have answered that more appropriately. ... > This is just the standard method of the built in .NET SQL Server data> provider. ...
    (microsoft.public.sqlserver.programming)
  • Re: Error running DTS package on a schedule (only!)
    ... I use Remote Desktop to access the server where the DTS package was ... > Right Click on the SQL Server Agent icon in EM and choose properties. ... > page here will tell you the account. ...
    (microsoft.public.sqlserver.dts)
  • Re: Scheduled DTS Package
    ... >The datapump tasks are copying data from an Oracle DB server to my SQL ... Make sure the driver is correctly installed on the server and is ... available for the SQL Server Agent service account. ... How to Run a DTS Package as a Scheduled Job ...
    (microsoft.public.sqlserver.dts)
  • Re: DTS Package will not run on server, but will run from another PC
    ... Remember that a DTS package runs on the computer ... NOT on the server where it is stored; ... Microsoft SQL Server documentation team ... > All SQL Services run using a domain account. ...
    (microsoft.public.sqlserver.dts)
  • Re: SQL SERVER AGENT
    ... The DTS package can then be scheduled to run via SQL Server Agent. ... invoke a batch file, but again it has nothing to do with C#. ... browser window and invoke an ASP.net page, but its not going to be ...
    (microsoft.public.dotnet.languages.csharp)