Showing posts with label dts. Show all posts
Showing posts with label dts. Show all posts

Wednesday, March 21, 2012

Odd Question

Does anyone know of a way to call an Exell macro in a Sql Server DTS package?
Regards
jimI assume that you saved your package as a Visual Basic File
(Enterprise Manager->Package->Save as: Location->Visual Basic File)
Once having the VB code for the package, you can insert there the appropiate code to run the macro:

mySum = Application.Run("MyCustom.xlm!My_Func_Sum", 1, 5)
MsgBox "Macro result: " & mySum

Of course you'll need to define an Excel object, open it and work with the object properties, but basically that's the idea.

Originally posted by JDionne
Does anyone know of a way to call an Exell macro in a Sql Server DTS package?
Regards
jim|||Originally posted by dbadelphes
I assume that you saved your package as a Visual Basic File
(Enterprise Manager->Package->Save as: Location->Visual Basic File)
Once having the VB code for the package, you can insert there the appropiate code to run the macro:

mySum = Application.Run("MyCustom.xlm!My_Func_Sum", 1, 5)
MsgBox "Macro result: " & mySum

Of course you'll need to define an Excel object, open it and work with the object properties, but basically that's the idea.

hmmm thats a bit more than i understand. is there any documentation on that that i can read?
Jim|||Search for "Saving a DTS Package to a Visual Basic File" in Books Online. It's pretty well documented, then for macros look in MSDN documentation on Microsoft's site (check Q219905 - How to Dynamically Add and Run a VBA Macro from Visual Basic).

Hope it helps.

Originally posted by JDionne
hmmm thats a bit more than i understand. is there any documentation on that that i can read?
Jim

Monday, March 12, 2012

ODBC/OLE DB Error Code 0

Hey All:
Getting Code 0 errors in ActiveX scripts within DTS & can't trap the decription(s).
I remember seeing an OLD Thread on expanding the Code 0 errors but can't find it.
RobbieDcopy the contents of your dts into a notepad, save it as vbs file, after putting msgbox in places where you know or think errors occur, and go get them, tiger! happy debugging :)|||I did something similar. Copied the code into InterDev & got what I was looking for.

Also, realized that the procedure was flawed (BAD Code, BAD!) in that I was attempting to capture the error from one ActiveX module in a SECOND on Failure. Obviously, the err.Description would no longer exist!!!

ODBC vs OLE DB

The ODBC processing via DTS is slower than OLE DB which resulted following
inquiries:
- Why it so slow (ODBC)?
- Any idea how to overcome it
I use ODBC to communicate between IBM AS/400 DB2 and MS-SQL Server 2000.
Please advise.
Thanks.Might be your ODBC driver that is not performing OK, check out the
StarQuest products (www.starquest.com), they have ODBC drivers and
fast DB2 to SQL Server replication solutions.
Bob
"samuel" <samuellai@.ajikl.com.my> wrote in message news:<O05WtWbAEHA.3824@.TK2MSFTNGP09.phx.
gbl>...
> The ODBC processing via DTS is slower than OLE DB which resulted following
> inquiries:
> - Why it so slow (ODBC)?
> - Any idea how to overcome it
> I use ODBC to communicate between IBM AS/400 DB2 and MS-SQL Server 2000.
> Please advise.
> Thanks.

Monday, February 20, 2012

ODBC in SQL Query Analyzer

Is there any way to use an ODBC data source in MS SQL Query Analyzer? I
need to join an MS SQL table with a table from a non MSSQL database.
DTS would allow me to import the alient table but I want to avoid that,
if possible.
thanks"EoRaptor013" <rchrismon@.patmedia.net> wrote in message
news:1107369347.205441.278230@.g14g2000cwa.googlegr oups.com...
> Is there any way to use an ODBC data source in MS SQL Query Analyzer? I
> need to join an MS SQL table with a table from a non MSSQL database.
> DTS would allow me to import the alient table but I want to avoid that,
> if possible.
> thanks

Check out sp_addlinkedserver and "Configuring Linked Servers" in Books
Online - you can define a link to a data source on the MSSQL server, then
query it directly with TSQL.

Simon|||Check out the OPENROWSET function if your external datasource is also
OLE DB compatible. (There is, I think, is a OLE DB provider for ODBC
so you should be able to use this).

--
David Rowland
For a good monitor for Users and Server usage, try DBMonitor
http://dbmonitor.tripod.com