Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
kamalkishore_in
Yak Posting Veteran
76 Posts |
Posted - 2002-10-28 : 05:55:23
|
| Hi guys,I have to Send some of the DATA from a TABLE using DTS, but for a perticular Month and Perticular year.How can I filter data in my Local server, and I also have to delete the data from the remote server for the same condition.Is it possible to Pass some of the Paramater to the DTS using VB6, if Yes, how can I use them while making DTS Package in SQL Server.Any help will be heightly appriciated..Thanks |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2002-10-28 : 06:11:33
|
| Load the package using VB6, set the parameter as a global variable then run it. Access the global variable withing the package.Is it a requirement that you use DTS for this?==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
kamalkishore_in
Yak Posting Veteran
76 Posts |
Posted - 2002-10-28 : 07:13:42
|
| Hi again,Actually I have to send the to Many branches connected through Internet, for a perticular month, so that they can see the reports locally, as viewing data using remote servers takes time.do you knows where can I find the code for the suggession provided by you. Help neededThankx |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2002-10-28 : 07:40:02
|
| Set objDTSPackage = New DTS.Package objDTSPackage.LoadFromSQLServer strServerName, , , DTSSQLStgFlag_UseTrustedConnection, , , , strPackageName objDTSPackage.GlobalVariables("ServerName").Value = strServerName objDTSPackage.GlobalVariables("DatabaseName").Value = strDatabaseName objDTSPackage.GlobalVariables("FileName").Value = strFileName strDTSErrors = gobjELINTGlobals.ExecuteDTSPackage(objDTSPackage)==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
jeroena
Yak Posting Veteran
76 Posts |
Posted - 2002-10-29 : 05:31:52
|
| Hi nr,What's the grudge against DTS? You seem to have made it your goal in life to fight the use of DTS, or am I mistaken? You must have elaborated about the subject somewhere. Can you pass me a link or something?Cya, Jeroen. |
 |
|
|
Tim
Starting Member
392 Posts |
Posted - 2002-10-29 : 05:41:12
|
| A method to do it without VB6..Call DTSRUN.EXE passing a parameter (DTS sees it as a global variable)An ActiveX Script task uses ADO and this parameter to generate a recordset from a control table which has other parameters (filter condition etc.) The activeX script task copies the fields of the recordset into separate global variables.Then an Execute SQL task can run the delete task with parameter markers which are replaced with global variables.Then another Execute SQL task to do the insert, again with parameters.Hope that helps.----Nancy Davolio: Best looking chick at Northwind 1992-2000 |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2002-10-29 : 07:12:55
|
quote: What's the grudge against DTS? You seem to have made it your goal in life to fight the use of DTS, or am I mistaken? You must have elaborated about the subject somewhere. Can you pass me a link or something?
Nope, just innapropriate use of technology.People find they can do lots of things with DTS and end up controlling the server processing from a package - not realising that a lot of the time they are creating new connections causing the usual transaction problems.One of the things I don't like about dts is the number of ways you can enable/disable a step and the resultant difficulty in predicting the flow.Why would you schedule a package do do the same job as a stored procedure (or several SPs).Also it's difficult to audit changes in packages because if you add them via scripts you lose a lot of the graphical representation (unless someone knos how to do that).==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|
|
|