|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Messages in ADO.NETI would like to be able to execute a long-running stored procedure from a
Windows Forms application. The procedure loops through about 7,000 items, calling various other procedures along the way, and progress is displayed in SQL Query Analyzer using the Print command. It appears that Print events are handled automatically within the application (I assume through the InfoMessage event) and displayed as Message windows, which quickly causes an error. Is there a way to suppress this automatic handling, or do I just have to create an even handler of my own which does nothing? Mike, One thing I would like to point out, is that if you dont have the
event handler for the InfoMessageEvent then nothing would happen. It looks from the what your describing, is that there exists a InfoMessageEventHandler in your code, that pops out message box for every InfoMessage received. HTH, Sushil Show quote "Mike Caputo" <MikeCap***@discussions.microsoft.com> wrote in message news:5456B98F-C450-4770-9983-0B0B84FED887@microsoft.com... >I would like to be able to execute a long-running stored procedure from a > Windows Forms application. The procedure loops through about 7,000 items, > calling various other procedures along the way, and progress is displayed > in > SQL Query Analyzer using the Print command. It appears that Print events > are > handled automatically within the application (I assume through the > InfoMessage event) and displayed as Message windows, which quickly causes > an > error. Is there a way to suppress this automatic handling, or do I just > have > to create an even handler of my own which does nothing? I definitely don't have an explicit event handler, which is why I find this a
bit confusing. Show quote "Sushil Chordia" wrote: > Mike, One thing I would like to point out, is that if you dont have the > event handler for the InfoMessageEvent then nothing would happen. It looks > from the what your describing, is that there exists a > InfoMessageEventHandler in your code, that pops out message box for every > InfoMessage received. > > HTH, > Sushil > "Mike Caputo" <MikeCap***@discussions.microsoft.com> wrote in message > news:5456B98F-C450-4770-9983-0B0B84FED887@microsoft.com... > >I would like to be able to execute a long-running stored procedure from a > > Windows Forms application. The procedure loops through about 7,000 items, > > calling various other procedures along the way, and progress is displayed > > in > > SQL Query Analyzer using the Print command. It appears that Print events > > are > > handled automatically within the application (I assume through the > > InfoMessage event) and displayed as Message windows, which quickly causes > > an > > error. Is there a way to suppress this automatic handling, or do I just > > have > > to create an even handler of my own which does nothing? > > > Mike, Can you give more information on how your building your
application?(VS Designer/Code) If you are using code, can you share it? -Sushil Show quote "Mike Caputo" <MikeCap***@discussions.microsoft.com> wrote in message news:65F2FBE8-6745-4D50-827D-C4F8C8B938A0@microsoft.com... >I definitely don't have an explicit event handler, which is why I find this >a > bit confusing. > > "Sushil Chordia" wrote: > >> Mike, One thing I would like to point out, is that if you dont have the >> event handler for the InfoMessageEvent then nothing would happen. It >> looks >> from the what your describing, is that there exists a >> InfoMessageEventHandler in your code, that pops out message box for every >> InfoMessage received. >> >> HTH, >> Sushil >> "Mike Caputo" <MikeCap***@discussions.microsoft.com> wrote in message >> news:5456B98F-C450-4770-9983-0B0B84FED887@microsoft.com... >> >I would like to be able to execute a long-running stored procedure from >> >a >> > Windows Forms application. The procedure loops through about 7,000 >> > items, >> > calling various other procedures along the way, and progress is >> > displayed >> > in >> > SQL Query Analyzer using the Print command. It appears that Print >> > events >> > are >> > handled automatically within the application (I assume through the >> > InfoMessage event) and displayed as Message windows, which quickly >> > causes >> > an >> > error. Is there a way to suppress this automatic handling, or do I >> > just >> > have >> > to create an even handler of my own which does nothing? >> >> >> |
|||||||||||||||||||||||