David McAfee
davidmcafee at gmail.com
Wed Dec 21 14:58:27 CST 2011
OK, I tested the ADP on a box with Access 2002. It returned the same, incorrect row count and values. I tried running the stored procedure from a different ADP and it also returns incorrect records. So far the only way to get the correct results besides running it directly in SSMS is to run it from an mdb using a pass through query. What occurs differently between running a pass through vs running the sproc directly from the Access database window? David On Wed, Dec 21, 2011 at 12:37 PM, David McAfee <davidmcafee at gmail.com>wrote: > I created a new mdb and it returns correctly, as expected via a pass > through query. > > I'm going to try a box with an Access version <2007 to test the ADP. > > > > > On Wed, Dec 21, 2011 at 11:44 AM, Duane Hookom <duanehookom at hotmail.com>wrote: > >> How does it look if you try this in a Pass-Through query? >> >> Duane Hookom >> MS Access MVP >> >> >> > From: davidmcafee at GMAIL.COM >> > >> > A coworker wrote a new stored procedure that works just fine when ran >> from >> > SSMS. >> > >> > >> > If either of these are ran from SSMS: >> > >> > EXEC stpR6Payouts '1/1/2011','11/30/2011','' >> > >> > >> > EXEC stpR6Payouts '1/1/2011','11/30/2011',NULL >> > >> > The data is returned as expected. >> > >> > >> > If, the sproc is ran from VBA, or directly through the immediate >> window, we >> > get different results. >> > >> > The sproc run from Access will return a few rows short, and data is >> being >> > calculated incorrectly on the rows that are returned. >> > >> > Hit F5 in Access, and a different row count (and data on the returned >> rows) >> > will be different. >> > >> > I've always assumed SQL was doing all the work and returning a >> resultset to >> > Access, but it doesn't appear this is actually what happens. >> > >> > Does anyone have any ideas? >> >> -------------------------------------------------------------------------- >> The ACCESS-L list is hosted on a Windows(R) 2003 Server running L-Soft >> international's LISTSERV(R) software. For subscription/signoff info >> and archives, see http://peach.ease.lsoft.com/archives/access-l.html . >> COPYRIGHT INFO: >> http://peach.ease.lsoft.com/scripts/wa.exe?SHOWTPL=COPYRIGHT&L=ACCESS-L >> > >