![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, Running DTS from VB is new to me, so apologies for the newbie question. I have a DTS package which runs problem free in MMC. I wanted to automate the execution using VB6. I've loaded the a Package2 object using the LoadFromSQLServer method (which works fine), but the Execute method fails as follows: Error: x80040005 EXCEPTION_ACCESS_VIOLATION The package basically recreates tables in SQLServer, and copies in data from Access to these tables. I'm out of ideas... Any help is much appreciated! Thanks, Jim jimf (AT) imxinc (DOT) com |
#3
| |||
| |||
|
|
Running DTS from VB is new to me, so apologies for the newbie question. I have a DTS package which runs problem free in MMC. I wanted to automate the execution using VB6. I've loaded the a Package2 object using the LoadFromSQLServer method (which works fine), but the Execute method fails as follows: Error: x80040005 EXCEPTION_ACCESS_VIOLATION |
#4
| |||
| |||
|
|
Running DTS from VB is new to me, so apologies for the newbie question. I have a DTS package which runs problem free in MMC. I wanted to automate the execution using VB6. I've loaded the a Package2 object using the LoadFromSQLServer method (which works fine), but the Execute method fails as follows: Error: x80040005 EXCEPTION_ACCESS_VIOLATION Set the ExecuteInMainThread property to true. Execute a package from Visual Basic (VB) (http://www.sqldts.com/default.aspx?208) -- Darren Green (SQL Server MVP) DTS - http://www.sqldts.com PASS - the definitive, global community for SQL Server professionals http://www.sqlpass.org |
#5
| |||
| |||
|
|
Thanks for the help. Unfortunately, this did not do the trick... However, after exploring the articles in the link you provided, I foud a solution. Apparently, declaring a Package using the WITHEVENTS keyword is the issue... Once I removed WITHEVENTS everything worked fine. Many thanks! Jim "Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> wrote in message news:fJZy48J225iCFwxF (AT) sqldts (DOT) com... Running DTS from VB is new to me, so apologies for the newbie question. I have a DTS package which runs problem free in MMC. I wanted to automate the execution using VB6. I've loaded the a Package2 object using the LoadFromSQLServer method (which works fine), but the Execute method fails as follows: Error: x80040005 EXCEPTION_ACCESS_VIOLATION Set the ExecuteInMainThread property to true. Execute a package from Visual Basic (VB) (http://www.sqldts.com/default.aspx?208) -- Darren Green (SQL Server MVP) DTS - http://www.sqldts.com PASS - the definitive, global community for SQL Server professionals http://www.sqlpass.org |
#6
| |||
| |||
|
|
There is nothing wrong with using WithEvents, but you need to implement all event handlers. Events generally give you more information about errors that some of the other mechanisms as well. Sample code there on the site. Darren In message <ueHV4g#WFHA.3584 (AT) TK2MSFTNGP14 (DOT) phx.gbl>, Jim Fox jimf (AT) imxinc (DOT) com> writes Thanks for the help. Unfortunately, this did not do the trick... However, after exploring the articles in the link you provided, I foud a solution. Apparently, declaring a Package using the WITHEVENTS keyword is the issue... Once I removed WITHEVENTS everything worked fine. Many thanks! Jim "Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> wrote in message news:fJZy48J225iCFwxF (AT) sqldts (DOT) com... Running DTS from VB is new to me, so apologies for the newbie question. I have a DTS package which runs problem free in MMC. I wanted to automate the execution using VB6. I've loaded the a Package2 object using the LoadFromSQLServer method (which works fine), but the Execute method fails as follows: Error: x80040005 EXCEPTION_ACCESS_VIOLATION Set the ExecuteInMainThread property to true. Execute a package from Visual Basic (VB) (http://www.sqldts.com/default.aspx?208) -- Darren Green (SQL Server MVP) DTS - http://www.sqldts.com PASS - the definitive, global community for SQL Server professionals http://www.sqlpass.org -- Darren Green (SQL Server MVP) DTS - http://www.sqldts.com PASS - the definitive, global community for SQL Server professionals http://www.sqlpass.org |
#7
| |||
| |||
|
|
There is nothing wrong with using WithEvents, but you need to implement all event handlers. Events generally give you more information about errors that some of the other mechanisms as well. Sample code there on the site. Darren In message <ueHV4g#WFHA.3584 (AT) TK2MSFTNGP14 (DOT) phx.gbl>, Jim Fox jimf (AT) imxinc (DOT) com> writes Thanks for the help. Unfortunately, this did not do the trick... However, after exploring the articles in the link you provided, I foud a solution. Apparently, declaring a Package using the WITHEVENTS keyword is the issue... Once I removed WITHEVENTS everything worked fine. Many thanks! Jim "Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> wrote in message news:fJZy48J225iCFwxF (AT) sqldts (DOT) com... Running DTS from VB is new to me, so apologies for the newbie question. I have a DTS package which runs problem free in MMC. I wanted to automate the execution using VB6. I've loaded the a Package2 object using the LoadFromSQLServer method (which works fine), but the Execute method fails as follows: Error: x80040005 EXCEPTION_ACCESS_VIOLATION Set the ExecuteInMainThread property to true. Execute a package from Visual Basic (VB) (http://www.sqldts.com/default.aspx?208) -- Darren Green (SQL Server MVP) DTS - http://www.sqldts.com PASS - the definitive, global community for SQL Server professionals http://www.sqlpass.org -- Darren Green (SQL Server MVP) DTS - http://www.sqldts.com PASS - the definitive, global community for SQL Server professionals http://www.sqlpass.org |
#8
| |||
| |||
|
|
By the way... just wondering.... is there a simpler way to initiate execution of a DTS package? I can see why the VB DTS library is so useful... mainly for modifying / customizing DTS packages at runtime. However, if I'm just interested in executing an existing package without modifications, it seems that loading the package into a VB class and executing is excessive... perhaps there's a command object (maybe in SQL-DMO) that I can utilize from VB to instruct SQL Server to fire the package...??? like I said... just wondering... "Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> wrote in message news:x75Z0QP1z6iCFwmo (AT) sqldts (DOT) com... There is nothing wrong with using WithEvents, but you need to implement all event handlers. Events generally give you more information about errors that some of the other mechanisms as well. Sample code there on the site. Darren In message <ueHV4g#WFHA.3584 (AT) TK2MSFTNGP14 (DOT) phx.gbl>, Jim Fox jimf (AT) imxinc (DOT) com> writes Thanks for the help. Unfortunately, this did not do the trick... However, after exploring the articles in the link you provided, I foud a solution. Apparently, declaring a Package using the WITHEVENTS keyword is the issue... Once I removed WITHEVENTS everything worked fine. Many thanks! Jim "Darren Green" <darren.green (AT) reply-to-newsgroup-sqldts (DOT) com> wrote in message news:fJZy48J225iCFwxF (AT) sqldts (DOT) com... Running DTS from VB is new to me, so apologies for the newbie question. I have a DTS package which runs problem free in MMC. I wanted to automate the execution using VB6. I've loaded the a Package2 object using the LoadFromSQLServer method (which works fine), but the Execute method fails as follows: Error: x80040005 EXCEPTION_ACCESS_VIOLATION Set the ExecuteInMainThread property to true. Execute a package from Visual Basic (VB) (http://www.sqldts.com/default.aspx?208) -- Darren Green (SQL Server MVP) DTS - http://www.sqldts.com PASS - the definitive, global community for SQL Server professionals http://www.sqlpass.org -- Darren Green (SQL Server MVP) DTS - http://www.sqldts.com PASS - the definitive, global community for SQL Server professionals http://www.sqlpass.org |
![]() |
| Thread Tools | |
| Display Modes | |
| |