Charlotte Foust
cfoust at infostatsystems.com
Thu Jan 22 11:24:36 CST 2009
Give me a break, JC. I wrote that 8 years ago at least! It wasn't intended to be a one-size-fits-all, so you have to tweak it to get it to do what you want. It worked at that time, 3 versions of Access ago. 1=Yes 2=No, it wasn't built to handle passthroughs. 3=I'd say yes. I was working with the developers edition of SQL Server way, way back, but I don't remember the details. Charlotte -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Thursday, January 22, 2009 8:59 AM To: Access Developers discussion and problem solving Subject: [AccessD] Stored procedures from Access OK, I have built my first pass through query, which runs just fine. Basically I am trying to run stored procedures in SQL which have parameters. I built the pass through query as a simple "exec MyProcName, Param1, Param2" Where param1 and param2 are hard coded. I do not see a way to place parameters in a collection like you can do with regular queries. Did I miss something there? Now, I think it was Charlotte (I deleted the email after copying the code) that provided a CallADOStoredProc, which I am trying to use. However I am getting an "odbc call failed" error, which I am pretty certain is because it uses the standard currentproject.connection. That connection does not reference the server or the database, so how can it know where to send the odbc call? Questions: 1) Is the parameter collection that is being filled in CallADOStoredProc replace the hard coded parameters in my pass through query? I.e. can I just remove the hard coded parameters and place them in the call to CallADOStoredProc? 2) Is CallADOStoredProc looking for a local pass through query at all, or is it looking for the name of a stopred procedure out in SQL Server? 3) Do I need to find a "standard" connection string which will reference the SQL Server? I am now using tons of Stored Procedures out in SQL Server but I have absolutely zero experience causing them to execute from Access. I need some very basic instructions on how to do this. I have found things on the internet but they all seem to start with "you know how to do this and here are some tricks" rather than "since you know nothing, here is what you are doing and why". Can anyone here provide a "since you know nothing" approach? TIA, -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com