SBWolfe_1954
New Member
- Joined
- Aug 5, 2014
- Messages
- 15
I need to execute a stored procedure from SQL Server into Access 2013 and add the results to a temp table. I will then be using the data in the temp table to perform multiple calculations and prepare different reports.
I thought using a Pass through Query would be the best way. The following is the start of that query:
ODBC;DSN=SQLServer2012;Description=dbo rpt tables in WES_DW;Trusted_Connection=Yes;APP=Microsoft Office 2013;DATABASE=WES_DW;
EXEC [dbo].[usp_Usage_Report]
@Startdate = '1/1/2017',
@Enddate = '6/30/2017',
@ShipToName = '',
@billtoName = '',
@PriceLine = '',
@SellGroup1 = '',
@ProductIDs = '',
@PartNumber = '',
@PriceBranch = 'ALL'
This fails because it does not recognize my connection on the first line. It keeps popping up to be entered. If I try to give it the actual connection it still fails.
I need to execute the procedure and add the results to a temp table, so I am assuming additional lines need to be written.. I have googled this but have a lot of conflicting accounts on how to do it. I want to keep it simple because this is the only part coming over from SQL Server. The remainder of the procedure will have me working in Access on the temp table data. Once I have this figured out, I can use it as a standard for other sets of data I am working with. They will all come over from SQL Server in the same manner, just coming from other data sources.
Any help I can receive would be greatly appreciated.
I thought using a Pass through Query would be the best way. The following is the start of that query:
ODBC;DSN=SQLServer2012;Description=dbo rpt tables in WES_DW;Trusted_Connection=Yes;APP=Microsoft Office 2013;DATABASE=WES_DW;
EXEC [dbo].[usp_Usage_Report]
@Startdate = '1/1/2017',
@Enddate = '6/30/2017',
@ShipToName = '',
@billtoName = '',
@PriceLine = '',
@SellGroup1 = '',
@ProductIDs = '',
@PartNumber = '',
@PriceBranch = 'ALL'
This fails because it does not recognize my connection on the first line. It keeps popping up to be entered. If I try to give it the actual connection it still fails.
I need to execute the procedure and add the results to a temp table, so I am assuming additional lines need to be written.. I have googled this but have a lot of conflicting accounts on how to do it. I want to keep it simple because this is the only part coming over from SQL Server. The remainder of the procedure will have me working in Access on the temp table data. Once I have this figured out, I can use it as a standard for other sets of data I am working with. They will all come over from SQL Server in the same manner, just coming from other data sources.
Any help I can receive would be greatly appreciated.