Hi,
I am using MSACCESS 2002 with SQL Server 2000. I have an unbound form when it opens I assign a pass through query to the rowsource of a combo box. The pass through query calls a stored procedure. On my form unload event I set the rowsource to empty.
When I load the form I am only assigning the query once, however, it is appearing in profiler as many as three times within milliseconds of each other.
Can someone tell me if the query is actually executing three times or is this some anomoly of profiler that is causing it to appear this way. I have included the results of the trace below.
Thanks
1.
EVENT CLASS TEXT DATA APPLICATION nAME LOGIN NAME
------
SQL:BatchCompletedexec setEECboRS '4/23/2004','4/29/2004'Microsoft Office XPScheduler15
READS WRITES CPU DURATION CLIENT PROCESS ID START TIME
-----
6330165712572004-04-24 23:45:05.953
2.
EVENT CLASS TEXT DATA APPLICATION nAME LOGIN NAME
------
SQL:BatchCompletedexec setEECboRS '4/23/2004','4/29/2004'Microsoft Office XPScheduler16
READS WRITES CPU DURATION CLIENT PROCESS ID START TIME
-----
6330135712572004-04-24 23:45:05.970
3.
EVENT CLASS TEXT DATA APPLICATION nAME LOGIN NAME
------
SQL:BatchCompletedexec setEECboRS '4/23/2004','4/29/2004'Microsoft Office XPScheduler16
READS WRITES CPU DURATION CLIENT PROCESS ID START TIME
-----
6330165712572004-04-24 23:45:05.983
Since you're using an unbound form, step through your code and then
look at the Profiler trace after each step. It's possible that this is
caused because you don't have SET NOCOUNT ON as the first line in your
stored procedure.
--Mary
On Sun, 25 Apr 2004 06:06:02 -0700, "Lance"
<anonymous@.discussions.microsoft.com> wrote:
>Hi,
>I am using MSACCESS 2002 with SQL Server 2000. I have an unbound form when it opens I assign a pass through query to the rowsource of a combo box. The pass through query calls a stored procedure. On my form unload event I set the rowsource to empty.
When I load the form I am only assigning the query once, however, it is appearing in profiler as many as three times within milliseconds of each other.
>Can someone tell me if the query is actually executing three times or is this some anomoly of profiler that is causing it to appear this way. I have included the results of the trace below.
>Thanks
>1.
> EVENT CLASS TEXT DATA APPLICATION nAME LOGIN NAME
>------
>SQL:BatchCompletedexec setEECboRS '4/23/2004','4/29/2004'Microsoft Office XPScheduler15
> READS WRITES CPU DURATION CLIENT PROCESS ID START TIME
>-----
>6330165712572004-04-24 23:45:05.953
>2.
> EVENT CLASS TEXT DATA APPLICATION nAME LOGIN NAME
>------
>SQL:BatchCompletedexec setEECboRS '4/23/2004','4/29/2004'Microsoft Office XPScheduler16
> READS WRITES CPU DURATION CLIENT PROCESS ID START TIME
>-----
>6330135712572004-04-24 23:45:05.970
>3.
> EVENT CLASS TEXT DATA APPLICATION nAME LOGIN NAME
>------
>SQL:BatchCompletedexec setEECboRS '4/23/2004','4/29/2004'Microsoft Office XPScheduler16
> READS WRITES CPU DURATION CLIENT PROCESS ID START TIME
>-----
>6330165712572004-04-24 23:45:05.983
|||Mary,
I did not have set nocount on but adding it did not affect the results in profiler. The profiler results I posted all have the same processID but one has a CPU value of 13 while the other two lines have a CPU value of 16. The computer I am using has an
intel pentium 4 hyperthreading cpu that appears as two CPU to my operating system. This may be what is causing the results to appear multiple times even though the stored procedure is only executed once. Can you confirm by looking at the output I posted
?
Thanks,
Lance
|||That I couldn't tell you -- can you test from a different machine?
--mary
On Wed, 28 Apr 2004 10:10:58 -0700, "Lance"
<anonymous@.discussions.microsoft.com> wrote:
>I did not have set nocount on but adding it did not affect the results in profiler. The profiler results I posted all have the same processID but one has a CPU value of 13 while the other two lines have a CPU value of 16. The computer I am using has an
intel pentium 4 hyperthreading cpu that appears as two CPU to my operating system. This may be what is causing the results to appear multiple times even though the stored procedure is only executed once. Can you confirm by looking at the output I poste
d?
|||Mary,
I can not move it to another machine at this time but will eventually (well, I could but don't want to for this as I don't have the time and it can wait). By the way, I do have a book that you co-wrote and found it a very good reference.
Lance
|||My form calls a pass-through query in my Access 2000/SQL Server App, and it actually executes the stored procedure 3 times. This is very annoying.
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.
|||My form calls a pass-through query in my Access 2000/SQL Server App, and it actually executes the stored procedure 3 times. This is very annoying.
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.
|||Open a Profiler trace and step through your form code that calls the
stored procedure to pinpoint why it's getting called 3 times.
--Mary
On Tue, 29 Jun 2004 13:33:46 -0700, SqlJunkies User
<User@.-NOSPAM-SqlJunkies.com> wrote:
>My form calls a pass-through query in my Access 2000/SQL Server App, and it actually executes the stored procedure 3 times. This is very annoying.
>--
>Posted using Wimdows.net NntpNews Component -
>Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.
Friday, February 24, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment