![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
| |
#2
| |||
| |||
|
|
In article <5A0EF4D4-A44E-458E-9DD4-EB24F3984F82 (AT) microsoft (DOT) com>, Prasad (AT) discussions (DOT) microsoft.com says... Not possible - you would need to open 2 connections to run 2 statements at the same time. -- Regards Darren Gosbell [MCSD] Blog: http://www.geekswithblogs.net/darrengosbell |
#3
| |||
| |||
|
|
Hi Darren, I would llike to run 2 MDX statements one after another in the same DLL. The first MDX gives me count of the rows. This count is used for pagination purposes while displaying on the screen. The second one is used to actually spin through the cellset for the content. I will open one connection run the first MDX, then pass the same connection object as an argument to a different method in the same class that actually generates the cell set content. Please let me know. Thanks, Prasad. "Darren Gosbell" wrote: In article <5A0EF4D4-A44E-458E-9DD4-EB24F3984F82 (AT) microsoft (DOT) com>, Prasad (AT) discussions (DOT) microsoft.com says... Not possible - you would need to open 2 connections to run 2 statements at the same time. -- Regards Darren Gosbell [MCSD] Blog: http://www.geekswithblogs.net/darrengosbell |
#4
| |||
| |||
|
|
hello Prasad, i don't think there is any issue with executing more than 1 command against the same connection sequentially. so, say you have connection - your opened connection, then what you could do: AdomdCommand cmd1 = connection.CreateCommand(); cmd1.CommandText= "<mdx query>"; CellSet cs1 = cmd1.ExecuteCellSet(); AdomdCommand cmd2 = connection.CreateCommand(); cmd2.CommandText = "<another query>"; CellSet cs2 = cmd2.ExecuteCellSet(); or even easier - you don't really need to create another command, you can re-use the same: AdomdCommand cmd = connection.CreateCommand(); cmd.CommandText = "<query 1>"; CellSet cs1 = cmd.ExecuteCellSet(); cmd.CommandText = "<query 2>"; CellSet cs2 = cmd.ExecuteCellSet(); either should work i believe. are you seeing any specific issue? if so, could you specify what it is, and what the code is doing? thanks, -- mary -- This posting is provided "AS IS" with no warranties, and confers no rights. -- "Prasad" <Prasad (AT) discussions (DOT) microsoft.com> wrote in message news A09B21A-C893-4487-8F0C-A6B4782FC5FD (AT) microsoft (DOT) com...Hi Darren, I would llike to run 2 MDX statements one after another in the same DLL. The first MDX gives me count of the rows. This count is used for pagination purposes while displaying on the screen. The second one is used to actually spin through the cellset for the content. I will open one connection run the first MDX, then pass the same connection object as an argument to a different method in the same class that actually |
![]() |
| Thread Tools | |
| Display Modes | |
| |