Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2007 pass through query executing multiple times

Status
Not open for further replies.

Wayne79

Programmer
Sep 8, 2005
36
US
I've run across an interesting bug in Access and/or SQL Server.

My set up:
Access 2007
SQL Server 2008

Here is a way to see what I'm talking about.

In Access create a pass through query.
Use any legit DSN.
For the source use Select 1
don't save yet though.
open profiler and set it to look at what your doing. I used Login name.
run the pass through query
Profiler shows it executed once.
save the query and then execute it by double clicking it.
Profiler shows it just ran twice.

Why does it run twice?
How do I stop it from doing this?

I have a pass through query that calls a stored proc that inserts records into multiple tables based on parameters. Because of the above behavior I'm getting multiple records inserted instead of the desired single record.

Thank you in advance for any assistance you can provide.
 
then execute it by double clicking it.

What happens when you right-click it and choose "run"?

Ever notice how fast Windows runs? Me neither.
 
right clicking and choosing open results in the the query being run twice on the server. Same as double clicking.
 
Yikes - sorry no help here. We use Acc2k & 2k7 on SQL Server 2000 with no problems. The good (or bad) news is we are upgrading the server this fall. I'll talk to the DBA and see if he knows anything; if so, I'll post back.

Ever notice how fast Windows runs? Me neither.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top